SAP ABAP Reports
Share| Share| 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 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 displa y 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 docum ent: 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 e ntered selection parameters after each execution. If you then call up the report in online m ode 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.
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, according to your requirements. Using the non-hierarchical display, you can map subtotals across any columns (also several levels) as well as totals across different units correctly. Note that the selected layout always refers to the selected form of the output list. Settings Options in Customizing In Customizing for Inventory Management under Reporting -> Set Print Functions for Reporting, 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.
Color numerical values You can use the Without Color indicator to specify whether the numerical values for quantity, stock, and value are highlighted in color according to their +/- sign. Positive numbers are displayed in green, negative numbers in red. Note, that highlighting using colors requires a large amount of performance. SAP recommends that this function is deactivated if you experience performance problems. The indicator Display Only Negative Stocks means that the system only displays thos stock lines that contain at least one negative stock. The indicator Display Batch Stocks allows you to display stocks and special stocks at batch level. If you do not set this indicator, the system displays the totals of the batch stocks at storage location level, and the corresponding special stock. The indicator No Zero Stock Lines allows you to hide any stock lines that do not contain any stock. 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. If you want to display the special stocks, set the indicator Also Select Special Stocks. Using the multiple selection, you can restrict the special stocks to display. The system displays all existing special stocks according to the selection data. The system displays the specification by the different special stock indicators in a separate column. This column can have the following indicators, dependent on the special stock:
E: Sales order number with item
K, M, O: Vendor number
Q: WBS element
V and W: Customer number The original fields are available for further evaluations in the field catalog.
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
restricted-use stock
blocked stock
blocked stock returns INCLUDE MMIM_ANZVAR OBJECT DOKU ID TX LANGUAGE EN Documentation extract taken from SAP system, 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
werks in werks
and
lgort in lgort
and
lgobe ne space.
T001W SELECT DISTINCT werks name1 bwkey INTO CORRESPONDING FIELDS OF TABLE g_t_organ FROM t001w WHERE werks IN werks. T001K SELECT SINGLE * FROM t001k WHERE bwkey EQ g_s_organ-bwkey. T001
SELECT SINGLE * FROM t001 WHERE bukrs EQ t001k-bukrs. T134M SELECT SINGLE * FROM t134m WHERE mtart IN matart. T023 SELECT SINGLE * FROM t023 WHERE matkl IN matkla. MARA SELECT mara~matnr werks xchar mtart matkl meins trame umlmc bwesb glgmg
"AC0K020254
"n912093
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. MARA SELECT mara~matnr werks xchar mtart matkl meins trame umlmc bwesb glgmg mara~lvorm as lvorm_mara
"AC0K020254 "912093
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. MARD SELECT matnr werks lgort labst umlme insme einme speme retme lvorm INTO (collector-matnr, collector-werks, collector-lgort, collector-labst, collector-umlme, collector-insme, collector-einme, collector-speme, collector-retme, collector-lvorm) FROM mard FOR ALL ENTRIES IN t_nobatch WHERE matnr = t_nobatch-matnr AND werks = t_nobatch-werks AND lgort IN lgort. MCHB SELECT matnr werks lgort charg clabs cumlm cinsm ceinm cspem cretm lvorm
INTO (collector-matnr, collector-werks, collector-lgort, collector-charg, collector-labst, collector-umlme, collector-insme, collector-einme, collector-speme, 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. MKOL SELECT matnr werks lgort charg sobkz lifnr slabs sinsm seinm sspem lvorm INTO (collector-matnr, collector-werks, collector-lgort, collector-charg, collector-sobkz, collector-lifnr, collector-labst, collector-insme, collector-einme, 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
and sobkz in so_sobkz. MSKU SELECT matnr werks charg sobkz kunnr kulab kuins kuein INTO (collector-matnr, collector-werks, collector-charg, collector-sobkz, collector-kunnr, collector-labst, collector-insme, 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
in
so_sobkz.
MSLB SELECT matnr werks charg sobkz lifnr lblab lbins lbein INTO (collector-matnr, collector-werks, collector-charg, collector-sobkz, collector-lifnr, collector-labst, collector-insme, collector-einme) FROM mslb FOR ALL ENTRIES IN t_mat WHERE matnr = t_mat-matnr AND werks = t_mat-werks
AND charg IN charg and sobkz
in
so_sobkz.
MSKA SELECT mska~matnr mska~werks lgort charg mska~sobkz mska~vbeln mska~posnr kalab kains kaspe kaein kzbws INTO (collector-matnr, collector-werks, collector-lgort, collector-charg, collector-sobkz, collector-vbeln, collector-posnr, collector-labst, collector-insme, collector-speme, collector-einme, collector-kzbws) FROM mska INNER JOIN mssa ON
mska~matnr = mssa~matnr
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. MSSA SELECT matnr werks sobkz vbeln posnr kzbws satra
INTO (collector-matnr, collector-werks, collector-sobkz, collector-vbeln, collector-posnr, collector-kzbws, 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. MSPR SELECT mspr~matnr mspr~werks lgort charg mspr~sobkz mspr~pspnr prlab prins prspe prein kzbws INTO (collector-matnr, collector-werks, collector-lgort, collector-charg, collector-sobkz, collector-pspnr, collector-labst, collector-insme, collector-speme, collector-einme, 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
AND mspr~werks = t_mat-werks AND mspr~lgort IN lgort AND mspr~charg IN charg. MSSQ SELECT matnr werks sobkz pspnr kzbws sqtra INTO (collector-matnr, collector-werks, collector-sobkz, collector-pspnr, collector-kzbws, 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. 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. MCHA SELECT matnr werks charg bwtar INTO CORRESPONDING FIELDS OF TABLE t_mcha FROM mcha
FOR ALL ENTRIES IN t_mchakey WHERE matnr = t_mchakey-matnr AND werks = t_mchakey-werks AND charg = t_mchakey-charg. 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. EBEW SELECT matnr bwkey bwtar sobkz vbeln posnr lbkum salk3 vprsv verpr stprs peinh INTO (t_ebew-matnr, t_ebew-bwkey, t_ebew-bwtar, t_ebew-sobkz,
t_ebew-vbeln, t_ebew-posnr,
t_ebew-lbkum, t_ebew-salk3, t_ebew-vprsv, t_ebew-verpr, t_ebew-stprs, t_ebew-peinh) FROM ebew FOR ALL ENTRIES IN t_ebewkey WHERE matnr = t_ebewkey-matnr
AND bwkey = t_ebewkey-bwkey AND bwtar = t_ebewkey-bwtar. EBEW SELECT matnr bwkey bwtar sobkz vbeln posnr lbkum salk3 vprsv verpr stprs peinh INTO (t_ebew-matnr, t_ebew-bwkey, t_ebew-sobkz,
t_ebew-bwtar,
t_ebew-vbeln, t_ebew-posnr,
t_ebew-lbkum, t_ebew-salk3, t_ebew-vprsv, t_ebew-verpr, t_ebew-stprs, t_ebew-peinh) FROM ebew FOR ALL ENTRIES IN t_ebewkey WHERE matnr = t_ebewkey-matnr AND bwkey = t_ebewkey-bwkey. QBEW SELECT matnr bwkey bwtar sobkz pspnr lbkum salk3 vprsv verpr stprs peinh INTO (t_qbew-matnr, t_qbew-bwkey, t_qbew-bwtar, t_qbew-sobkz, t_qbew-pspnr, t_qbew-lbkum, t_qbew-salk3, t_qbew-vprsv, t_qbew-verpr, t_qbew-stprs, t_qbew-peinh) FROM qbew FOR ALL ENTRIES IN t_qbewkey
WHERE matnr = t_qbewkey-matnr AND bwkey = t_qbewkey-bwkey AND bwtar = t_qbewkey-bwtar. QBEW SELECT matnr bwkey bwtar sobkz pspnr lbkum salk3 vprsv verpr stprs peinh INTO (t_qbew-matnr, t_qbew-bwkey, t_qbew-bwtar, t_qbew-sobkz, t_qbew-pspnr, t_qbew-lbkum, t_qbew-salk3, t_qbew-vprsv, t_qbew-verpr, t_qbew-stprs, t_qbew-peinh) FROM qbew FOR ALL ENTRIES IN t_qbewkey WHERE matnr = t_qbewkey-matnr AND bwkey = t_qbewkey-bwkey. 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. MMIM_REP_PRINT select single * from mmim_rep_print
where report = sy-repid.
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_EXISTENCE CALL FUNCTION 'REUSE_ALV_VARIANT_EXISTENCE' EXPORTING i_save
= 'A'
CHANGING cs_variant = def_variante. REUSE_ALV_VARIANT_DEFAULT_GET CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET' EXPORTING i_save
= 'A'
CHANGING cs_variant = def_variante
EXCEPTIONS not_found
= 2.
REUSE_ALV_VARIANT_DEFAULT_GET CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET' EXPORTING i_save
= 'A'
CHANGING cs_variant = def_variante EXCEPTIONS not_found
= 2.
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
= layout
it_fieldcat
= fieldcat[]
i_default
= 'X'
i_save
= 'A'
is_variant
= variante
it_events
= gt_events[]
i_tabname_header
= 'HEADER'
i_tabname_item
= 'BESTAND'
is_keyinfo
= keyinfo
"n667256
is_print
= alv_print
it_sort
= sort[]
it_excluding
= excluding[]
TABLES t_outtab_header
= header
t_outtab_item
= bestand
EXCEPTIONS OTHERS
= 2.
REUSE_ALV_VARIANT_F4 CALL FUNCTION 'REUSE_ALV_VARIANT_F4' EXPORTING
*
is_variant
= def_variante_f4
i_save
= 'A'
it_default_fieldcat = IMPORTING e_exit
= variant_exit
es_variant
= def_variante
EXCEPTIONS not_found = 2. DB_COMMIT CALL FUNCTION 'DB_COMMIT'.
"n667256
ME_CHECK_T160M CALL FUNCTION EXPORTING
'ME_CHECK_T160M'
"n579976 "n579976
I_ARBGB
= 'M7'
"n579976
I_MSGNR
= '393'
"n579976
EXCEPTIONS
"n579976
NOTHING
= 0
"n579976
OTHERS
= 1.
"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 . 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. GR Blocked St. Text Symbol: 026 = Value Rets Blocked Text Symbol: 025 = Value BlockedStock Text Symbol: 024 = Value Restricted Text Symbol: 023 = Value in QualInsp. Text Symbol: 022 = Value in Stock Tfr Text Symbol: 021 = Value Unrestricted Text Symbol: 020 = Val. Text Symbol: 007 = Non-Hierarchical Representation Text Symbol: 006 = Hierarchical Representation Text Symbol: 005 = Display Options
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. Tied Empties Material Valuation Area Display Ret. Transp. Packaging Display Consignment Stocks Special Stocks, Stock in Transfer at Plant Level Display Batch Stocks Display Negative Stocks Display Material Flagged for Deleti on Settings Selection: Special Stocks Scope of List Val. in Trans./Tfr Value in Transit
RM07MLBD RM07MMBL
Login
Follow the discussion
Comments There are no comments posted yet. Be the first one!
Post a new comment
Comment as a Guest, or login:
Login to IntenseDebate
Login to WordPress.com
Login to OpenID
Name Email Website (optional)
Displayed next to your comments.
Not displayed publicly.
If you have a website, link to it here.
Submit Comment
Subscribe to
Share| Search