SAP Reports / Programs

RMLIFO42 SAP ABAP Report - LIFO Valuation: Aggregate Old Layers







RMLIFO42 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 RMLIFO42 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

MRLG - Aggregate Layer


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 RMLIFO42. "Basic submit
SUBMIT RMLIFO42 AND RETURN. "Return to original report after report execution complete
SUBMIT RMLIFO42 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: S_POOLN = D LIFO Pool
Selection Text: S_MATNR = D Material
Selection Text: P_UPDT = D Database Update
Selection Text: P_MYPER = D Posting Period
Selection Text: P_GJAHR = D Fiscal Year
Selection Text: PA_VERSI = D Layer Version
Selection Text: PA_METHD = D LIFO/FIFO Method
Selection Text: PA_EBENE = D LIFO Valuation Level
Title: LIFO Valuation: Aggregate Old Layers
Text Symbol: 109 = Restriction of Selection
Text Symbol: 111 = Update
Text Symbol: 112 = Aggregate Layer
Text Symbol: 113 = Aggregate Data to
Text Symbol: 114 = Material Master:
Text Symbol: 115 = LIFO Method
Text Symbol: 127 = Procedures
Text Symbol: 130 = Print List
Text Symbol: 151 = Application log saved
Text Symbol: 162 = Messages
Text Symbol: 164 = Output messages
Text Symbol: 190 = Program Run ID:
Text Symbol: 191 = Report Name:
Text Symbol: 192 = Runtime of:
Text Symbol: 193 = Variant:
Text Symbol: 195 = Duration:
Text Symbol: 001 = |Material no. |Year Pe| Layer qty |Layer qty in stchkpUn | Layer value gross| Layer value net |
Text Symbol: 002 = |Pool|Year Pe| Layer qty | Layer qty in PoolUn | Layer value gross| Layer value net |
Text Symbol: 003 = A G G R E G A T E O L D L A Y E R
Text Symbol: 004 = Page
Text Symbol: 017 = To:
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 = Records Deleted
Text Symbol: 039 = Records Created
Text Symbol: 040 = Records Updated
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: 058 = List empty!
Text Symbol: 059 = <-- Caution
Text Symbol: 070 = Plant
Text Symbol: 071 = Company Code
Text Symbol: 104 = Layer Version
Text Symbol: 106 = Fiscal Year
Text Symbol: 107 = Posting Period


INCLUDES used within this REPORT RMLIFO42

INCLUDE MRYTAB01.
INCLUDE MRYTAB03.
INCLUDE MRYPAR01.
INCLUDE MRYPAR02.
INCLUDE MRYDAT01.
INCLUDE MRYDAT03.
INCLUDE MRYDAT04.
INCLUDE MRYDAT06.
INCLUDE MRYMAC01.
INCLUDE MRYF_COMMON_ROUTINES_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_VALUATION_LEVEL_GET CALL FUNCTION 'MY_VALUATION_LEVEL_GET' EXPORTING i_myxxfo = lifo IMPORTING e_val_level = level e_mymp_level = mymp_level.

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

MY_METHOD_F4_HELP CALL FUNCTION 'MY_METHOD_F4_HELP' EXPORTING i_repid = sy-repid i_dynnr = sy-dynnr i_field = 'PA_METHD' i_myxxfo = c_myxxfo i_no_indx = x.

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

MY_VERSION_AND_METHOD_CHECK CALL FUNCTION 'MY_VERSION_AND_METHOD_CHECK' EXPORTING i_mykey = pa_ebene i_myxxfo = lifo IMPORTING e_my05 = tmy05 CHANGING x_myver = pa_versi x_method = pa_methd.

MY_PARAMETERS_GET CALL FUNCTION 'MY_PARAMETERS_GET' EXPORTING i_bukrs = bukrs i_mykey = pa_ebene i_method = pa_methd i_myxxfo = lifo IMPORTING e_mypar = mypar.

DATE_TO_PERIOD_CONVERT CALL FUNCTION 'DATE_TO_PERIOD_CONVERT' EXPORTING i_date = sy-datlo i_periv = mypar-periv IMPORTING e_gjahr = lfd_jahr.

TPOOL_SINGLE_READ





CALL FUNCTION 'TPOOL_SINGLE_READ' EXPORTING tpool_mykey = pa_ebene tpool_mypool = *myms-mypool 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.

MY_POOL_LAYER_ARRAY_FETCH CALL FUNCTION 'MY_POOL_LAYER_ARRAY_FETCH' EXPORTING i_mypar = mypar TABLES r_myver = ra_myver r_mykey = ra_mykey r_mypol = ra_pooln r_gjahr = ra_gjahr r_period = ra_period t_mypl = tab_mypl t_myplm = tab_myplm EXCEPTIONS no_pool = 4.

UNIT_CONVERSION_SIMPLE CALL FUNCTION 'UNIT_CONVERSION_SIMPLE' EXPORTING input = -mymng unit_in = -meins unit_out = tpool-meins IMPORTING output = new_mymng EXCEPTIONS conversion_not_found = 1 unit_in_not_found = 2 unit_out_not_found = 3.

UNIT_CONVERSION_SIMPLE CALL FUNCTION 'UNIT_CONVERSION_SIMPLE' EXPORTING input = -mymng unit_in = -meins unit_out = tpool-meins IMPORTING output = new_mymng EXCEPTIONS conversion_not_found = 1 unit_in_not_found = 2 unit_out_not_found = 3.

MY_MATERIAL_LAYER_ARRAY_FETCH CALL FUNCTION 'MY_MATERIAL_LAYER_ARRAY_FETCH' EXPORTING i_mypar = mypar TABLES r_myver = ra_myver r_mykey = ra_mykey r_matnr = ra_matnr r_gjahr = ra_gjahr r_period = ra_period t_myml = tab_myml t_mymlm = tab_mymlm EXCEPTIONS no_material = 4.

UNIT_CONVERSION_SIMPLE CALL FUNCTION 'UNIT_CONVERSION_SIMPLE' EXPORTING input = -mymng unit_in = -meins unit_out = mt08y-meins IMPORTING output = new_mymng EXCEPTIONS conversion_not_found = 1 unit_in_not_found = 2 unit_out_not_found = 3.

UNIT_CONVERSION_SIMPLE CALL FUNCTION 'UNIT_CONVERSION_SIMPLE' EXPORTING input = -mymng unit_in = -meins unit_out = mt08y-meins IMPORTING output = new_mymng EXCEPTIONS conversion_not_found = 1 unit_in_not_found = 2 unit_out_not_found = 3.

MY_POOL_LAYER_DELETE CALL FUNCTION 'MY_POOL_LAYER_DELETE' EXPORTING i_poollayer = s_myplm i_tcode = c_tcode CHANGING c_delete_count = mysta-delct c_commit_count = mysta-dtbct EXCEPTIONS not_found = 1.

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

MY_MATERIAL_LAYER_DELETE CALL FUNCTION 'MY_MATERIAL_LAYER_DELETE' EXPORTING i_matlayer = s_mymlm i_tcode = c_tcode CHANGING c_delete_count = mysta-delct c_commit_count = mysta-dtbct EXCEPTIONS not_found = 1.

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

REUSE_ALV_COMMENTARY_WRITE CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE' EXPORTING it_list_commentary = lt_line.



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 RMLIFO42 or its description.