You are on page 1of 9

RM07MLBD SAP Report - Stock on Posting Date RM07MLBD is a standard ABAP report available within your SAP system

(depending o n your version and release level). Below is the standard documentation available for this report and a few details of other objects it interacts with such as ta bles, function modules, includes etc. If you would like to see the full code lis ting simply enter RM07MLBD into the relevant SAP transaction such as SE38 or SE8 0 Although this basic information may have limited use other that for reference, w ithin the comments section below there is also an opportunity for anyone to add useful hints, information and links to existing content specific to this abap re port. This page will therfore over time start to contain a useful amount of info rmation that can be found quickly, simply by searching on the object name, RM07M LBD. SAP Documentation for program RM07MLBD Transaction Code(s): Below is a list of transaction codes which are relevant to this SAP report MB5B - Stocks for Posting Date DESCRIPTION The report Stock for posting date lists a company's own stocks in a particular t ime period (earliest date 0h00, latest date 24h00). The posting date is used for selection. Note that the posting date may be differ ent from the entry date (date entered in the system) as well as the document dat e. Starting with the current stock balance, the report uses the material documents to calculate the stock balance for the specified posting date. PRECONDITION You need authorization to display material documents for all chosen plants (auth orization object Material documents: plant, activity 03). OUTPUT INCLUDE MMIM_BELEGE_PRO_MATERIAL Stock quantity and stock value on first date Total and value of all receipts Total and value of all issues Stock quantity and stock value on last date List of the material documents that were posted in the specified time period To go to the detail screen for the material document item, place the cursor on a material document and choose Goto -> Document item INCLUDE MMIM_ANZVAR Documentation extract taken from SAP system, Copyright (c) S AP AG Includes used within report: * THE DEFINITION OF THE SELECTION SCREEN MOVED FROM INCLUDE "N571473 * REPORT RM07MLBD AND ITS INCLUDES IMPROVED NOV 2001 "N451923 * REPORT RM07MLBD AND ITS INCLUDES IMPROVED MAY 10TH, 2001 "N400992

Tables used within report and the associated select statement: these * - MB5B was improved to select BUDAT from these fields of "n1558298 * table MSEG instead of MKPF. Due to this logic the "n1558298 checkpoint-group * - one SELECT command with DBI hints * - DB6, Informix, MaxDB, MSSQL : * - 3 SELECT commands who could be choosen using 3 new * related parameters pa_dbstd, pa_dbmat, pa_dbdat * * - some dynamic BREAK-POINT from checkpoint-group * MMIM_REP_MB5B implemented, use transaction SAAB * correction Nov. 2005 MM table * get the selected entry from table G_T_TOTALS READ TABLE g_t_totals_header into g_s_totals_header INDEX RS_SELFIELD-TABINDEX. table * get the selected entry from table G_T_TOTALS READ TABLE g_t_totals_item into g_s_totals_item INDEX RS_SELFIELD-TABINDEX. table * get the selected entry from table G_T_TOTALS READ TABLE g_t_totals_flat into g_s_totals_flat INDEX RS_SELFIELD-TABINDEX. T001 SELECT single BUTXT FROM T001 into g_f_butxt where bukrs = bestand-bwkey. MBEW SELECT MATNR BWKEY BWTAR LBKUM SALK3 BWTTY FROM MBEW INTO CORRESPONDING FIELDS OF TABLE L_T_MBEW WHERE MATNR IN MATNR AND BWKEY IN G_RA_BWKEY AND BWTAR IN BWTAR. EBEW SELECT MATNR BWKEY BWTAR BWTTY SUM( LBKUM ) AS LBKUM SUM( SALK3 ) AS SALK3 FROM EBEW APPENDING CORRESPONDING FIELDS OF TABLE L_T_MBEW WHERE MATNR IN MATNR AND BWKEY IN G_RA_BWKEY AND BWTAR IN BWTAR AND SOBKZ <> 'T' GROUP BY MATNR BWKEY BWTAR BWTTY. "n1227439 "n450764 "n450764 "n450764 "n450764 "n1227439 "n450764 "n450764 "n450764 "n450764 "n450764 "n450764 "SIT "n450764 "n921165 "n921165 "n921165 "n921165 "n921165 "n921165 "n921165 "n890109

