SAP Reports / Programs

RHECM_ARCH_WRITE SAP ABAP Report - Destroy: Write Program for Compensation Review Data







RHECM_ARCH_WRITE is a standard Executable ABAP Report available within your SAP system (depending on your version and release level). It is used for You use this report to write business complete information (employee specific), created during the process of Enterprise Compensation Management (ECM), to the archive store...see full standard documentation available for this report. Also check out the submitted Comments related to this SAP report and the details below to see which OBJECTS it interacts with such as TABLES, FUNCTION MODULES, INCLUDES ETC.

If you would like to execute this report or see the full code listing simply enter RHECM_ARCH_WRITE 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 RHECM_ARCH_WRITE. "Basic submit
SUBMIT RHECM_ARCH_WRITE AND RETURN. "Return to original report after report execution complete
SUBMIT RHECM_ARCH_WRITE 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: CREVI = D .
Selection Text: MOLGA = D .
Selection Text: PERNR = D .
Selection Text: PROTOCOL = D .
Selection Text: P_COMENT = D .
Selection Text: TESTRUN = D .
Title: Destroy: Write Program for Compensation Review Data
Text Symbol: 000 = Compensation Criteria Selection
Text Symbol: 001 = This program can only be run using transaction SARA
Text Symbol: 002 = Retention Period End Reached
Text Symbol: 003 = Employee Compensation Review Data Archived for Destruction
Text Symbol: 004 = No Authorization to Destroy ECM data
Text Symbol: 005 = &1% (&2 of &3) of the Reviews Processed
Text Symbol: 006 = Enter Compensation Review
Text Symbol: 007 = Employee
Text Symbol: 008 = Review Item
Text Symbol: 009 = Organization Unit


INCLUDES used within this REPORT RHECM_ARCH_WRITE

No INCLUDES are used within this REPORT code!


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:

SELECT_OPTIONS_RESTRICT CALL FUNCTION 'SELECT_OPTIONS_RESTRICT' EXPORTING restriction = restrict EXCEPTIONS too_late = 1 repeated = 2 selopt_without_options = 3 selopt_without_signs = 4 invalid_sign = 5 empty_option_list = 6 invalid_kind = 7 repeated_kind_a = 8 OTHERS = 9.

ARCHIVE_PROTOCOL_LINE_DETAIL CALL FUNCTION 'ARCHIVE_PROTOCOL_LINE_DETAIL'.

F4IF_INT_TABLE_VALUE_REQUEST CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST' EXPORTING retfield = 'CREVI' dynpprog = sy-repid dynpnr = sy-dynnr value_org = 'S' multiple_choice = 'X' " Enable multi selection TABLES value_tab = lt_rev_srch[] return_tab = lt_return_tab[] " This holds multiple records EXCEPTIONS parameter_error = 1 no_values_found = 2 OTHERS = 3.

F4IF_INT_TABLE_VALUE_REQUEST CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST' EXPORTING retfield = 'CREVI' dynpprog = sy-repid dynpnr = sy-dynnr value_org = 'S' * multiple_choice = 'X' " Enable multi selection TABLES value_tab = lt_rev_srch[] return_tab = lt_return_tab[] " This holds multiple records EXCEPTIONS parameter_error = 1 no_values_found = 2 OTHERS = 3.

F4IF_INT_TABLE_VALUE_REQUEST CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST' EXPORTING retfield = 'MOLGA' dynpprog = sy-repid dynpnr = sy-dynnr value_org = 'S' multiple_choice = 'X' " Enable multi selection TABLES value_tab = lt_molga_f4[] return_tab = lt_return_tab[] " This holds multiple records EXCEPTIONS parameter_error = 1 no_values_found = 2 OTHERS = 3.

F4IF_INT_TABLE_VALUE_REQUEST CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST' EXPORTING retfield = 'MOLGA' dynpprog = sy-repid dynpnr = sy-dynnr value_org = 'S' * multiple_choice = 'X' " Enable multi selection TABLES value_tab = lt_molga_f4[] return_tab = lt_return_tab[] " This holds multiple records EXCEPTIONS parameter_error = 1 no_values_found = 2 OTHERS = 3.

ARCHIVE_PROTOCOL_INIT CALL FUNCTION 'ARCHIVE_PROTOCOL_INIT' EXPORTING i_detailprotocol = p_prot i_protocol_output = p_prot_o.

ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_msgtype = 3 i_msgid = sy-msgid i_msgno = sy-msgno i_msgv1 = sy-cprog.

ARCHIVE_PROTOCOL_WRITE CALL FUNCTION 'ARCHIVE_PROTOCOL_WRITE'.

