SAP Reports / Programs

CHANGEDOCU_WRI SAP ABAP Report - Archiving Change Documents: Write Program







CHANGEDOCU_WRI 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 CHANGEDOCU_WRI 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 CHANGEDOCU_WRI. "Basic submit
SUBMIT CHANGEDOCU_WRI AND RETURN. "Return to original report after report execution complete
SUBMIT CHANGEDOCU_WRI 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: TCODE = D .
Selection Text: P_WRITST = D .
Selection Text: P_WRIPRD = D .
Selection Text: P_SNAP = D .
Selection Text: P_PROT_O = D .
Selection Text: P_PROT = D .
Selection Text: P_DEST = D .
Selection Text: P_DELTST = D .
Selection Text: P_COMENT = D .
Selection Text: P_AR_ILM = D .
Selection Text: OBJECTID = D .
Selection Text: OBJECT = D .
Selection Text: TIME_TO = To Time (HH:MM:SS)
Selection Text: TIMEFROM = From Time (HH:MM:SS)
Selection Text: P_USER = Changed By (User Name)
Selection Text: DATE_TO = To Date
Selection Text: DATEFROM = From Date
Title: Archiving Change Documents: Write Program
Text Symbol: N03 = Change document archivable
Text Symbol: N02 = Retention Time Reached
Text Symbol: N01 = Snapshot Archived
Text Symbol: 011 = Incorrect Date Entries:
Text Symbol: 007 = Further Selection Criteria
Text Symbol: 006 = to (Date/Time)
Text Symbol: 005 = from (Date/Time)
Text Symbol: 004 = &1% (&2 of &3) change documents processed
Text Symbol: 003 = Change document archived
Text Symbol: 001 = Change Documents


INCLUDES used within this REPORT CHANGEDOCU_WRI

INCLUDE ARCH_WRITE_PRG_STANDARD2.


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:

ARCHIVE_PROTOCOL_INIT CALL FUNCTION 'ARCHIVE_PROTOCOL_INIT' EXPORTING i_detailprotocol = p_prot.

ARCHIVE_OPEN_FOR_WRITE CALL FUNCTION 'ARCHIVE_OPEN_FOR_WRITE' EXPORTING call_delete_job_in_test_mode = v_deltst create_archive_file = v_wriprd object = 'CHANGEDOCU' comments = v_coment do_not_delete_data = l_not_delete destroy = l_destroy output_sel_screen_when_dialog = space IMPORTING archive_handle = l_handle EXCEPTIONS open_error = 3 not_authorized = 4 OTHERS = 5.

ARCHIVE_SAVE_OBJECT CALL FUNCTION 'ARCHIVE_SAVE_OBJECT' EXPORTING archive_handle = l_handle 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 = gv_objtext i_msgtype = '1' i_text = l_text.

ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_object = gv_objtext i_msgtype = '1' i_text = l_text.

ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_object = gv_objtext i_msgtype = '1' i_text = l_text.

ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_object = gv_objtext i_msgtype = 2 i_msgid = sy-msgid i_msgno = sy-msgno.

PROGRESS_INDICATOR CALL FUNCTION 'PROGRESS_INDICATOR' EXPORTING i_text = text-004 i_processed = l_cnt_obj i_total = l_sum_obj i_output_immediately = 'X'.

ARCHIVE_WRITE_STATISTICS CALL FUNCTION 'ARCHIVE_WRITE_STATISTICS' EXPORTING archive_handle = l_handle.

ARCHIVE_PROTOCOL_WRITE CALL FUNCTION 'ARCHIVE_PROTOCOL_WRITE'.

ARCHIVE_CLOSE_FILE CALL FUNCTION 'ARCHIVE_CLOSE_FILE' EXPORTING archive_handle = l_handle.

PROGRESS_INDICATOR CALL FUNCTION 'PROGRESS_INDICATOR' EXPORTING i_text = text-004 i_processed = v_cnt i_total = v_sum * i_output_immediately = 'X' IMPORTING e_progress_sent = lv_sent.