QBEW SELECT MATNR BWKEY BWTAR BWTTY SUM( LBKUM ) AS LBKUM SUM( SALK3 ) AS SALK3 FROM QBEW APPENDING CORRESPONDING FIELDS OF TABLE L_T_MBEW WHERE MATNR IN MATNR AND BWKEY IN G_RA_BWKEY AND BWTAR IN BWTAR GROUP BY MATNR BWKEY BWTAR BWTTY. OBEW SELECT MATNR BWKEY BWTAR BWTTY SUM( LBKUM ) AS LBKUM SUM( SALK3 ) AS SALK3 FROM OBEW APPENDING CORRESPONDING FIELDS OF TABLE L_T_MBEW WHERE MATNR IN MATNR AND BWKEY IN G_RA_BWKEY AND BWTAR IN BWTAR GROUP BY MATNR BWKEY BWTAR BWTTY. the * select the movement types from the selected documents LOOP AT G_T_MSEG_LEAN INTO G_S_MSEG_LEAN.

"n1227439 "n450764 "n450764 "n450764 "n450764 "n450764 "n450764 "n450764 "n1227439 "n497992 "n497992 "n497992 "n497992 "n497992 "n497992 "n497992

T156M SELECT * FROM T156M INTO CORRESPONDING FIELDS OF TABLE IT156X FOR ALL ENTRIES IN IT156 WHERE BUSTM EQ IT156-BUSTM. memory * get the selected archive info structure IMPORT g_f_f4_archindex FROM MEMORY ID 'MB51_F4_ARCHINDEX'. "n1481757 "n1481757 "n1481757

Function Modules used within report and the associated call statement: ME_CHECK_T160M CALL FUNCTION 'ME_CHECK_T160M' "n497992 EXPORTING "n497992 I_ARBGB = 'M7' "n497992 I_MSGNR = '392' "n497992 EXCEPTIONS "n497992 NOTHING = 0 "n497992 OTHERS = 1. "n497992 CONVERT_DATE_TO_EXTERNAL CALL FUNCTION 'CONVERT_DATE_TO_EXTERNAL' EXPORTING DATE_INTERNAL = datum-low IMPORTING DATE_EXTERNAL = d_from EXCEPTIONS DATE_INTERNAL_IS_INVALID = 1 OTHERS = 2 . CONVERT_DATE_TO_EXTERNAL CALL FUNCTION 'CONVERT_DATE_TO_EXTERNAL' EXPORTING DATE_INTERNAL = datum-high

IMPORTING DATE_EXTERNAL EXCEPTIONS DATE_INTERNAL_IS_INVALID OTHERS .

= d_to = 1 = 2

SAPGUI_PROGRESS_INDICATOR CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR' EXPORTING TEXT = text-063. "Reading current stocks SAPGUI_PROGRESS_INDICATOR CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR' EXPORTING TEXT = text-064. "Reading MM documents

"n599218 "n599218 "n599218 "n599218 "n599218 "n599218

SAPGUI_PROGRESS_INDICATOR CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR' "n599218 EXPORTING "n599218 TEXT = text-066. "Calculating Stocks and Values "n599218 SAPGUI_PROGRESS_INDICATOR CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR' EXPORTING TEXT = text-067. "Calculating Stocks SAPGUI_PROGRESS_INDICATOR CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR' EXPORTING TEXT = text-065. "Preparing list output REUSE_ALV_LIST_DISPLAY CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY' EXPORTING I_INTERFACE_CHECK = g_flag_i_check i_callback_program = repid i_callback_pf_status_set = 'STATUS' i_callback_user_command = 'USER_COMMAND' is_layout = layout it_fieldcat = fieldcat[] it_special_groups = gruppen[] it_sort = sorttab[] i_default = 'X' i_save = 'A' is_variant = variante it_events = events[] IS_PRINT = G_S_PRINT TABLES T_OUTTAB = G_T_BELEGE1 EXCEPTIONS OTHERS = 2. "n599218 "n599218 "n599218 "n599218 "n599218 "n599218

"n599218

REUSE_ALV_LIST_DISPLAY CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY' EXPORTING I_INTERFACE_CHECK = g_flag_i_check i_callback_program = repid is_layout = g_s_layout_totals_flat it_fieldcat = g_t_fieldcat_totals_flat[]

it_sort i_default i_save is_variant it_events IS_PRINT TABLES T_OUTTAB EXCEPTIONS OTHERS

= = = = = =

g_t_sorttab 'X' "allow default variant 'A' g_s_vari_sumfl g_t_events_totals_flat[] G_S_PRINT

= g_t_totals_flat = 1.

