SAP Reports / Programs | Materials Management | Inventory Management | Balance Sheet Valuation Procedures(MM-IM-VP) SAP MM

RMLIFO40 SAP ABAP Report - LIFO Valuation: Splitting/Merging Methods for Quantity Pools







RMLIFO40 is a standard Executable ABAP Report available within your SAP system (depending on your version and release level). Below is the basic information available for this SAP report including which OBJECTS it interacts with such as TABLES, FUNCTION MODULES, INCLUDES ETC. Also check out the submitted Comments related to this SAP report or see any standard documentation available.

If you would like to execute this report or see the full code listing simply enter RMLIFO40 into the relevant SAP transactions such as SE38 or SE80


Transaction Code(s):

Below is a list of transaction codes which are relevant to this SAP report

MRLE - Change Group Structure


ABAP code to call this SAP report using the submit statement

This report can be called from another progam/report simply by using the ABAP SUBMIT statement, see below for example ABAP code snipts of how to do this.






SUBMIT RMLIFO40. "Basic submit
SUBMIT RMLIFO40 AND RETURN. "Return to original report after report execution complete
SUBMIT RMLIFO40 VIA SELECTION-SCREEN. "Display selection screen of submitted report to user
    See more syntax options for the ABAP SUBMIT statement


Text pool values


Selection Text: WERTPROP = D Proportional to value
Selection Text: P_UPDT = D Database update
Selection Text: PA_ERRLS = D Output messages
Selection Text: NUR_NEU = D New pools only
Selection Text: MYPS_V3 = D Splitting as per LIFO
Selection Text: MYPS_V1 = D Proportional splitting method
Selection Text: LS_NOACT = D Errors
Selection Text: GANZZAHL = D Quantities in whole numbers
Title: LIFO Valuation: Splitting/Merging Methods for Quantity Pools
Text Symbol: 202 = Allocation
Text Symbol: 195 = Duration:
Text Symbol: 193 = Variant:
Text Symbol: 192 = Runtime of:
Text Symbol: 191 = Report Name:
Text Symbol: 190 = Program run ID:
Text Symbol: 164 = Output messages
Text Symbol: 162 = Messages
Text Symbol: 151 = Application log saved
Text Symbol: 130 = Print list
Text Symbol: 128 = Autom. preparation
Text Symbol: 127 = Merging criteria
Text Symbol: 126 = Splitting criteria
Text Symbol: 114 = Material Master:
Text Symbol: 113 = Options
Text Symbol: 203 = Value Proportional
Text Symbol: 204 = Quantity Proportional
Text Symbol: 261 = Merging
Text Symbol: 262 = Splitting
Text Symbol: 263 = LIFO rel.
Text Symbol: 266 = Pool (old)
Text Symbol: 267 = Pool (new)
Text Symbol: 268 = UoM (pool)
Text Symbol: 279 = Layer versions
Text Symbol: 321 = Material
Text Symbol: 419 = Current Values
Text Symbol: 420 = Previous Month's Values
Text Symbol: 421 = Values for Previous Year
Text Symbol: 519 = Current Quantities





Text Symbol: 520 = Quantities f. Prev. Month
Text Symbol: 521 = Quantities f. Prev. Year
Text Symbol: 112 = Layer and material master
Text Symbol: 010 = Year Pe Layer qty Net value Net price Gross value Gross price PU Material
Text Symbol: 011 = E R R O R S
Text Symbol: 012 = V Pool ValA
Text Symbol: 017 = To:
Text Symbol: 020 = Splitting method: compile layer proportionally
Text Symbol: 021 = Splitting method: dissolve layer structure
Text Symbol: 022 = Splitting method: dissolve layer as per LIFO
Text Symbol: 033 = No data updated
Text Symbol: 035 = Price Changes:
Text Symbol: 036 = Records Updated
Text Symbol: 037 = BTCI entries created
Text Symbol: 038 = Record(s) deleted
Text Symbol: 039 = Record(s) created
Text Symbol: 040 = Record(s) Changed
Text Symbol: 041 = Price change docs created:
Text Symbol: 042 = Database Updates:
Text Symbol: 043 = Material Ledger:
Text Symbol: 044 = Records Read
Text Symbol: 046 = Val. Alternatives:
Text Symbol: 047 = Records Updated
Text Symbol: 050 = Before
Text Symbol: 051 = -
Text Symbol: 052 = +
Text Symbol: 053 = After
Text Symbol: 058 = List empty
Text Symbol: 059 = <-- Caution!
Text Symbol: 071 = Company Code
Text Symbol: 080 = *** Layer dissolved ***
Text Symbol: 081 = *** Layer reduced ***
Text Symbol: 082 = *** Layer created ***
Text Symbol: 083 = *** Layer increased ***
Text Symbol: 084 = *** Layer unchanged ***
Text Symbol: 090 = -> reduced as a whole
Text Symbol: 091 = -> increased as a whole
Text Symbol: 100 = Splitting method
Text Symbol: 101 = Settings