DB_COMMIT CALL FUNCTION 'DB_COMMIT'. "force immediate output of message

ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_object = l_objtext "objectclas/objectid i_text = text-003 i_msgtype = 1.

ARCHIVE_NEW_OBJECT CALL FUNCTION 'ARCHIVE_NEW_OBJECT' EXPORTING archive_handle = pv_handle.

ARCHIVE_PUT_RECORD CALL FUNCTION 'ARCHIVE_PUT_RECORD' EXPORTING archive_handle = pv_handle record = ps_cdkeytab record_structure = 'CDKEYTAB'.

ARCHIVE_PUT_TABLE CALL FUNCTION 'ARCHIVE_PUT_TABLE' EXPORTING archive_handle = pv_handle record_structure = 'CDHDR' TABLES table = lt_cdhdr_arch.

ARCHIVE_PUT_TABLE CALL FUNCTION 'ARCHIVE_PUT_TABLE' EXPORTING archive_handle = pv_handle record_structure = 'CDPOS' TABLES table = lt_cdpos.

CHANGEDOCU_HAS_GUID





CALL FUNCTION 'CHANGEDOCU_HAS_GUID' EXPORTING is_cdhdr = IMPORTING has_guid = lv_has_guid has_string = lv_has_string.

ARCHIVE_PUT_TABLE CALL FUNCTION 'ARCHIVE_PUT_TABLE' EXPORTING archive_handle = pv_handle record_structure = 'CDPOS_UID' TABLES table = lt_cdpos_uid.

ARCHIVE_PUT_TABLE CALL FUNCTION 'ARCHIVE_PUT_TABLE' EXPORTING archive_handle = pv_handle record_structure = 'CDPOS_STR' TABLES table = lt_cdpos_str.

ARCHIVE_SAVE_OBJECT CALL FUNCTION 'ARCHIVE_SAVE_OBJECT' EXPORTING archive_handle = pv_handle 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 = gv_objtext i_msgtype = '1' i_text = lv_text.

ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_object = gv_objtext i_msgtype = '1' i_text = lv_text.

ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_object = gv_objtext i_msgtype = '1' i_text = lv_text.

ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_object = gv_objtext i_msgtype = 2 i_msgid = sy-msgid i_msgno = sy-msgno.

ARCHIVE_NEW_OBJECT CALL FUNCTION 'ARCHIVE_NEW_OBJECT' EXPORTING archive_handle = pv_handle.

ARCHIVE_PUT_RECORD CALL FUNCTION 'ARCHIVE_PUT_RECORD' EXPORTING archive_handle = pv_handle record = ps_cdkeytab record_structure = 'CDKEYTAB'.

ARCHIVE_PUT_TABLE CALL FUNCTION 'ARCHIVE_PUT_TABLE' EXPORTING archive_handle = pv_handle record_structure = 'CDHDR' TABLES table = lt_cdhdr.

ARCHIVE_PUT_TABLE CALL FUNCTION 'ARCHIVE_PUT_TABLE' EXPORTING archive_handle = pv_handle record_structure = 'CDPOS' TABLES table = lt_cdpos.

ARCHIVE_PUT_TABLE CALL FUNCTION 'ARCHIVE_PUT_TABLE' EXPORTING archive_handle = pv_handle record_structure = 'CDPOS_UID' TABLES table = lt_cdpos_uid.

ARCHIVE_PUT_TABLE CALL FUNCTION 'ARCHIVE_PUT_TABLE' EXPORTING archive_handle = pv_handle record_structure = 'CDPOS_STR' TABLES table = lt_cdpos_str.

ARCHIVE_SAVE_OBJECT CALL FUNCTION 'ARCHIVE_SAVE_OBJECT' EXPORTING archive_handle = pv_handle 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 = gv_objtext i_msgtype = '1' i_text = lv_text.

ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_object = gv_objtext i_msgtype = '1' i_text = lv_text.

ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_object = gv_objtext i_msgtype = '1' i_text = lv_text.

ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_object = gv_objtext i_msgtype = 2 i_msgid = sy-msgid i_msgno = sy-msgno.



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