SAP Reports / Programs

SAPRCKMN_NEU SAP ABAP Report - Archiving: write program period data Material Ledger/Actual Costing







SAPRCKMN_NEU 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 SAPRCKMN_NEU 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 SAPRCKMN_NEU. "Basic submit
SUBMIT SAPRCKMN_NEU AND RETURN. "Return to original report after report execution complete
SUBMIT SAPRCKMN_NEU 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: T_VBELN = D .
Selection Text: T_PSPNR = D .
Selection Text: T_POSNR = D .
Selection Text: T_LIFNR = D .
Selection Text: P_LPOP = D .
Selection Text: P_LGJA = D .
Selection Text: P_LAUF = D .
Selection Text: T_MATNR = Material Number
Selection Text: T_BWTAR = Valuation Type
Selection Text: T_BWKEY = Valuation Area
Selection Text: S_TEST = Test Run
Selection Text: S_CREATE = Generate Archive File
Selection Text: P_PER_L = From - period
Selection Text: P_PER_H = Until - period
Selection Text: P_GJA_L = From - fiscal year
Selection Text: P_GJA_H = Until - fiscal year
Selection Text: PA_TEXT = Comment
Title: Archiving: write program period data Material Ledger/Actual Costing
Text Symbol: ß19 = Period
Text Symbol: 018 = /
Text Symbol: 017 = Period/ Application
Text Symbol: 016 = Costing Run
Text Symbol: 015 = Selection by
Text Symbol: 010 = Select Both Actual and AVR Data
Text Symbol: 009 = Select AVR Data Only
Text Symbol: 008 = Select Actual Data Only
Text Symbol: 007 = Selection by Value Struc. Type
Text Symbol: 006 = To
Text Symbol: 005 = Period / Year
Text Symbol: 004 = User:
Text Symbol: 003 = No material ledger records could be selected in valuation area &
Text Symbol: 002 = Processing Options
Text Symbol: 001 = Selection of material ledger records


INCLUDES used within this REPORT SAPRCKMN_NEU

INCLUDE RCKMX_NEUTOP. "GLOBAL DATA


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:

CKML_RUN_PERIOD_GET CALL FUNCTION 'CKML_RUN_PERIOD_GET' EXPORTING * I_RUN_ID = i_run_type = p_lauf * I_LAST_DAY = p_lday i_langu = sy-langu i_poper = p_lpop i_gjahr = p_lgja i_appl = p_appl IMPORTING es_runperiod = s_runperiod EXCEPTIONS run_not_existent = 1 OTHERS = 2.

CKML_RUN_PLANTS_GET CALL FUNCTION 'CKML_RUN_PLANTS_GET' EXPORTING i_run_id = s_runperiod-run_id * I_RUN_TYPE = * I_LAST_DAY = * I_POPER = * I_GJAHR = * I_APPL = CKRU0_CO_APPL_ACT IMPORTING et_plants = t_plants EXCEPTIONS run_not_existent = 1 no_plants = 2 OTHERS = 3.

ARCHIVE_OPEN_FOR_WRITE CALL FUNCTION 'ARCHIVE_OPEN_FOR_WRITE' EXPORTING call_delete_job_in_test_mode = s_test create_archive_file = s_create object = 'CO_ML_DAT' comments = pa_text IMPORTING archive_handle = handle.

ARCHIVE_WRITE_STATISTICS CALL FUNCTION 'ARCHIVE_WRITE_STATISTICS' EXPORTING archive_handle = handle.

ARCHIVE_CLOSE_FILE CALL FUNCTION 'ARCHIVE_CLOSE_FILE' EXPORTING archive_handle = handle.

CKML_F_SET_BWKEY CALL FUNCTION 'CKML_F_SET_BWKEY' EXPORTING bwkey = t_ckmlhd-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 = marv EXCEPTIONS not_found = 1 wrong_call = 2 OTHERS = 3.

T001_READ CALL FUNCTION 'T001_READ' EXPORTING bukrs = f_wwo-bukrs IMPORTING struct = t001 EXCEPTIONS no_entry = 1 OTHERS = 2.

CKML_F_GET_PREVIOUS_PERIOD CALL FUNCTION 'CKML_F_GET_PREVIOUS_PERIOD' EXPORTING input_period = h_pprev_poper input_year = h_pprev_bdatj input_periv = t001-periv IMPORTING previous_period = h_pprev_poper previous_year = h_pprev_bdatj.

CKML_F_SET_BWKEY CALL FUNCTION 'CKML_F_SET_BWKEY' EXPORTING bwkey = i_bwkey.

CKML_F_GET_WWO CALL FUNCTION 'CKML_F_GET_WWO' IMPORTING wwo = f_wwo.