REUSE_ALV_HIERSEQ_LIST_DISPLAY CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY' EXPORTING I_INTERFACE_CHECK = g_flag_i_check i_callback_program = repid it_events = events_hierseq[] is_layout = g_s_layout_totals_hq is_print = g_s_print it_fieldcat = g_t_fieldcat_totals_hq it_sort = g_t_SORT_totals_hq i_default = 'X' i_save = 'A' is_variant = g_s_vari_sumhq i_tabname_header = 'G_T_TOTALS_HEADER' i_tabname_item = 'G_T_TOTALS_ITEM' is_keyinfo = g_s_keyinfo_totals_hq TABLES t_outtab_header = g_t_totals_header[] t_outtab_item = g_t_totals_item[] EXCEPTIONS OTHERS = 1. MMIM_ENTRYCHECK_MAIN CALL FUNCTION 'MMIM_ENTRYCHECK_MAIN' TABLES IT_MATNR = MATNR IT_WERKS = WERKS IT_LGORT = LGORT IT_BWART = BWART IT_BUKRS = BUKRS. REUSE_ALV_VARIANT_EXISTENCE CALL FUNCTION 'REUSE_ALV_VARIANT_EXISTENCE' EXPORTING i_save = variant_save CHANGING cs_variant = def_variante. ME_CHECK_T160M CALL FUNCTION EXPORTING I_ARBGB I_MSGNR EXCEPTIONS NOTHING OTHERS 'ME_CHECK_T160M' = 'M7' = '393' = 0 = 1. "n599218 "n599218 "n599218 "n599218 "n599218 "n599218 "n599218

REUSE_ALV_VARIANT_EXISTENCE CALL FUNCTION 'REUSE_ALV_VARIANT_EXISTENCE'

EXPORTING i_save = 'A' CHANGING cs_variant = ls_vari. ME_CHECK_T160M CALL FUNCTION EXPORTING I_ARBGB I_MSGNR EXCEPTIONS NOTHING OTHERS 'ME_CHECK_T160M' = 'M7' = '393' = 0 = 1. "n599218 "n599218 "n599218 "n599218 "n599218 "n599218 "n599218

REUSE_ALV_VARIANT_DEFAULT_GET CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET' EXPORTING i_save = variant_save CHANGING cs_variant = ls_vari_def EXCEPTIONS not_found = 2. REUSE_ALV_VARIANT_F4 CALL FUNCTION 'REUSE_ALV_VARIANT_F4' EXPORTING is_variant = ls_vari i_save = 'A' * it_default_fieldcat = IMPORTING e_exit = variant_exit es_variant = ls_vari_return EXCEPTIONS not_found = 2. MB_CONTROL_MOVETYPE_GET CALL FUNCTION 'MB_CONTROL_MOVETYPE_GET' EXPORTING I_BWART = K2-BWART TABLES TE_ST156S_TAB = T_ST156S EXCEPTIONS INCONSISTENT_ENTRIES = 1 NO_ENTRIES_FOUND = 2 OTHERS = 3. CONVERSION_EXIT_ALPHA_INPUT CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT' EXPORTING input = l_value IMPORTING output = l_value. REUSE_ALV_POPUP_TO_SELECT CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT' EXPORTING i_zebra = 'X' i_tabname = 'LT_SEL' it_fieldcat = lt_fc IMPORTING "n1604106 "n1604106 "n1604106 "n1604106 "n1604106

es_selfield TABLES t_outtab

= ls_selfield = lt_sel. "n547170 "n547170 "n547170 "n547170 "n547170 "n547170 "n547170 "n547170 "n547170 "n547170 "n547170 "n547170 "n599218 "n599218 "n599218 "n599218 "n599218 "n599218 "n599218 "n599218 "n599218 "n599218 "n599218 "n599218 "n599218 "n599218 "n599218 A A A A A A A A A A A A A A

MIGO_DIALOG CALL FUNCTION 'MIGO_DIALOG' EXPORTING i_action = 'A04' i_refdoc = 'R02' i_notree = 'X' i_no_auth_check = ' ' i_deadend = 'X' i_skip_first_screen = 'X' i_okcode = 'OK_GO' i_mblnr = ls_sel-mblnr i_mjahr = ls_sel-mjahr i_zeile = ls_sel-zeile. DB_COMMIT CALL FUNCTION 'DB_COMMIT'. DDIF_NAMETAB_GET call function 'DDIF_NAMETAB_GET' exporting tabname = g_f_dcobjdef_name tables x031l_tab = g_t_x031l exceptions others = 1. DDIF_NAMETAB_GET call function 'DDIF_NAMETAB_GET' exporting tabname = g_f_dcobjdef_name tables x031l_tab = g_t_x031l exceptions others = 1. DB_COMMIT CALL FUNCTION 'DB_COMMIT'.

"n1481757