Text Symbol: 107 = Proportional allocation
Text Symbol: 108 = Dissolve layer structure
Text Symbol: 109 = Dissolve as per LIFO
Text Symbol: 111 = Update results


INCLUDES used within this REPORT RMLIFO40

INCLUDE MRYTAB01.
INCLUDE MRYTAB03.
INCLUDE MRYDAT01.
INCLUDE MRYDAT03.
INCLUDE MRYDAT04.
INCLUDE MRYDAT06.
INCLUDE MRYMAC01.
INCLUDE RMLIFO40_I_ALV.


TABLES used within REPORT and the associated SELECT statement:

No SAP DATABASE tables are accessed within this REPORT code!


Function Modules used within report and the associated call statement:

MY_APPLICATION_LOG_DISPLAY CALL FUNCTION 'MY_APPLICATION_LOG_DISPLAY' EXPORTING i_prgid = sniwe-prgid i_repid = sniwe-repid i_tcode = sniwe-tcode.

MY_SPLIT_TABLES_FILL CALL FUNCTION 'MY_SPLIT_TABLES_FILL'.

MY_LAYER_VERSIONS_TIE_POPUP CALL FUNCTION 'MY_LAYER_VERSIONS_TIE_POPUP' TABLES t_tie_myver = tab_tie_myver CHANGING xs_niwef1 = sniwef1 x_selc = selc_flag.

MY_VALUATION_LEVEL_GET CALL FUNCTION 'MY_VALUATION_LEVEL_GET' EXPORTING i_myxxfo = lifo IMPORTING e_val_level = level e_mymp_level = mymp_level e_tcurm = tcurm.

MY_VALUATION_AREAS_GET CALL FUNCTION 'MY_VALUATION_AREAS_GET' EXPORTING i_level = level i_mymp_level = mymp_level i_actvt = sniwe-actvt i_myxxfo = lifo i_mykey_source = x IMPORTING et_bwkeys_werks = tab_bwkeys_werks TABLES tra_bukrs = ra_bukrs tra_bwkey = ra_bwkey tra_mykey = ra_mykey.

T001_SINGLE_READ CALL FUNCTION 'T001_SINGLE_READ' EXPORTING bukrs = i_bukrs IMPORTING wt001 = t001 EXCEPTIONS not_found = 4 wrong_call = 8.

DATE_TO_PERIOD_CONVERT CALL FUNCTION 'DATE_TO_PERIOD_CONVERT' EXPORTING i_date = sy-datlo i_periv = t001-periv IMPORTING e_gjahr = ajahr e_buper = apoper EXCEPTIONS OTHERS = 1.

LAST_DAY_IN_YEAR_GET CALL FUNCTION 'LAST_DAY_IN_YEAR_GET' EXPORTING i_date = sy-datlo i_periv = t001-periv IMPORTING e_date = ldatum.

DATE_TO_PERIOD_CONVERT CALL FUNCTION 'DATE_TO_PERIOD_CONVERT' EXPORTING i_date = ldatum i_periv = t001-periv IMPORTING e_buper = lpoper.

TPOOL_SINGLE_READ CALL FUNCTION 'TPOOL_SINGLE_READ' EXPORTING tpool_mykey = mykey tpool_mypool = opooln IMPORTING wtpool = tpool EXCEPTIONS not_found = 1 OTHERS = 2.

TPOOL_SINGLE_READ CALL FUNCTION 'TPOOL_SINGLE_READ' EXPORTING tpool_mykey = mykey tpool_mypool = npooln IMPORTING wtpool = tpool EXCEPTIONS not_found = 1 OTHERS = 2.

MY_VALUATION_AREAS_GET CALL FUNCTION 'MY_VALUATION_AREAS_GET' EXPORTING i_level = level i_mymp_level = mymp_level i_actvt = sniwe-actvt i_myxxfo = lifo i_mykey_source = x TABLES tra_bukrs = ra_bukrs tra_bwkey = ra_bwkey tra_mykey = ra_mykey tra_mymp = ra_mymp.

TPOOL_SINGLE_READ



CALL FUNCTION 'TPOOL_SINGLE_READ' EXPORTING tpool_mykey = imyps1-mykey tpool_mypool = opooln IMPORTING wtpool = tpool EXCEPTIONS not_found = 1 OTHERS = 2.

MATERIAL_READ_MAKF CALL FUNCTION 'MATERIAL_READ_MAKF' EXPORTING schluessel = mtcom IMPORTING matdaten = mt08y return = errfield TABLES seqmat01 = dummy EXCEPTIONS account_not_found = 4 material_not_found = 8.

TPOOL_SINGLE_READ CALL FUNCTION 'TPOOL_SINGLE_READ' EXPORTING tpool_mykey = imyps2-mykey tpool_mypool = opooln IMPORTING wtpool = tpool EXCEPTIONS not_found = 1 OTHERS = 2.

