SAP Reports / Programs | Application Platform | Master Data | SAP Business Partner(AP-MD-BP) SAP AP

BUSOBARCH_DELETE SAP ABAP Report - BDT: Archiving - Deletion Program







BUSOBARCH_DELETE is a standard Executable ABAP Report available within your SAP system (depending on your version and release level). It is used for To delete archived data from the database (BDT event ARCH4)...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 BUSOBARCH_DELETE 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 BUSOBARCH_DELETE. "Basic submit
SUBMIT BUSOBARCH_DELETE AND RETURN. "Return to original report after report execution complete
SUBMIT BUSOBARCH_DELETE 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: TESTRUN = Test Run
Selection Text: GV_ARCH = D Object Name
Selection Text: DETAIL = Detail Log
Title: BDT: Archiving - Deletion Program
Text Symbol: B01 = Program Control
Text Symbol: 103 = Number of data records deleted in this DB:
Text Symbol: 101 = table:
Text Symbol: 100 = Following data was deleted in
Text Symbol: 026 = Processed/Created Archiving Session:
Text Symbol: 015 = Stop Time
Text Symbol: 014 = Stop Date
Text Symbol: 013 = StartTime
Text Symbol: 012 = Start Date
Text Symbol: 011 = The deletion program was started by:
Text Symbol: 010 = Number of general master data read:
Text Symbol: 001 = Test run


INCLUDES used within this REPORT BUSOBARCH_DELETE

INCLUDE SBAL_CONSTANTS.


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:

BUS_TBZ1_SELECT_ALL CALL FUNCTION 'BUS_TBZ1_SELECT_ALL' TABLES t_tbz1 = gt_tbz1.

BDT_TBZ1F_GET CALL FUNCTION 'BDT_TBZ1F_GET' EXPORTING iv_objcn = gc_objcn_buss iv_objap = gv_objap TABLES et_tbz1f = lt_tbz1f EXCEPTIONS not_found = 1 OTHERS = 2.

ARCHIVE_GET_CUSTOMIZING_DATA CALL FUNCTION 'ARCHIVE_GET_CUSTOMIZING_DATA' EXPORTING object = pv_arch IMPORTING commit_count_for_delete_prg = pv_commit.

TR_GET_SAPR3_TYPE CALL FUNCTION 'TR_GET_SAPR3_TYPE' TABLES tt_cvers = lt_cvers EXCEPTIONS no_tsyst_entry = 1 OTHERS = 2.

ARCHIVE_OPEN_FOR_DELETE CALL FUNCTION 'ARCHIVE_OPEN_FOR_DELETE' EXPORTING object = gv_arch test_mode = testrun IMPORTING archive_handle = archive_handle EXCEPTIONS no_files_available = 1.

BALW_BAPIRETURN_GET2 CALL FUNCTION 'BALW_BAPIRETURN_GET2' EXPORTING type = sy-msgty cl = sy-msgid number = sy-msgno par1 = sy-msgv1 par2 = sy-msgv2 par3 = sy-msgv3 par4 = sy-msgv4 IMPORTING return = ls_return.

BAL_DB_SAVE CALL FUNCTION 'BAL_DB_SAVE' EXPORTING i_in_update_task = ' ' i_t_log_handle = lt_log_handle EXCEPTIONS OTHERS = 0.

ARCHIVE_GET_INFORMATION CALL FUNCTION 'ARCHIVE_GET_INFORMATION' EXPORTING archive_handle = archive_handle IMPORTING archive_name = pa_name.

ARCHIVE_GET_NEXT_OBJECT CALL FUNCTION 'ARCHIVE_GET_NEXT_OBJECT' EXPORTING archive_handle = archive_handle EXCEPTIONS end_of_file = 01.

ARCHIVE_DELETE_OBJECT_DATA CALL FUNCTION 'ARCHIVE_DELETE_OBJECT_DATA' EXPORTING archive_handle = archive_handle EXCEPTIONS internal_error = 1 wrong_access_to_archive = 2 OTHERS = 3.

ARCHIVE_GET_NEXT_RECORD CALL FUNCTION 'ARCHIVE_GET_NEXT_RECORD' EXPORTING archive_handle = archive_handle IMPORTING record_ref = lv_record_ref record_flags = lt_delete-del_flag record_structure = lt_delete-tabname EXCEPTIONS end_of_object = 1.

BAL_DB_SAVE CALL FUNCTION 'BAL_DB_SAVE' EXPORTING i_in_update_task = ' ' i_t_log_handle = lt_log_handle EXCEPTIONS OTHERS = 0.

BAL_DB_SAVE CALL FUNCTION 'BAL_DB_SAVE' EXPORTING i_in_update_task = ' ' i_t_log_handle = lt_log_handle EXCEPTIONS OTHERS = 0.

ARCHIVE_GIVE_STATISTICS CALL FUNCTION 'ARCHIVE_GIVE_STATISTICS' EXPORTING archive_handle = archive_handle TABLES table = lt_archstat.

ARCHIVE_CLOSE_FILE CALL FUNCTION 'ARCHIVE_CLOSE_FILE' EXPORTING archive_handle = archive_handle.

BAL_LOG_MSG_ADD CALL FUNCTION 'BAL_LOG_MSG_ADD' EXPORTING i_s_msg = ls_msg_bal i_log_handle = gv_log_handle EXCEPTIONS log_not_found = 0 OTHERS = 1.



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