RSARCH04 is a standard Executable ABAP Report available within your SAP system (depending on your version and release level). It is used for This is an example program for showing how function modules are used for writing archives...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 RSARCH04 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: CREATE = Generate Archive File
Selection Text: TESTRUN = Delete program as test run
Title: Example Program for Archiving Data
Text Symbol: 001 = This is only test data. It can be deleted.
No INCLUDES are used within this REPORT code!
No SAP DATABASE tables are accessed within this REPORT code!
ARCHIVE_OPEN_FOR_WRITE CALL FUNCTION 'ARCHIVE_OPEN_FOR_WRITE' EXPORTING call_delete_job_in_test_mode = testrun comments = text-001 create_archive_file = create object = 'EXAMPLE' IMPORTING archive_handle = handle.
ARCHIVE_NEW_OBJECT CALL FUNCTION 'ARCHIVE_NEW_OBJECT' EXPORTING archive_handle = handle object_id = filepath_tab-pathintern.
ARCHIVE_PUT_RECORD CALL FUNCTION 'ARCHIVE_PUT_RECORD' EXPORTING archive_handle = handle record_structure = 'FILEPATH' record_flags = ' ' record = filepath_tab.
ARCHIVE_PUT_RECORD CALL FUNCTION 'ARCHIVE_PUT_RECORD' EXPORTING archive_handle = handle record_flags = ' ' record_structure = 'FILENAME' record = filename_tab.
FILENAME_ARCHIVE_OBJECT CALL FUNCTION 'FILENAME_ARCHIVE_OBJECT' EXPORTING archive_handle = handle client = filename_tab-mandt logical_filename = filename_tab-fileintern object_delete_flag = 'X'.
ARCHIVE_PUT_RECORD CALL FUNCTION 'ARCHIVE_PUT_RECORD' EXPORTING archive_handle = handle record_flags = ' ' record_structure = 'FILENAMECI' record = filenameci_tab.
ARCHIVE_SAVE_OBJECT CALL FUNCTION 'ARCHIVE_SAVE_OBJECT' EXPORTING archive_handle = handle EXCEPTIONS termination_requested = 1.
ARCHIVE_WRITE_STATISTICS CALL FUNCTION 'ARCHIVE_WRITE_STATISTICS' EXPORTING statistics_only_per_run = 'X' archive_handle = handle.
ARCHIVE_CLOSE_FILE CALL FUNCTION 'ARCHIVE_CLOSE_FILE' EXPORTING archive_handle = 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.
RSARCH04 - Example Program for Archiving Data RSARCH04 - Example Program for Archiving Data RSARCH03 - Example Program for Reading Archives RSARCH03 - Example Program for Reading Archives RSARCH02 - Example Program for Reading Archive Management records RSARCH02 - Example Program for Reading Archive Management records