MY_POOL_LAYER_ARRAY_FETCH CALL FUNCTION 'MY_POOL_LAYER_ARRAY_FETCH' TABLES r_myver = ra_myver r_mykey = ra_mykey r_mypol = ra_pooln t_mypl = tab_mypl t_myplm = tab_myplm EXCEPTIONS no_pool = 4.

MY_POOL_LAYER_ARRAY_FETCH CALL FUNCTION 'MY_POOL_LAYER_ARRAY_FETCH' TABLES r_myver = ra_myver r_mykey = ra_mykey r_mypol = ra_pooln t_mypl = tab_mypl t_myplm = tab_myplm EXCEPTIONS no_pool = 4.

MY_POOL_LAYER_ARRAY_FETCH CALL FUNCTION 'MY_POOL_LAYER_ARRAY_FETCH' TABLES r_myver = ra_myver r_mykey = ra_mykey r_mypol = ra_pooln t_mypl = tab_mypl t_myplm = tab_myplm EXCEPTIONS no_pool = 4.

MY_POOL_LAYER_SINGLE_READ CALL FUNCTION 'MY_POOL_LAYER_SINGLE_READ' EXPORTING i_myhist = myhist i_myver = xmyver i_mykey = xmykey i_pooln = xmypol i_gjahr = xgjahr i_myper = xmyper IMPORTING e_mypl = mypl e_myplm = myplm EXCEPTIONS not_found = 4.

MY_MATERIAL_LAYER_ARRAY_FETCH CALL FUNCTION 'MY_MATERIAL_LAYER_ARRAY_FETCH' TABLES r_myver = ra_myver r_mykey = ra_mykey r_matnr = ra_matnr t_myml = tab_myml t_mymlm = tab_mymlm EXCEPTIONS no_material = 4.

MY_VALUATION_AREAS_GET CALL FUNCTION 'MY_VALUATION_AREAS_GET' EXPORTING i_level = level i_mymp_level = mymp_level i_actvt = sniwe-actvt i_myxxfo = lifo TABLES tra_bukrs = ra_bukrs tra_bwkey = ra_bwkey tra_mykey = ra_mykey tra_mymp = ra_mymp.

MY_POOL_LAYER_DELETE CALL FUNCTION 'MY_POOL_LAYER_DELETE' EXPORTING i_poollayer = *myplm i_tcode = c_tcode CHANGING c_delete_count = mysta-delct EXCEPTIONS not_found = 4.

MY_POOL_LAYER_UPDATE CALL FUNCTION 'MY_POOL_LAYER_UPDATE' EXPORTING i_poollayer = *myplm i_tcode = c_tcode CHANGING c_insert_count = mysta-insct c_update_count = mysta-updct EXCEPTIONS not_found = 4.

MY_MATERIAL_LAYER_DELETE CALL FUNCTION 'MY_MATERIAL_LAYER_DELETE' EXPORTING i_matlayer = *mymlm i_tcode = c_tcode CHANGING c_delete_count = mysta-delct EXCEPTIONS not_found = 4.

MY_MATERIAL_LAYER_UPDATE CALL FUNCTION 'MY_MATERIAL_LAYER_UPDATE' EXPORTING i_matlayer = *mymlm i_tcode = c_tcode CHANGING c_insert_count = mysta-insct c_update_count = mysta-updct EXCEPTIONS not_found = 4.

ENQUEUE_EMMBEWE CALL FUNCTION 'ENQUEUE_EMMBEWE' EXPORTING matnr = trm08l-matnr bwkey = ra_bwkey-low bwtar = space EXCEPTIONS foreign_lock = 4 system_failure = 8.

DEQUEUE_EMMBEWE CALL FUNCTION 'DEQUEUE_EMMBEWE' EXPORTING matnr = trm08l-matnr bwkey = ra_bwkey-low bwtar = space.

ENQUEUE_EMYMS CALL FUNCTION 'ENQUEUE_EMYMS' EXPORTING mykey = ra_mymp-low matnr = trm08l-matnr EXCEPTIONS foreign_lock = 4 system_failure = 8.

DEQUEUE_EMYMS CALL FUNCTION 'DEQUEUE_EMYMS' EXPORTING mykey = ra_mymp-low matnr = trm08l-matnr.

MY_MATERIAL_DATA_GET CALL FUNCTION 'MY_MATERIAL_DATA_GET' EXPORTING is_mypar = mypar is_niwe = sniwe i_level = level i_matnr = myms-matnr i_mykey = i_mykey it_bwkeys_werks = tab_bwkeys_werks is_pool = tpool CHANGING xs_niwemat = sniwemat EXCEPTIONS unit_conversion_error = 1 account_assignment_error = 2 mtart_check = 3 OTHERS = 4.



Contribute (Add Comments)

Although this basic information may have limited use it does provide an easy to find location to store any knowledge about this program/report.

The contribute/comments section below therefore offer's an opportunity for anyone to add additional information. This can be anything from useful hints, tips and screen shots to relevant SAP notes or anything else you feel is relevant to this report.

This will then be available for everyone to easily find by simply searching on the report name RMLIFO40 or its description.