RH_GET_ACTIVE_WF_PLVAR CALL FUNCTION 'RH_GET_ACTIVE_WF_PLVAR' EXPORTING set_default_plvar = 'X' IMPORTING act_plvar = g_plvar EXCEPTIONS no_active_plvar = 1 OTHERS = 2.

ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_msgtype = 3 i_msgid = sy-msgid i_msgno = sy-msgno.

ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_object = gs_reviews-crevi i_msgtype = 3 i_msgid = sy-msgid i_msgno = sy-msgno.

ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_object = lv_object i_msgtype = 3 i_msgid = sy-msgid i_msgno = sy-msgno.

ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_object = gs_reviews-crevi i_msgtype = 3 i_msgid = sy-msgid i_msgno = sy-msgno.

ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_object = lv_object i_msgtype = 3 i_msgid = sy-msgid i_msgno = sy-msgno.

ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_object = gs_reviews-crevi i_msgtype = 3 i_msgid = sy-msgid i_msgno = sy-msgno.

ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' "Review item &1 for pernr &2 not activated in infotype 0759 EXPORTING i_object = lv_object i_msgtype = 3 i_msgid = sy-msgid i_msgno = sy-msgno i_msgv1 = sy-msgv1.

ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' "Review item &1 for pernr &2 not activated in infotype 0759 EXPORTING i_object = gs_reviews-crevi i_msgtype = 3 i_msgid = sy-msgid i_msgno = sy-msgno i_msgv1 = sy-msgv1.

ARCHIVE_PROTOCOL_COLLECT





CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_msgtype = 2 i_msgid = sy-msgid i_msgno = sy-msgno i_msgv1 = sy-msgv1 i_msgv2 = sy-msgv2 i_msgv3 = sy-msgv3 i_msgv4 = sy-msgv4.

ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_object = gs_reviews-crevi i_msgtype = 3 i_msgid = sy-msgid i_msgno = sy-msgno i_msgv1 = sy-msgv1 i_msgv2 = sy-msgv2 i_msgv3 = sy-msgv3.

ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_object = lv_object i_msgtype = 1 i_msgid = sy-msgid i_msgno = sy-msgno.

ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_object = lv_object i_msgtype = 3 i_msgid = sy-msgid i_msgno = sy-msgno i_msgv1 = sy-msgv1 i_msgv2 = sy-msgv2 i_msgv3 = sy-msgv3 i_msgv4 = sy-msgv4.

PROGRESS_INDICATOR CALL FUNCTION 'PROGRESS_INDICATOR' EXPORTING i_text = text-005 "#EC * "text shall be understandable for EN-speaking coleagues i_processed = lv_objects_processed i_total = lv_total_of_objects IMPORTING e_progress_sent = lv_progress_send.

DB_COMMIT CALL FUNCTION 'DB_COMMIT'. "otherwise messag will not appear in the job-log

PROGRESS_INDICATOR CALL FUNCTION 'PROGRESS_INDICATOR' EXPORTING i_text = text-005 "#EC * "text shall be understandable for EN-speaking coleagues i_processed = lv_objects_processed i_total = lv_total_of_objects i_output_immediately = 'X'. "force the progress output

ARCHIVE_WRITE_STATISTICS CALL FUNCTION 'ARCHIVE_WRITE_STATISTICS' EXPORTING archive_handle = lv_handle.

ARCHIVE_CLOSE_FILE CALL FUNCTION 'ARCHIVE_CLOSE_FILE' EXPORTING archive_handle = lv_handle EXCEPTIONS internal_error = 1 wrong_access_to_archive = 2 archiving_standard_violation = 3.

ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_msgtype = 3 i_msgid = sy-msgid i_msgno = sy-msgno.

ARCHIVE_PROTOCOL_WRITE CALL FUNCTION 'ARCHIVE_PROTOCOL_WRITE'.

ARCHIVE_OPEN_FOR_WRITE CALL FUNCTION 'ARCHIVE_OPEN_FOR_WRITE' EXPORTING call_delete_job_in_test_mode = p_deltst create_archive_file = p_wriprd object = c_arch_object comments = p_coment do_not_delete_data = l_not_delete destroy = l_destroy IMPORTING archive_handle = r_handle EXCEPTIONS internal_error = 1 object_not_found = 2 open_error = 3 not_authorized = 4 archiving_standard_violation = 5.

HR_ECM_READ_INFOTYPE CALL FUNCTION 'HR_ECM_READ_INFOTYPE' EXPORTING pernr = p_pernr infty = p_infty * subty = p_subty objps = '*' sprps = '*' begda = p_begda endda = p_endda no_auth_check = no_auth_check message_handler = lr_message_list IMPORTING infotype_tab = et_data is_ok = lv_ok.

