MSR_TRACKING_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 all advanced returns documents to a file that is marked archivable by the preprocessing program...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 MSR_TRACKING_ARCH_WRITE into the relevant SAP transactions such as SE38 or SE80
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.
Selection Text: P_COMENT = D .
Selection Text: P_DELTST = D .
Selection Text: P_PROT = D .
Selection Text: P_PROT_O = D .
Selection Text: P_WRIPRD = D .
Selection Text: P_WRITST = D .
Title: Write Program for Archiving Adv. Returns Tracking Data
Text Symbol: 002 = Archived MSR process
Text Symbol: 003 = Sales document number:
Text Symbol: 004 = Purchasing document number:
Text Symbol: 005 = Session interrupted
Text Symbol: 040 = &1% (&2 of &3) of the job processed
INCLUDE ARCH_WRITE_PRG_STANDARD2. " FLOW CONTROL
No SAP DATABASE tables are accessed within this REPORT code!
ARCHIVE_PROTOCOL_INIT CALL FUNCTION 'ARCHIVE_PROTOCOL_INIT' EXPORTING i_detailprotocol = p_prot i_protocol_output = p_prot_o.
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 = 'MSR_TRC' comments = p_coment IMPORTING archive_handle = lv_handle.
ARCHIVE_NEW_OBJECT CALL FUNCTION 'ARCHIVE_NEW_OBJECT' EXPORTING archive_handle = lv_handle.
ARCHIVE_PUT_RECORD CALL FUNCTION 'ARCHIVE_PUT_RECORD' EXPORTING archive_handle = lv_handle record = ls_msr_d_head_key record_structure = 'MSR_D_HEAD'.
ARCHIVE_PUT_TABLE CALL FUNCTION 'ARCHIVE_PUT_TABLE' EXPORTING archive_handle = lv_handle record_structure = 'MSR_D_ITEM' TABLES table = lt_msr_d_item.
ARCHIVE_PUT_TABLE CALL FUNCTION 'ARCHIVE_PUT_TABLE' EXPORTING archive_handle = lv_handle record_structure = 'MSR_D_EXECUTED' TABLES table = lt_msr_d_executed.
ARCHIVE_PUT_TABLE CALL FUNCTION 'ARCHIVE_PUT_TABLE' EXPORTING archive_handle = lv_handle record_structure = 'MSR_D_NEXTPLANTS' TABLES table = lt_msr_d_nextplants.
ARCHIVE_PUT_TABLE CALL FUNCTION 'ARCHIVE_PUT_TABLE' EXPORTING archive_handle = lv_handle record_structure = 'MSR_D_APPROVAL' TABLES table = lt_msr_d_approval.
ARCHIVE_PUT_TABLE CALL FUNCTION 'ARCHIVE_PUT_TABLE' EXPORTING archive_handle = lv_handle record_structure = 'MSR_D_SPLIT_REL' TABLES table = lt_msr_d_split_rel.
ARCHIVE_PUT_TABLE CALL FUNCTION 'ARCHIVE_PUT_TABLE' EXPORTING archive_handle = lv_handle record_structure = 'MSR_D_PLANNED' TABLES table = lt_msr_d_planned.
ARCHIVE_PUT_TABLE CALL FUNCTION 'ARCHIVE_PUT_TABLE' EXPORTING archive_handle = lv_handle record_structure = 'MSR_D_LOG_STATUS' TABLES table = lt_msr_d_log_status.
ARCHIVE_PUT_TABLE CALL FUNCTION 'ARCHIVE_PUT_TABLE' EXPORTING archive_handle = lv_handle record_structure = 'MSR_D_FIN_STATUS' TABLES table = lt_msr_d_fin_status.
ARCHIVE_SAVE_OBJECT CALL FUNCTION 'ARCHIVE_SAVE_OBJECT' EXPORTING archive_handle = lv_handle EXCEPTIONS termination_requested = 1.
ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_object = lv_object_id i_text = text-002 i_msgtype = 1.
PROGRESS_INDICATOR CALL FUNCTION 'PROGRESS_INDICATOR' EXPORTING i_text = text-040 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-040 i_processed = lv_objects_processed i_total = lv_total_of_objects i_output_immediately = 'X'. "force the progress output
ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_object = lv_object_id i_text = text-005 i_msgtype = 1.
CALL FUNCTION 'ARCHIVE_WRITE_STATISTICS' EXPORTING archive_handle = lv_handle.
ARCHIVE_PROTOCOL_WRITE CALL FUNCTION 'ARCHIVE_PROTOCOL_WRITE'.
ARCHIVE_CLOSE_FILE CALL FUNCTION 'ARCHIVE_CLOSE_FILE' EXPORTING archive_handle = lv_handle.
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 MSR_TRACKING_ARCH_WRITE or its description.
MSR_TRACKING_ARCH_WRITE - Write Program for Archiving Adv. Returns Tracking Data MSR_TRACKING_ARCH_WRITE - Write Program for Archiving Adv. Returns Tracking Data MSR_TRACKING_ARCH_RELOAD - Reload Program for Archiving Adv. Returns Tracking Data MSR_TRACKING_ARCH_RELOAD - Reload Program for Archiving Adv. Returns Tracking Data MSR_TRACKING_ARCH_PREPROC - Preprocessing Program for Archiving Adv. Returns Tracking Data MSR_TRACKING_ARCH_PREPROC - Preprocessing Program for Archiving Adv. Returns Tracking Data