SAP Reports / Programs | Sales and Distribution | Basic Functions(SD-BF) SAP SD

S3VBAKDL SAP ABAP Report - Archiving orders: Deletion program







S3VBAKDL is a standard Executable ABAP Report available within your SAP system (depending on your version and release level). It is used for Archiving of Sales Documents in SD: Delete Program This program deletes sales documents from the database, after they have been written from the write program into the archive files...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 S3VBAKDL 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 S3VBAKDL. "Basic submit
SUBMIT S3VBAKDL AND RETURN. "Return to original report after report execution complete
SUBMIT S3VBAKDL 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: TESTLAUF = Test run
Title: Archiving orders: Deletion program


INCLUDES used within this REPORT S3VBAKDL

INCLUDE ARCHCOMO.
INCLUDE S3VBAKTB.


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:

K_TOTAL_INIT CALL FUNCTION 'K_TOTAL_INIT' EXPORTING I_OBJ_DELETE_FLAG = 'X'.

ARCHIVE_OPEN_FOR_DELETE CALL FUNCTION 'ARCHIVE_OPEN_FOR_DELETE' EXPORTING OBJECT = 'SD_VBAK' TEST_MODE = TESTLAUF IMPORTING ARCHIVE_HANDLE = ARCHIVE_HANDLE.

ARCHIVE_GET_CUSTOMIZING_DATA CALL FUNCTION 'ARCHIVE_GET_CUSTOMIZING_DATA' EXPORTING OBJECT = 'SD_VBAK' IMPORTING COMMIT_COUNT_FOR_DELETE_PRG = COMMCNT.

NAMETAB_GET CALL FUNCTION 'NAMETAB_GET' EXPORTING LANGU = SY-LANGU ONLY = 'H' TABNAME = 'KONV' IMPORTING HEADER = XHEADER RC = RC_T TABLES NAMETAB = NAMETAB EXCEPTIONS INTERNAL_ERROR = 1 TABLE_HAS_NO_FIELDS = 2 TABLE_NOT_ACTIV = 3 NO_TEXTS_FOUND = 4 OTHERS = 5.

NAMETAB_GET CALL FUNCTION 'NAMETAB_GET' EXPORTING LANGU = SY-LANGU ONLY = 'H' TABNAME = 'VBFA' IMPORTING HEADER = XHEADER RC = RC_T TABLES NAMETAB = NAMETAB EXCEPTIONS INTERNAL_ERROR = 1 TABLE_HAS_NO_FIELDS = 2 TABLE_NOT_ACTIV = 3 NO_TEXTS_FOUND = 4 OTHERS = 5.

ARCHIVE_GET_NEXT_OBJECT CALL FUNCTION 'ARCHIVE_GET_NEXT_OBJECT' EXPORTING ARCHIVE_HANDLE = ARCHIVE_HANDLE IMPORTING OBJECT_ID = OBJ_ID OBJECT_OFFSET = OBJ_OFFSET ARCHIVE_NAME = ARC_NAME EXCEPTIONS END_OF_FILE = 01.

ARCHIVE_DELETE_OBJECT_DATA CALL FUNCTION 'ARCHIVE_DELETE_OBJECT_DATA' EXPORTING ARCHIVE_HANDLE = ARCHIVE_HANDLE.

ARCHIVE_GET_NEXT_RECORD CALL FUNCTION 'ARCHIVE_GET_NEXT_RECORD' EXPORTING ARCHIVE_HANDLE = ARCHIVE_HANDLE IMPORTING RECORD_FLAGS = ARC_BUFFER-FLAGS RECORD_STRUCTURE = ARC_BUFFER-RNAME RECORD_REF = GF_RECORD_REF EXCEPTIONS END_OF_OBJECT = 01 WRONG_ACCESS_TO_ARCHIVE = 02.

ARCHIVE_CLOSE_FILE CALL FUNCTION 'ARCHIVE_CLOSE_FILE' EXPORTING ARCHIVE_HANDLE = ARCHIVE_HANDLE.

NAST_PROTOCOL_DELETE CALL FUNCTION 'NAST_PROTOCOL_DELETE' EXPORTING NR = LNAST-CMFPNR.

CK_F_DELETE_COSTING CALL FUNCTION 'CK_F_DELETE_COSTING' TABLES T_KANZ = LKANZ T_KEKO = LKEKO T_KEPH = LKEPH T_CKHS = LCKHS T_CKHT = LCKHT T_CKIS = LCKIS T_CKIT = LCKIT T_CMFK = LCMFK T_CMFP = LCMFP T_KNKO = LKNKO EXCEPTIONS OTHERS = 1.

GET_HANDLE_SD_ARCHIVING CALL FUNCTION 'GET_HANDLE_SD_ARCHIVING' IMPORTING HANDLE = L_SD_ARCHIVING_EXIT ACTIVE = ACTIVE.

RV_SALES_DOCUMENT_INDEX_UPDAT CALL FUNCTION 'RV_SALES_DOCUMENT_INDEX_UPDAT' EXPORTING FXVBAK = XVBAK FYVBAK = YVBAK DB_ERROR_HANDLING = 'X' ARRAY_DELETE = 'X' TABLES FXVBEP = XVBEP FXVBFA = XVBFA FXVBKD = XVBKD FXVBAP = XVBAP FXVBPA = XVBPA FXVBUK = XVBUK FXVBUP = XVBUP FYVBEP = YVBEP FYVBFA = YVBFA FYVBKD = YVBKD FYVBAP = YVBAP FYVBPA = YVBPA FYVBUK = YVBUK FYVBUP = YVBUP ct_statistics = gt_statistics.

RV_INDEX_ARRAY_DELETE call function 'RV_INDEX_ARRAY_DELETE' tables ct_statistics = gt_statistics.

ARCHIVE_GIVE_STATISTICS CALL FUNCTION 'ARCHIVE_GIVE_STATISTICS' EXPORTING archive_handle = ARCHIVE_HANDLE TABLES table = gt_statistics EXCEPTIONS internal_error = 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 S3VBAKDL or its description.