Text pool values Selection Selection Selection Selection Selection Selection Selection Selection Selection Selection Selection Selection Selection Selection Text: Text: Text: Text: Text: Text: Text: Text: Text: Text: Text: Text: Text: Text: ARCHIVE = D . XCHAR = Only Matls Handled in Batches WERKS = Plant SOBKZ = Special Stock Indicator SBBST = Special Stock P_VARI = Layout PA_AISTR = Archive Information Structure MATNR = Material Number LGORT = Storage Location LGBST = Storage Loc./Batch Stock DATUM = Selection Date CHARG = Batch BWTAR = Valuation Type BWBST = Valuated Stock

Selection Text: BWART = Movement Type Selection Text: BUKRS = Company Code Title: Stock on Posting Date Text Symbol: 084 = Without Opening Stock; With Closing Stock Text Symbol: 085 = With Opening Stock; Without Closing Stock Text Symbol: 086 = With Opening Stock; With Closing Stock; Changed Text Symbol: 087 = With Opening Stock; With Closing Stock; Unchanged Text Symbol: 088 = Note 599218 : Obsolete Parameter Set Text Symbol: 089 = Also Batches w/o Stock Segment Text Symbol: 090 = Totals Only - Hierarchical Representation Text Symbol: 091 = Layout Text Symbol: 092 = Totals Only - Non-Hierarchical Representation Text Symbol: 093 = Choose Just One Totals List Text Symbol: 094 = From Date Text Symbol: 095 = To Date Text Symbol: 096 = Opening Stock Text Symbol: 097 = Total Receipt Qties Text Symbol: 098 = Total Issue Quantities Text Symbol: 099 = Closing Stock Text Symbol: 100 = Opening Value Text Symbol: 101 = Total Receipt Values Text Symbol: 102 = Total Issue Values Text Symbol: 103 = Closing Value Text Symbol: 104 = Quantities Text Symbol: 105 = Values Text Symbol: 111 = Specification of Database Access for Best Runtime Text Symbol: 112 = Database Determines Optimum Access Text Symbol: 113 = Start Off with Material Number Text Symbol: 114 = Start Off with Selection Date Text Symbol: 115 = Database access does not match selections Text Symbol: 120 = Category Text Symbol: 131 = Archive Access Text Symbol: 132 = Display Existing (Incomplete) Data? Text Symbol: 133 = Y Text Symbol: 134 = No Text Symbol: 135 = Read MM Docs in Archive Text Symbol: 136 = Read Archive InfoRecs Text Symbol: 137 = Error Reading Archive Text Symbol: 083 = Without Opening Stock; Without Closing Stock Text Symbol: 040 = Display Options Text Symbol: 031 = Total/Value of Issues Text Symbol: 030 = Total/Val. of Receipts Text Symbol: 026 = No Reversal Movements Text Symbol: 025 = Valuation Area Text Symbol: 024 = Plant Description Text Symbol: 023 = Batch Text Symbol: 022 = Description Text Symbol: 021 = Material Text Symbol: 020 = Plant Text Symbol: 019 = Ttls Only Text Symbol: 018 = Non-Changed Stocks Only Text Symbol: 017 = Changed Stocks Only Text Symbol: 016 = Only Materials with Stock or Goods Movements Text Symbol: 015 = Only Matls Handled in Batches Text Symbol: 012 = Special Stock Text Symbol: 011 = Valuated Stock Text Symbol: 010 = Storage Loc./Batch Stock Text Symbol: 008 = Stock/Value on Text Symbol: 007 = Stock on Text Symbol: 006 = Total Issues

Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text

Symbol: Symbol: Symbol: Symbol: Symbol: Symbol: Symbol: Symbol: Symbol: Symbol: Symbol: Symbol: Symbol: Symbol: Symbol: Symbol: Symbol: Symbol: Symbol: Symbol: Symbol: Symbol: Symbol: Symbol: Symbol: Symbol: Symbol: Symbol: Symbol: Symbol: Symbol:

005 004 003 002 001 082 081 076 075 074 073 072 069 068 067 066 065 064 063 062 061 060 058 057 056 055 054 053 052 051 050

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

Total Receipts Description List Scope Stock Type Database Selections @0H\Q@ Category @0E\Q@ Category List Output with Print Function Is Without Page Numbering Restriction According to Plant is Reset Valuation Area = Company Code: Materials Without Movements Materials with Movements Opening Stock = Closing Stock <> Zero Settings Calculate Stocks Calculate Stocks and Values Prepare List Output Read MM Documents Read Current Stocks End of the List Read FI Documents Attention : Material is Tied Empties Stock Others Productn Sales Purch. Acct Assgt Organization Dates Stock Movement Data

You might also like