SAP Reports / Programs

RSBDC_ARCHIVE SAP ABAP Report - Archiving Batch Input Logs Using ADK







RSBDC_ARCHIVE is a standard Executable ABAP Report available within your SAP system (depending on your version and release level). It is used for This program is used to archive the batch input logs for sessions with status "Processed"...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 RSBDC_ARCHIVE 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 RSBDC_ARCHIVE. "Basic submit
SUBMIT RSBDC_ARCHIVE AND RETURN. "Return to original report after report execution complete
SUBMIT RSBDC_ARCHIVE 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: WEEK = Week
Selection Text: TO_TIM = Time to
Selection Text: TO_DAT = Date/Time To
Selection Text: TESTRUN = Test run
Selection Text: PERIOD = Days
Selection Text: MONTH = Month
Selection Text: MAPPE = Session name
Selection Text: INTERVAL = Interval
Selection Text: FROM_TIM = Beginning time
Selection Text: FROM_DAT = Date/Time From
Selection Text: FILE_CRE = Generate archive file
Selection Text: DAYS = Day
Selection Text: ALLTIME = Unlimited
Title: Archiving Batch Input Logs Using ADK
Text Symbol: 021 = From date
Text Symbol: 020 = Logs:
Text Symbol: 013 = Generate archive file
Text Symbol: 012 = Deletion Program as Test Run
Text Symbol: 011 = Unlimited
Text Symbol: 010 = Older than one month
Text Symbol: 009 = Older than one week
Text Symbol: 008 = Interval
Text Symbol: 007 = Days
Text Symbol: 006 = Older than
Text Symbol: 005 = Time limit
Text Symbol: 004 = (generic or fully specified)
Text Symbol: 003 = Session name
Text Symbol: 002 = Archive logs with
Text Symbol: 001 = Archive batch input logs
Text Symbol: 022 = to


INCLUDES used within this REPORT RSBDC_ARCHIVE

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 = OBJECT_TEXT CREATE_ARCHIVE_FILE = FILE_CRE OBJECT = 'BDCLOGPROD' IMPORTING ARCHIVE_HANDLE = HANDLE EXCEPTIONS INTERNAL_ERROR = 1 OBJECT_NOT_FOUND = 2 OPEN_ERROR = 3 NOT_AUTHORIZED = 4.

ARCHIVE_NEW_OBJECT CALL FUNCTION 'ARCHIVE_NEW_OBJECT' EXPORTING ARCHIVE_HANDLE = HANDLE OBJECT_ID = DATA_OBJECT_ID.

ARCHIVE_PUT_RECORD CALL FUNCTION 'ARCHIVE_PUT_RECORD' EXPORTING ARCHIVE_HANDLE = HANDLE RECORD_STRUCTURE = 'BDCLM' RECORD_FLAGS = ' ' RECORD = BDCLM_ITAB.

ARCHIVE_SAVE_OBJECT CALL FUNCTION 'ARCHIVE_SAVE_OBJECT' EXPORTING ARCHIVE_HANDLE = HANDLE.

ARCHIVE_WRITE_STATISTICS CALL FUNCTION 'ARCHIVE_WRITE_STATISTICS' EXPORTING ARCHIVE_HANDLE = HANDLE.

ARCHIVE_CLOSE_FILE CALL FUNCTION 'ARCHIVE_CLOSE_FILE' EXPORTING ARCHIVE_HANDLE = HANDLE.

BDC_PROTOCOL_SELECT CALL FUNCTION 'BDC_PROTOCOL_SELECT' EXPORTING NAME = MAPPENNAME CLIENT = SY-MANDT DATE_FROM = DATUM_VON DATE_TO = DATUM_BIS TIME_FROM = ZEIT_VON TIME_TO = ZEIT_BIS STATUS = '*' SESSION_USER = '*' TABLES APQLTAB = LOGTAB_TEMSE EXCEPTIONS INVALID_DATA = 1 OTHERS = 2.

RSTS_OPEN_RLC CALL FUNCTION 'RSTS_OPEN_RLC' EXPORTING NAME = LOG_NAME CLIENT = LOG_CLIENT AUTHORITY = 'BATCH' PROM = 'I' RECTYP = 'VNL----' EXCEPTIONS FB_CALL_HANDLE = 4 FB_ERROR = 8 FB_RSTS_NOCONV = 12 FB_RSTS_OTHER = 16 NO_OBJECT = 20 OTHERS = 24.

RSTS_READ CALL FUNCTION 'RSTS_READ' TABLES DATATAB = LOG_TABLE EXCEPTIONS FB_CALL_HANDLE = 4 FB_ERROR = 8 FB_RSTS_NOCONV = 12 FB_RSTS_OTHER = 16 OTHERS = 16.

RSTS_CLOSE CALL FUNCTION 'RSTS_CLOSE' EXCEPTIONS OTHERS = 4.



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