SAP ABAP ReportsShare| Comments (0) RM07MLBS SAP Report - Display Warehouse Stocks of Material RM07MLBS is a standard ABAP report available within your SAP system (depending on 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 tables, function modules, includes etc. If you would like to see the full code listing simply enter the object name( RM07MLBS ) into the relevant SAP transaction such as SE38 or SE80 Within the comments section below there is also an opportunity for anyone to be able add useful hints and information specific to this SAP object. This means that you and other users will be able to find these details quickly by simply searching on the object name. SAP Documentation for program RM07MLBS TRANSACTION CODE: MB52 TITLE Warehouse Stocks for Material PURPOSE You use this report to display the total stock of a material (quantity and value) at plant and storage location level. If transit stocks or stock transfer stocks exist at plant level, the system totals these stocks and displays them in the column In Stock Transfer in a stock line without a storage location. Note that in this report, the stock value of the warehouse stock is calculated using the following simplified formula: Stock value = quantity x value/valuated stock Therefore the stock value specified here only has informal characters and does not represent the actual stock value. PREREQUISITES Authorization check You need authorization to display material master data for all chosen plants (authorization object Material Master: Plant , activity 03). If you want to display stock values, you also need authorization to display accounting documents for the relevant company codes (authorization object Accounting document: Authorization for company codes, activity 03). If you do not have this authorization, the system issues a warning. The system only displays the stock quantities without values for the relevant company codes. FEATURES In online mode, the report notes your entered selection parameters after each execution. If you then call up the report in online mode again, the system reads the held selection parameters and proposes them on the initial screen. In background processing, the parameters are set according to the variant. In the output list, the system displays existing deletion flags in a separate column. These deletion flags can be placed at different levels in the material master record. If you require a selection by deletion flag, you can perform this selection using the SAP List Viewer for each stock line. Color numerical values You can use the Without Color indicator to specify whether the numerical values for quantity. stock. negative numbers in red. you can map subtotals across any columns (also several levels) as well as totals across different units correctly.sign. Note that the selected layout always refers to the selected form of the output list. The indicator No Zero Stock Lines allows you to hide any stock lines that do not contain any stock. SELECTION INCLUDE MMIM_SELEKTION OBJECT DOKU ID TX LANGUAGE EN OUTPUT INCLUDE MMIM_BELEGE_PRO_MATERIAL OBJECT DOKU ID TX LANGUAGE EN unrestricted-use stock stock in transfer stock in quality inspection . that highlighting using colors requires a large amount of performance. The system displays the specification by the different special stock indicators in a separate column. SAP recommends that this function is deactivated if you experience performance problems. you can specify the following: Switch the non-hierarchical list to ALV Grid Control You can use the indicator Grid Control to specify whether the non-hierarchical list is displayed as an ALV Grid Control or as a standard SAP List Viewer list. Using the non-hierarchical display. O: Vendor number Q: WBS element V and W: Customer number The original fields are available for further evaluations in the field catalog. If you want to display the special stocks. Note. set the indicator Also Select Special Stocks. The indicator Do Not Display Values allows you to hide the values if you do not need to display the stock values for the stock quantities. Using the multiple selection. The indicator Display Batch Stocks allows you to display stocks and special stocks at batch level. and value are highlighted in color according to their +/. The indicator Display Only Negative Stocks means that the system only displays thos stock lines that contain at least one negative stock. Positive numbers are displayed in green. you can restrict the special stocks to display. and the corresponding special stock. according to your requirements. Settings Options in Customizing In Customizing for Inventory Management under Reporting -> Set Print Functions for Reporting. the system displays the totals of the batch stocks at storage location level.You can use the two indicators Hierarchy Display (lists with header lines and subordinate item lines) and Non-Hierarchical Display to specify the form of the output list on the initial screen. dependent on the special stock: E: Sales order number with item K. If you do not set this indicator. M. This column can have the following indicators. The system displays all existing special stocks according to the selection data. Copyright (c) SAP AG Includes used within report: No INCLUDES are used within this report code! Tables used within report and the associated select statement: T001L select werks lgort lgobe from t001l into corresponding fields of table g_t_t001l where and and T001W SELECT DISTINCT werks name1 bwkey INTO CORRESPONDING FIELDS OF TABLE g_t_organ FROM t001w WHERE werks IN werks. . restricted-use stock blocked stock blocked stock returns INCLUDE MMIM_ANZVAR OBJECT DOKU ID TX LANGUAGE EN Documentation extract taken from SAP system. T001 werks in werks lgort in lgort lgobe ne space. T001K SELECT SINGLE * FROM t001k WHERE bwkey EQ g_s_organ-bwkey. MARA SELECT mara~matnr werks xchar mtart matkl meins trame umlmc bwesb glgmg mara~lvorm as lvorm_mara "AC0K020254 "912093 "AC0K020254 "n912093 .SELECT SINGLE * FROM t001 WHERE bukrs EQ t001k-bukrs. MARA SELECT mara~matnr werks xchar mtart matkl meins trame umlmc bwesb glgmg mara~lvorm as lvorm_mara marc~lvorm as lvorm_marc INTO CORRESPONDING FIELDS OF TABLE t_mat FROM mara INNER JOIN marc ON mara~matnr = marc~matnr for all entries in matnr WHERE mara~matnr = matnr-low AND werks IN werks AND mtart IN matart AND matkl IN matkla AND ekgrp IN ekgrup. T134M SELECT SINGLE * FROM t134m WHERE mtart IN matart. T023 SELECT SINGLE * FROM t023 WHERE matkl IN matkla. collector-speme. MCHB SELECT matnr werks lgort charg clabs cumlm cinsm ceinm cspem cretm lvorm . collector-einme. collector-lgort. collector-retme.marc~lvorm as lvorm_marc INTO CORRESPONDING FIELDS OF TABLE t_mat FROM mara INNER JOIN marc ON mara~matnr = marc~matnr WHERE mara~matnr IN matnr AND werks IN werks AND mtart IN matart AND matkl IN matkla AND ekgrp IN ekgrup. collector-insme. collector-umlme. collector-werks. collector-lvorm) FROM mard FOR ALL ENTRIES IN t_nobatch WHERE matnr = t_nobatch-matnr AND werks = t_nobatch-werks AND lgort IN lgort. MARD SELECT matnr werks lgort labst umlme insme einme speme retme lvorm INTO (collector-matnr. collector-labst. collector-labst. collector-insme. collector-werks. collector-einme. collector-umlme. collector-werks. collector-speme. collector-lvorm) FROM mkol FOR ALL ENTRIES IN t_mat WHERE matnr = t_mat-matnr AND werks = t_mat-werks AND lgort IN lgort AND charg IN charg . collector-labst. collector-einme. collector-charg. collector-retme. collector-lvorm) FROM mchb FOR ALL ENTRIES IN t_batch WHERE matnr = t_batch-matnr AND werks = t_batch-werks AND lgort IN lgort AND charg IN charg. collector-lgort. MKOL SELECT matnr werks lgort charg sobkz lifnr slabs sinsm seinm sspem lvorm INTO (collector-matnr.INTO (collector-matnr. collector-speme. collector-sobkz. collector-lifnr. collector-lgort. collector-charg. collector-insme. . collector-charg. collector-insme. collector-sobkz. collector-sobkz. collector-insme. collector-werks. collector-werks. MSKU SELECT matnr werks charg sobkz kunnr kulab kuins kuein INTO (collector-matnr.and sobkz in so_sobkz. collector-lifnr. collector-charg. collector-labst. collector-labst. collector-kunnr. collector-einme) FROM mslb FOR ALL ENTRIES IN t_mat WHERE matnr = t_mat-matnr AND werks = t_mat-werks in so_sobkz. collector-einme) FROM msku FOR ALL ENTRIES IN t_mat WHERE matnr = t_mat-matnr AND werks = t_mat-werks AND charg IN charg and sobkz MSLB SELECT matnr werks charg sobkz lifnr lblab lbins lbein INTO (collector-matnr. collector-vbeln. collector-werks. collector-labst. AND mska~werks = mssa~werks AND mska~sobkz = mssa~sobkz AND mska~vbeln = mssa~vbeln AND mska~posnr = mssa~posnr FOR ALL ENTRIES IN t_mat WHERE mska~matnr = t_mat-matnr AND mska~werks = t_mat-werks AND mska~lgort IN lgort AND mska~charg IN charg. collector-speme. collector-charg. collector-lgort. collector-insme. collector-einme. collector-posnr. MSSA SELECT matnr werks sobkz vbeln posnr kzbws satra . collector-kzbws) FROM mska INNER JOIN mssa ON mska~matnr = mssa~matnr in so_sobkz. collector-sobkz.AND charg IN charg and sobkz MSKA SELECT mska~matnr mska~werks lgort charg mska~sobkz mska~vbeln mska~posnr kalab kains kaspe kaein kzbws INTO (collector-matnr. collector-speme. collector-insme. MSPR SELECT mspr~matnr mspr~werks lgort charg mspr~sobkz mspr~pspnr prlab prins prspe prein kzbws INTO (collector-matnr. collector-sobkz. collector-werks. collector-vbeln. collector-werks. collector-charg. collector-kzbws) FROM mspr INNER JOIN mssq ON mspr~matnr = mssq~matnr AND mspr~werks = mssq~werks AND mspr~sobkz = mssq~sobkz AND mspr~pspnr = mssq~pspnr FOR ALL ENTRIES IN t_mat WHERE mspr~matnr = t_mat-matnr .INTO (collector-matnr. collector-labst. collector-einme. collector-posnr. collector-sobkz. collector-umlme) FROM mssa FOR ALL ENTRIES IN t_mat WHERE matnr = t_mat-matnr AND werks = t_mat-werks and sobkz in so_sobkz AND satra <> 0. collector-kzbws. collector-lgort. collector-pspnr. collector-sobkz. collector-pspnr.AND mspr~werks = t_mat-werks AND mspr~lgort IN lgort AND mspr~charg IN charg. collector-umlme) FROM mssq FOR ALL ENTRIES IN t_mat WHERE matnr = t_mat-matnr AND werks = t_mat-werks and sobkz in so_sobkz AND sqtra <> 0. collector-werks. MCHA SELECT matnr werks charg bwtar INTO CORRESPONDING FIELDS OF TABLE t_mcha FROM mcha . MAKT SELECT matnr maktx INTO CORRESPONDING FIELDS OF TABLE t_makt FROM makt FOR ALL ENTRIES IN t_maktkey WHERE matnr = t_maktkey-matnr AND spras = sy-langu. collector-kzbws. MSSQ SELECT matnr werks sobkz pspnr kzbws sqtra INTO (collector-matnr. t_ebew-bwtar.FOR ALL ENTRIES IN t_mchakey WHERE matnr = t_mchakey-matnr AND werks = t_mchakey-werks AND charg = t_mchakey-charg. t_ebew-sobkz. t_ebew-bwkey. EBEW SELECT matnr bwkey bwtar sobkz vbeln posnr lbkum salk3 vprsv verpr stprs peinh INTO (t_ebew-matnr. MBEW SELECT matnr bwkey bwtar lbkum salk3 vprsv verpr stprs peinh "353428 INTO CORRESPONDING FIELDS OF TABLE t_mbew FROM mbew FOR ALL ENTRIES IN t_mbewkey WHERE matnr = t_mbewkey-matnr AND bwkey = t_mbewkey-bwkey AND bwtar = t_mbewkey-bwtar. t_ebew-stprs. t_ebew-lbkum. t_ebew-vbeln. t_ebew-posnr. t_ebew-peinh) FROM ebew FOR ALL ENTRIES IN t_ebewkey WHERE matnr = t_ebewkey-matnr . t_ebew-verpr. t_ebew-salk3. t_ebew-vprsv. t_qbew-sobkz. t_ebew-stprs. t_ebew-sobkz. t_qbew-vprsv.AND bwkey = t_ebewkey-bwkey AND bwtar = t_ebewkey-bwtar. t_ebew-verpr. t_ebew-lbkum. t_ebew-vbeln. t_qbew-bwtar. t_qbew-pspnr. QBEW SELECT matnr bwkey bwtar sobkz pspnr lbkum salk3 vprsv verpr stprs peinh INTO (t_qbew-matnr. t_ebew-peinh) FROM ebew FOR ALL ENTRIES IN t_ebewkey WHERE matnr = t_ebewkey-matnr AND bwkey = t_ebewkey-bwkey. t_qbew-bwkey. t_qbew-salk3. t_ebew-bwkey. t_ebew-posnr. t_ebew-bwtar. t_qbew-verpr. t_ebew-salk3. t_qbew-lbkum. t_ebew-vprsv. t_qbew-peinh) FROM qbew FOR ALL ENTRIES IN t_qbewkey . t_qbew-stprs. EBEW SELECT matnr bwkey bwtar sobkz vbeln posnr lbkum salk3 vprsv verpr stprs peinh INTO (t_ebew-matnr. QBEW SELECT matnr bwkey bwtar sobkz pspnr lbkum salk3 vprsv verpr stprs peinh INTO (t_qbew-matnr. T134M SELECT bwkey mtart wertu INTO CORRESPONDING FIELDS OF TABLE t_t134m FROM t134m FOR ALL ENTRIES IN t_t134mkey WHERE bwkey = t_t134mkey-bwkey AND mtart = t_t134mkey-mtart. t_qbew-pspnr. t_qbew-sobkz. MMIM_REP_PRINT select single * from mmim_rep_print . t_qbew-lbkum. t_qbew-salk3. t_qbew-verpr. t_qbew-stprs. t_qbew-bwtar. t_qbew-vprsv. t_qbew-peinh) FROM qbew FOR ALL ENTRIES IN t_qbewkey WHERE matnr = t_qbewkey-matnr AND bwkey = t_qbewkey-bwkey. t_qbew-bwkey.WHERE matnr = t_qbewkey-matnr AND bwkey = t_qbewkey-bwkey AND bwtar = t_qbewkey-bwtar. REUSE_ALV_VARIANT_EXISTENCE CALL FUNCTION 'REUSE_ALV_VARIANT_EXISTENCE' EXPORTING i_save CHANGING cs_variant = def_variante.where report = sy-repid. REUSE_ALV_VARIANT_DEFAULT_GET CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET' EXPORTING i_save CHANGING cs_variant = def_variante = 'A' = 'A' . Function Modules used within report and the associated call statement: MMIM_ENTRYCHECK_MAIN CALL FUNCTION 'MMIM_ENTRYCHECK_MAIN' TABLES it_matnr = matnr it_werks = werks it_lgort = lgort it_ekgrp = ekgrup it_sobkz = so_sobkz. REUSE_ALV_VARIANT_DEFAULT_GET CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET' EXPORTING i_save CHANGING cs_variant = def_variante EXCEPTIONS not_found = 2. = 'A' REUSE_ALV_HIERSEQ_LIST_DISPLAY CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY' EXPORTING I_INTERFACE_CHECK = l_f_check i_callback_program = repid is_layout it_fieldcat i_default i_save is_variant it_events i_tabname_header i_tabname_item is_keyinfo = layout = fieldcat[] = 'X' = 'A' = variante = gt_events[] = 'HEADER' = 'BESTAND' = keyinfo "n667256 .EXCEPTIONS not_found = 2. ME_CHECK_T160M CALL FUNCTION EXPORTING 'ME_CHECK_T160M' "n579976 "n579976 "n667256 .is_print it_sort it_excluding TABLES t_outtab_header t_outtab_item EXCEPTIONS OTHERS REUSE_ALV_VARIANT_F4 = alv_print = sort[] = excluding[] = header = bestand = 2. CALL FUNCTION 'REUSE_ALV_VARIANT_F4' EXPORTING is_variant i_save * = def_variante_f4 = 'A' it_default_fieldcat = IMPORTING e_exit es_variant EXCEPTIONS not_found = 2. = variant_exit = def_variante DB_COMMIT CALL FUNCTION 'DB_COMMIT'. "n579976 "n579976 Text pool values Selection Text: CHARG = Batch Selection Text: EKGRUP = Purchasing Group Selection Text: LGORT = Storage Location Selection Text: MATART = Material Type Selection Text: MATKLA = Material Group Selection Text: MATNR = Material Selection Text: NEGATIV = Display Negative Stocks Only Selection Text: NOZERO = D . GR Blocked St. Text Symbol: 022 = Value in Stock Tfr Text Symbol: 021 = Value Unrestricted Text Symbol: 020 = Val. Text Symbol: 026 = Value Rets Blocked Text Symbol: 025 = Value BlockedStock Text Symbol: 024 = Value Restricted Text Symbol: 023 = Value in QualInsp.I_ARBGB I_MSGNR EXCEPTIONS NOTHING OTHERS = 'M7' = '393' "n579976 "n579976 "n579976 = 0 = 1. Selection Text: XMCHB = Display Batch Stocks Selection Text: WERKS = Plant Selection Text: SO_SOBKZ = Special Stock Indicator Selection Text: P_VARI = Layout Selection Text: PA_SOND = Also Select Special Stocks Selection Text: NOVALUES = Do Not Display Values Title: Display Warehouse Stocks of Material Text Symbol: 165 = Following entries missing from table MBEW: Text Symbol: 200 = Read warehouse stocks Text Symbol: 201 = Read batch stocks Text Symbol: 202 = Read special stocks Text Symbol: 203 = Read batch master Text Symbol: 204 = Read material valuation Text Symbol: 205 = Read material short texts Text Symbol: 206 = Read material master Text Symbol: 207 = Data being prepared Text Symbol: 895 = Error during INSERT in table MMIM_RE_PRINT Text Symbol: 027 = Val. Text Symbol: 007 = Non-Hierarchical Representation Text Symbol: 006 = Hierarchical Representation Text Symbol: 005 = Display Options . Packaging Display Consignment Stocks Special Stocks. or login: Login to IntenseDebate Login to WordPress. Tied Empties Material Valuation Area Display Ret. Not displayed publicly./Tfr Value in Transit RM07MLBD RM07MMBL Login Follow the discussion Comments There are no comments posted yet. . Transp. Be the first one! Post a new comment Comment as a Guest. Stock in Transfer at Plant Level Display Batch Stocks Display Negative Stocks Display Material Flagged for Deletion Settings Selection: Special Stocks Scope of List Val.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: 001 028 160 111 110 101 100 095 090 080 071 070 030 029 = = = = = = = = = = = = = = Database Selections Val. in Trans.com Login to OpenID Name Email Website (optional) Displayed next to your comments. Submit Comment Subscribe to Share| Search .If you have a website. link to it here.