HR_ECM_READ_INFOTYPE CALL FUNCTION 'HR_ECM_READ_INFOTYPE' EXPORTING pernr = p_pernr infty = p_infty subty = p_subty objps = '*' sprps = '*' begda = p_begda endda = p_endda no_auth_check = no_auth_check message_handler = lr_message_list IMPORTING infotype_tab = et_data is_ok = lv_ok.

ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_object = lv_dummy i_msgtype = 3 i_msgid = ls_hrpa_message-msgid i_msgno = ls_hrpa_message-msgno i_msgv1 = ls_hrpa_message-msgv1 i_msgv2 = ls_hrpa_message-msgv2 i_msgv3 = ls_hrpa_message-msgv3 i_msgv4 = ls_hrpa_message-msgv4.

ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_object = lv_object i_msgtype = 3 i_msgid = sy-msgid i_msgno = sy-msgno i_msgv1 = sy-msgv1 i_msgv2 = sy-msgv2.

RH_READ_INFTY_1000 CALL FUNCTION 'RH_READ_INFTY_1000' TABLES i1000 = lt_1000 objects = lt_budget_obj[] EXCEPTIONS nothing_found = 1 wrong_condition = 2 wrong_parameters = 3 OTHERS = 4.

ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_object = lv_dummy i_msgtype = 3 i_msgid = ls_hrpa_message-msgid i_msgno = ls_hrpa_message-msgno i_msgv1 = ls_hrpa_message-msgv1 i_msgv2 = ls_hrpa_message-msgv2 i_msgv3 = ls_hrpa_message-msgv3 i_msgv4 = ls_hrpa_message-msgv4.

ARCHIVE_NEW_OBJECT CALL FUNCTION 'ARCHIVE_NEW_OBJECT' EXPORTING archive_handle = p_handle.

ARCHIVE_PUT_RECORD CALL FUNCTION 'ARCHIVE_PUT_RECORD' EXPORTING archive_handle = p_handle record_structure = 'T71ADM08' record = gs_reviews.




ARCHIVE_PUT_TABLE CALL FUNCTION 'ARCHIVE_PUT_TABLE' EXPORTING archive_handle = p_handle record_structure = 'PA0759' TABLES table = gt_pa0759.

ARCHIVE_PUT_RECORD CALL FUNCTION 'ARCHIVE_PUT_RECORD' EXPORTING archive_handle = p_handle record_structure = 'T71ADM_PROC_EE' record = gs_proc_ee.

ARCHIVE_PUT_RECORD CALL FUNCTION 'ARCHIVE_PUT_RECORD' EXPORTING archive_handle = p_handle record_structure = 'T71ADM_PROC_ELIG' record = gs_proc_elig.

ARCHIVE_PUT_TABLE CALL FUNCTION 'ARCHIVE_PUT_TABLE' EXPORTING archive_handle = p_handle record_structure = 'HRP1000' TABLES table = gt_1000[].

ARCHIVE_PUT_TABLE CALL FUNCTION 'ARCHIVE_PUT_TABLE' EXPORTING archive_handle = p_handle record_structure = 'HRP1001' TABLES table = gt_1001[].

ARCHIVE_PUT_TABLE CALL FUNCTION 'ARCHIVE_PUT_TABLE' EXPORTING archive_handle = p_handle record_structure = 'HRP1500' TABLES table = gt_1500[].

ARCHIVE_PUT_TABLE CALL FUNCTION 'ARCHIVE_PUT_TABLE' EXPORTING archive_handle = p_handle record_structure = 'HRP1520' TABLES table = gt_1520[].

ARCHIVE_PUT_TABLE CALL FUNCTION 'ARCHIVE_PUT_TABLE' EXPORTING archive_handle = p_handle record_structure = 'HRPADPM' TABLES table = gt_hrpadpm[].

ARCHIVE_PUT_TABLE CALL FUNCTION 'ARCHIVE_PUT_TABLE' EXPORTING archive_handle = p_handle record_structure = 'PLOGI' TABLES table = gt_plogi[].

ARCHIVE_PUT_TABLE CALL FUNCTION 'ARCHIVE_PUT_TABLE' EXPORTING archive_handle = p_handle record_structure = 'PCL1' TABLES table = lt_pcl1[].

ARCHIVE_SAVE_OBJECT CALL FUNCTION 'ARCHIVE_SAVE_OBJECT' EXPORTING archive_handle = p_handle * IMPORTING * OBJECT_OFFSET = * ARCHIVE_NAME = EXCEPTIONS file_io_error = 1 internal_error = 2 open_error = 3 termination_requested = 4 wrong_access_to_archive = 5 data_object_not_saved = 6 OTHERS = 7 .

ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_object = gs_reviews-crevi i_msgtype = 3 i_msgid = ls_message_list-msgid i_msgno = ls_message_list-msgno i_msgv1 = ls_message_list-msgv1 i_msgv2 = ls_message_list-msgv2 i_msgv3 = ls_message_list-msgv3 i_msgv4 = ls_message_list-msgv4.

HR_ECM_GET_EE_MOLGA CALL FUNCTION 'HR_ECM_GET_EE_MOLGA' EXPORTING pernr = ls_comp_empl-pernr * WERKS = message_handler = lr_message_list IMPORTING molga = lv_molga is_ok = is_ok.



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