SAP Reports / Programs | Basis Components | Use Subcomponents | Archive Development Kit(BC-CCM-ADK) SAP BC

RSARCH04 SAP ABAP Report - Example Program for Archiving Data







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


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 RSARCH04. "Basic submit
SUBMIT RSARCH04 AND RETURN. "Return to original report after report execution complete
SUBMIT RSARCH04 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: 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.


INCLUDES used within this REPORT RSARCH04

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:

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.



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