T001_READ CALL FUNCTION 'T001_READ' EXPORTING bukrs = f_wwo-bukrs IMPORTING struct = lf_t001 EXCEPTIONS no_entry = 1 OTHERS = 2.

CKML_MGV_SET_PERIOD CALL FUNCTION 'CKML_MGV_SET_PERIOD' EXPORTING i_bwkey = i_bwkey i_perio = l_poper i_gjahr = l_gjahr IMPORTING e_datum = l_last_day EXCEPTIONS wrong_call = 1 plant_not_found = 2 bwkey_not_found = 3 period_not_found = 4 OTHERS = 5.

CKML_F_DETERMINE_NEXT_PERIOD CALL FUNCTION 'CKML_F_DETERMINE_NEXT_PERIOD' EXPORTING current_period = l_poper current_year = l_gjahr f_periv = lf_t001-periv IMPORTING next_period_period = l_poper next_period_year = l_gjahr.

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

CKML_F_GET_PREVIOUS_PERIOD CALL FUNCTION 'CKML_F_GET_PREVIOUS_PERIOD' EXPORTING input_period = l_pprev_poper input_year = l_pprev_gjahr input_periv = lf_t001-periv IMPORTING previous_period = l_pprev_poper previous_year = l_pprev_gjahr.

ARCHIVE_NEW_OBJECT CALL FUNCTION 'ARCHIVE_NEW_OBJECT' EXPORTING archive_handle = handle object_id = f_ml_header-kalnr.

ARCHIVE_PUT_TABLE





CALL FUNCTION 'ARCHIVE_PUT_TABLE' EXPORTING archive_handle = handle * RECORD_FLAGS = ' ' record_structure = 'CKMLPP' TABLES table = t_ckmlpp_arc.

ARCHIVE_PUT_TABLE CALL FUNCTION 'ARCHIVE_PUT_TABLE' EXPORTING archive_handle = handle * RECORD_FLAGS = ' ' record_structure = 'MLCD' TABLES table = t_mlcd_arc.

ARCHIVE_PUT_TABLE CALL FUNCTION 'ARCHIVE_PUT_TABLE' EXPORTING archive_handle = handle * RECORD_FLAGS = ' ' record_structure = 'CKMLCR' TABLES table = t_ckmlcr_arc.

ARCHIVE_PUT_TABLE CALL FUNCTION 'ARCHIVE_PUT_TABLE' EXPORTING archive_handle = handle * RECORD_FLAGS = ' ' record_structure = 'CKMLMV003' TABLES table = t_ckmlmv003_arc.

ARCHIVE_PUT_TABLE CALL FUNCTION 'ARCHIVE_PUT_TABLE' EXPORTING archive_handle = handle * RECORD_FLAGS = ' ' record_structure = 'CKMLMV004' TABLES table = t_ckmlmv004_arc.

ARCHIVE_PUT_TABLE CALL FUNCTION 'ARCHIVE_PUT_TABLE' EXPORTING archive_handle = handle * RECORD_FLAGS = ' ' record_structure = 'CKMLCT' TABLES table = t_ckmlct.

ARCHIVE_SAVE_OBJECT CALL FUNCTION 'ARCHIVE_SAVE_OBJECT' EXPORTING archive_handle = handle.

CKML_LA_GET_PERIOD_DATA CALL FUNCTION 'CKML_LA_GET_PERIOD_DATA' EXPORTING if_kalnr = f_activity_header it_year_period = it_year_period IMPORTING et_ckmllacr = t_ckmllacr et_ckmlmv004 = t_ckmlmv004.

ARCHIVE_NEW_OBJECT CALL FUNCTION 'ARCHIVE_NEW_OBJECT' EXPORTING archive_handle = handle object_id = f_activity_header-kalnr.

ARCHIVE_PUT_TABLE CALL FUNCTION 'ARCHIVE_PUT_TABLE' EXPORTING archive_handle = handle * RECORD_FLAGS = ' ' record_structure = 'CKMLLACR' TABLES table = t_ckmllacr.

ARCHIVE_PUT_TABLE CALL FUNCTION 'ARCHIVE_PUT_TABLE' EXPORTING archive_handle = handle * RECORD_FLAGS = ' ' record_structure = 'CKMLMV004' TABLES table = t_ckmlmv004.

ARCHIVE_SAVE_OBJECT CALL FUNCTION 'ARCHIVE_SAVE_OBJECT' EXPORTING archive_handle = handle.

CKML_LA_KALNR_BY_PLANT CALL FUNCTION 'CKML_LA_KALNR_BY_PLANT' EXPORTING i_bwkey = i_bwkey IMPORTING et_kalnr = et_activity_header.



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