ARCHVBFA is a standard Executable ABAP Report available within your SAP system (depending on your version and release level). It is used for Archiving Billing Documents: Reading from the Archive and Deleting the VBFA Records This report is used to clean up VBFA records that are no longer necessary...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 ARCHVBFA 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.
Reading VBFA records from the archive
Title: Program ARCHVBFA
Text Symbol: 001 = VBFA Recs
Text Symbol: 002 = ArchiveInf
No INCLUDES are used within this REPORT code!
No SAP DATABASE tables are accessed within this REPORT code!
ARCHIVE_OPEN_FOR_READ CALL FUNCTION 'ARCHIVE_OPEN_FOR_READ' EXPORTING OBJECT = 'SD_VBRK' IMPORTING ARCHIVE_HANDLE = ARCHIVE_HANDLE.
ARCHIVE_GET_NEXT_OBJECT CALL FUNCTION 'ARCHIVE_GET_NEXT_OBJECT' EXPORTING ARCHIVE_HANDLE = ARCHIVE_HANDLE EXCEPTIONS END_OF_FILE = 01.
ARCHIVE_GET_TABLE CALL FUNCTION 'ARCHIVE_GET_TABLE' EXPORTING ARCHIVE_HANDLE = ARCHIVE_HANDLE RECORD_STRUCTURE = 'VBRP' ALL_RECORDS_OF_OBJECT = 'X' TABLES TABLE = XVBRP EXCEPTIONS END_OF_OBJECT = 1 INTERNAL_ERROR = 2 WRONG_ACCESS_TO_ARCHIVE = 3 OTHERS = 4.
ARCHIVE_CLOSE_FILE CALL FUNCTION 'ARCHIVE_CLOSE_FILE' EXPORTING ARCHIVE_HANDLE = ARCHIVE_HANDLE.
REUSE_ALV_LIST_DISPLAY CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY' EXPORTING I_CALLBACK_PROGRAM = g_repid IS_LAYOUT = gt_layout IT_FIELDCAT = gt_fieldcat I_SAVE = gc_save IT_EVENTS = gt_events TABLES T_OUTTAB = gt_output_vbfa EXCEPTIONS PROGRAM_ERROR = 1 OTHERS = 2.
REUSE_ALV_EVENTS_GET CALL FUNCTION 'REUSE_ALV_EVENTS_GET' IMPORTING ET_EVENTS = xt_events EXCEPTIONS LIST_TYPE_WRONG = 1 OTHERS = 2.
REUSE_ALV_COMMENTARY_WRITE CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE' EXPORTING it_list_commentary = gt_top_of_list.
REUSE_ALV_FIELDCATALOG_MERGE CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE' EXPORTING I_PROGRAM_NAME = G_REPID I_STRUCTURE_NAME = IS_NAME CHANGING CT_FIELDCAT = XT_FIELDCAT EXCEPTIONS INCONSISTENT_INTERFACE = 1 PROGRAM_ERROR = 2 OTHERS = 3.
Although this basic information may have limited use it does provide an easy to find location to store any knowledge about this program/report.