SAP Reports / Programs | Controlling | Product Cost Controlling | Actual Costing/Material Ledger(CO-PC-ACT) SAP CO

ML_DOCUMENTS_PERIODS_COMPARE SAP ABAP Report - Adjustment of documents with the material ledger period data







ML_DOCUMENTS_PERIODS_COMPARE 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 ML_DOCUMENTS_PERIODS_COMPARE into the relevant SAP transactions such as SE38 or SE80


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 ML_DOCUMENTS_PERIODS_COMPARE. "Basic submit
SUBMIT ML_DOCUMENTS_PERIODS_COMPARE AND RETURN. "Return to original report after report execution complete
SUBMIT ML_DOCUMENTS_PERIODS_COMPARE 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: P_BDATJ = D Year
Selection Text: P_BUKRS = D Company code
Selection Text: P_BWTAR = D Valuation type
Selection Text: P_LIFNR = D Vendor
Selection Text: P_POPER = D Posting period
Selection Text: P_POSNR = D Item (SD)
Selection Text: P_PSPNR = D WBS element
Selection Text: P_VBELN = D SD document
Selection Text: P_WERKS = D Plant
Selection Text: R_MATNR = D Material
Title: Adjustment of documents with the material ledger period data


INCLUDES used within this REPORT ML_DOCUMENTS_PERIODS_COMPARE

INCLUDE LCKMDTOP_FELDGRUPPEN.
INCLUDE LCKM0TOP_STATUS.


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:

CKM8_F4_BWTAR CALL FUNCTION 'CKM8_F4_BWTAR' EXPORTING i_fnam_matnr = 'MATNR' i_fnam_bwkey = h_fnam i_fnam_vbeln = 'VBELN' i_fnam_posnr = 'POSNR' i_fnam_pspnr = 'PSPNR' i_retfield = 'BWTAR' i_dynpprog = h_repid i_dynpnr = '1000' i_dynprofield = 'CKMLHD-BWTAR' * I_STEPL = * I_WINDOW_TITLE = .

CKML_F_SET_BWKEY CALL FUNCTION 'CKML_F_SET_BWKEY' EXPORTING bwkey = h_bwkey.

CKML_F_GET_WWO CALL FUNCTION 'CKML_F_GET_WWO' IMPORTING wwo = f_wwo.

MARV_SINGLE_READ CALL FUNCTION 'MARV_SINGLE_READ' EXPORTING * KZRFB = ' ' * MAXTZ = 0 bukrs = f_wwo-bukrs IMPORTING wmarv = f_marv EXCEPTIONS not_found = 1 wrong_call = 2 OTHERS = 3 .

T001_SINGLE_READ CALL FUNCTION 'T001_SINGLE_READ' EXPORTING * KZRFB = ' ' * MAXTZ = 0 bukrs = f_wwo-bukrs IMPORTING wt001 = f_t001 EXCEPTIONS not_found = 1 wrong_call = 2 OTHERS = 3 .

CKML_F_GET_PREVIOUS_PERIOD CALL FUNCTION 'CKML_F_GET_PREVIOUS_PERIOD' EXPORTING input_period = p_poper input_year = p_bdatj input_periv = f_t001-periv IMPORTING previous_period = h_poper_prev previous_year = h_bdatj_prev.

CKMS_HEADER_READ_WITH_ITAB CALL FUNCTION 'CKMS_HEADER_READ_WITH_ITAB' * EXPORTING * REFRESH_BUFFER = ' ' * enqueue_mbew = 'X' TABLES in_kalnr = t_kalnr out_ckmlhd = t_ckmlhd out_ckmlpr = t_ckmlpr * out_ckmlhd_lock = t_ckmlhd_lock * OUT_CKMLPR_LOCK = EXCEPTIONS no_data_found = 1 input_data_inconsistent = 2 lock_system_failure = 3 internal_error = 4 no_data_requested = 5 OTHERS = 6 .

CKMS_PERIOD_READ_WITH_ITAB CALL FUNCTION 'CKMS_PERIOD_READ_WITH_ITAB' EXPORTING * I_REFRESH_BUFFER = * I_READ_ONLY_BUFFER = ' ' * I_USE_BUFFER = 'X' * I_BUILD_SMBEW = i_bdatj_1 = p_bdatj i_poper_1 = p_poper i_bdatj_2 = h_bdatj_prev i_poper_2 = h_poper_prev * I_BDATJ_3 = * I_POPER_3 = * I_BETWEEN_1_AND_2 = * I_UNTPER = '000' * I_CALL_BY_REPORTING = ' ' * I_NO_CHK_PERIODS_COMPLETE = ' ' TABLES t_kalnr = t_kalnr t_ckmlpp = t_ckmlpp t_ckmlcr = t_ckmlcr * T_MISS_CKMLPP = * T_MISS_CKMLCR = EXCEPTIONS no_data_found = 1 input_data_inconsistent = 2 buffer_inconsistent = 3 OTHERS = 4 .

T001K_SINGLE_READ CALL FUNCTION 'T001K_SINGLE_READ' EXPORTING * KZRFB = ' ' * MAXTZ = 0 bwkey = h_bwkey IMPORTING wt001k = t001k EXCEPTIONS not_found = 1 wrong_call = 2 OTHERS = 3 .



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