S3VBAKWRS is a standard Executable ABAP Report available within your SAP system (depending on your version and release level). It is used for Archiving Sales Documents in SD: Write Program With this program you can write sales documents from the database to 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 S3VBAKWRS 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.
Selection Text: CHK_AEDA = Change Date: Residence Time
Selection Text: C_AUSG = Check FI Document
Selection Text: C_BANF = Check purchase order
Selection Text: C_DBAS = Check Flow Documents Residence
Selection Text: C_EDATE = D .
Selection Text: P_AR_ILM = D .
Selection Text: P_COMENT = D .
Selection Text: P_DELTST = D .
Selection Text: P_DEST = D .
Selection Text: P_PROT = D .
Selection Text: P_PROT_O = D .
Selection Text: P_SNAP = D .
Selection Text: P_WRIPRD = D .
Selection Text: P_WRITST = D .
Selection Text: SO_AUART = D .
Selection Text: SO_ERDAT = D .
Selection Text: SO_VBELN = D .
Selection Text: SO_VKORG = D .
Title: Archiving Orders: Write Program
Text Symbol: N01 = Snapshot archived
Text Symbol: N02 = Retention Period Ended
INCLUDE ARCHCOMO.
INCLUDE RVVBTYP.
INCLUDE S3VBAKTB.
INCLUDE MK70DBZO.
INCLUDE SDZAVDAT.
INCLUDE S3VBAKSEL.
INCLUDE S3VBAKCDS.
INCLUDE ARCH_WRITE_PRG_STANDARD2.
No SAP DATABASE tables are accessed within this REPORT code!
ARCHIVE_PROTOCOL_INIT_APPL call function 'ARCHIVE_PROTOCOL_INIT_APPL' exporting i_detailprotocol = p_prot.
ARCHIVE_OPEN_FOR_WRITE call function 'ARCHIVE_OPEN_FOR_WRITE' exporting call_delete_job_in_test_mode = p_deltst create_archive_file = p_wriprd object = 'SD_VBAK' comments = p_coment do_not_delete_data = l_not_delete destroy = l_destroy output_sel_screen_when_dialog = space output_sel_screen_when_batch = space importing archive_handle = archive_handle exceptions internal_error = 1 object_not_found = 2 open_error = 3 not_authorized = 4.
ARCHIVE_PROTOCOL_COLLECT call function 'ARCHIVE_PROTOCOL_COLLECT' exporting i_msgtype = 2 i_msgid = sy-msgid i_msgno = sy-msgno i_msgv1 = sy-msgv1 i_msgv2 = sy-msgv2 i_msgv3 = sy-msgv3 i_msgv4 = sy-msgv4.
ARCHIVE_PROTOCOL_WRITE call function 'ARCHIVE_PROTOCOL_WRITE'.
ARCHIVE_WRITE_STATISTICS call function 'ARCHIVE_WRITE_STATISTICS' exporting archive_handle = archive_handle.
ARCHIVE_CLOSE_FILE call function 'ARCHIVE_CLOSE_FILE' exporting archive_handle = archive_handle.
ARCHIVE_PROTOCOL_WRITE_APPL call function 'ARCHIVE_PROTOCOL_WRITE_APPL'.
GET_HANDLE_SD_ARCHIVING call function 'GET_HANDLE_SD_ARCHIVING' importing handle = lv_sd_archiving_exit active = lv_active.
MESSAGES_INITIALIZE call function 'MESSAGES_INITIALIZE' exporting collect_and_send = ' ' reset = 'X' line_from = '000' line_to = '999'.
CK_F_READ_COSTING call function 'CK_F_READ_COSTING' tables t_vbxx = xvbxx t_kanz = xkanz t_keko = xkeko t_keph = xkeph t_ckhs = xckhs t_ckht = xckht t_ckis = xckis t_ckit = xckit t_cmfk = xcmfk t_cmfp = xcmfp t_knko = xknko.
ARCHIVE_NEW_OBJECT call function 'ARCHIVE_NEW_OBJECT' exporting archive_handle = if_archive_handle object_id = obj_id.
ARCHIVE_PUT_RECORD call function 'ARCHIVE_PUT_RECORD' exporting archive_handle = if_archive_handle record = xvbuk record_flags = ' ' record_structure = 'VBUK'.
CHANGEDOCU_ARCHIVE_OBJECT call function 'CHANGEDOCU_ARCHIVE_OBJECT' exporting archive_handle = if_archive_handle objectclass = cdhdr-objectclas objectid = cdhdr-objectid.
ARCHIVE_PUT_RECORD call function 'ARCHIVE_PUT_RECORD' exporting archive_handle = if_archive_handle record = xvbak record_flags = ' ' record_structure = 'VBAK'.
TEXT_ARCHIVE_OBJECT call function 'TEXT_ARCHIVE_OBJECT' exporting archive_handle = if_archive_handle client = sy-mandt id = '*' language = '*' name = textname object = 'VBBK' object_delete_flag = 'X'.
TEXT_ARCHIVE_OBJECT call function 'TEXT_ARCHIVE_OBJECT' exporting archive_handle = if_archive_handle client = sy-mandt id = '*' language = '*' name = textname object = 'VBBP' object_delete_flag = 'X'.
CU_CONFIG_ARCHIVE_OBJECT call function 'CU_CONFIG_ARCHIVE_OBJECT' exporting archive_handle = if_archive_handle object_delete_flag = 'X' instance = it_vbap-cuobj instance_obtab = 'VBPS' instance_keyfields = keyfields.
CLASSIFY_ARCHIVE_OBJECT call function 'CLASSIFY_ARCHIVE_OBJECT' exporting archive_handle = if_archive_handle object = cl_obj ptable = cl_table object_delete_flag = 'X'.
call function 'K_TOTAL_ARCHIVE_OBJECT' exporting i_archive_handle = if_archive_handle tables t_objnr = lt_objnr.
ARCHIVE_PUT_TABLE call function 'ARCHIVE_PUT_TABLE' exporting archive_handle = if_archive_handle record_flags = ' ' record_structure = 'VBFA' tables table = yvbfa.
ARCHIVE_PUT_TABLE call function 'ARCHIVE_PUT_TABLE' exporting archive_handle = if_archive_handle record_flags = ' ' record_structure = 'NAST' tables table = ynast.
ARCHIVE_PUT_TABLE call function 'ARCHIVE_PUT_TABLE' exporting archive_handle = if_archive_handle record_flags = ' ' record_structure = 'VBEX' tables table = yvbex.
ARCHIVE_PUT_TABLE call function 'ARCHIVE_PUT_TABLE' exporting archive_handle = if_archive_handle record_flags = ' ' record_structure = 'VBKD' tables table = yvbkd.
ARCHIVE_PUT_TABLE call function 'ARCHIVE_PUT_TABLE' exporting archive_handle = if_archive_handle record_flags = ' ' record_structure = 'VBUP' tables table = yvbup.
CK_F_COSTING_WHAT call function 'CK_F_COSTING_WHAT' exporting kalkulationsvariante = yvbap-klvar importing erzeugniskalkulation = erz_flag.
K_UNITCOST_ARCHIVE_OBJECT call function 'K_UNITCOST_ARCHIVE_OBJECT' exporting i_archive_handle = if_archive_handle i_rk70f = rk70f i_bzobj = bzobj_kndauftrag.
ARCHIVE_PUT_TABLE call function 'ARCHIVE_PUT_TABLE' exporting archive_handle = if_archive_handle record_flags = ' ' record_structure = 'VBAP' tables table = yvbap.
ARCHIVE_PUT_TABLE call function 'ARCHIVE_PUT_TABLE' exporting archive_handle = if_archive_handle record_flags = ' ' record_structure = 'DGMSD' tables table = ydgmsd.
ARCHIVE_PUT_TABLE call function 'ARCHIVE_PUT_TABLE' exporting archive_handle = if_archive_handle record_flags = ' ' record_structure = 'VBEP' tables table = yvbep.
ARCHIVE_PUT_TABLE call function 'ARCHIVE_PUT_TABLE' exporting archive_handle = if_archive_handle record_flags = ' ' record_structure = 'VBEPDG' tables table = yvbepdg.
ARCHIVE_PUT_TABLE call function 'ARCHIVE_PUT_TABLE' exporting archive_handle = if_archive_handle record_flags = ' ' record_structure = 'VBLB' tables table = yvblb.
ARCHIVE_PUT_TABLE call function 'ARCHIVE_PUT_TABLE' exporting archive_handle = if_archive_handle record_flags = ' ' record_structure = 'VBEH' tables table = yvbeh.
ARCHIVE_PUT_TABLE call function 'ARCHIVE_PUT_TABLE' exporting archive_handle = if_archive_handle record_flags = ' ' record_structure = 'VBSN' tables table = yvbsn.
ARCHIVE_PUT_TABLE call function 'ARCHIVE_PUT_TABLE' exporting archive_handle = if_archive_handle record_flags = ' ' record_structure = 'VEDA' tables table = yveda.
ARCHIVE_PUT_TABLE call function 'ARCHIVE_PUT_TABLE' exporting archive_handle = if_archive_handle record_flags = ' ' record_structure = 'FPLA' tables table = yfpla.
ARCHIVE_PUT_TABLE call function 'ARCHIVE_PUT_TABLE' exporting archive_handle = if_archive_handle record_flags = ' ' record_structure = 'FPLT' tables table = yfplt.
ARCHIVE_PUT_TABLE call function 'ARCHIVE_PUT_TABLE' exporting archive_handle = if_archive_handle record_flags = ' ' record_structure = 'FPLTC' tables table = yfpltc.
ARCHIVE_PUT_TABLE call function 'ARCHIVE_PUT_TABLE' exporting archive_handle = if_archive_handle record_flags = ' ' record_structure = 'KONV' tables table = ykonv.
PRC_SUPPL_ARCHIVE_OBJECT CALL FUNCTION 'PRC_SUPPL_ARCHIVE_OBJECT' EXPORTING iv_archive_handle = archive_handle is_key = ls_key iv_object_delete_flag = abap_true EXCEPTIONS wrong_access_to_archive = 1 OTHERS = 2.
ARCHIVE_PUT_TABLE call function 'ARCHIVE_PUT_TABLE' exporting archive_handle = if_archive_handle record_flags = ' ' record_structure = 'SADR' tables table = ysadr.
ADDRESS_ARCHIVE_OBJECT call function 'ADDRESS_ARCHIVE_OBJECT' exporting archive_handle = if_archive_handle address_object_type = gcf_address_type_company address_number = p_adrnr address_reference = addr_ref.
ADDRESS_ARCHIVE_OBJECT call function 'ADDRESS_ARCHIVE_OBJECT' exporting archive_handle = if_archive_handle address_object_type = gcf_address_type_company address_number = p_adrnr address_reference = addr_ref.
ARCHIVE_PUT_TABLE call function 'ARCHIVE_PUT_TABLE' exporting archive_handle = if_archive_handle record_flags = ' ' record_structure = 'VBPA' tables table = yvbpa.
ARCHIVE_PUT_TABLE call function 'ARCHIVE_PUT_TABLE' exporting archive_handle = if_archive_handle record_flags = ' ' record_structure = 'VBPA3' tables table = yvbpa3.
ARCHIVE_PUT_TABLE call function 'ARCHIVE_PUT_TABLE' exporting archive_handle = if_archive_handle record_flags = ' ' record_structure = 'VBPA2' tables table = yvbpa2.
ARCHIVE_PUT_TABLE call function 'ARCHIVE_PUT_TABLE' exporting archive_handle = if_archive_handle record_flags = ' ' record_structure = 'VBUV' tables table = yvbuv.
ARCHIVE_PUT_TABLE call function 'ARCHIVE_PUT_TABLE' exporting archive_handle = if_archive_handle record_flags = ' ' record_structure = 'KANZ' tables table = ykanz.
ARCHIVE_PUT_TABLE call function 'ARCHIVE_PUT_TABLE' exporting archive_handle = if_archive_handle record_flags = ' ' record_structure = 'KEKO' tables table = ykeko.
ARCHIVE_PUT_TABLE call function 'ARCHIVE_PUT_TABLE' exporting archive_handle = if_archive_handle record_flags = ' ' record_structure = 'KEPH' tables table = ykeph.
ARCHIVE_PUT_TABLE call function 'ARCHIVE_PUT_TABLE' exporting archive_handle = if_archive_handle record_flags = ' ' record_structure = 'CKHS' tables table = yckhs.
ARCHIVE_PUT_TABLE call function 'ARCHIVE_PUT_TABLE' exporting archive_handle = if_archive_handle record_flags = ' ' record_structure = 'CKHT' tables table = yckht.
ARCHIVE_PUT_TABLE call function 'ARCHIVE_PUT_TABLE' exporting archive_handle = if_archive_handle record_flags = ' ' record_structure = 'CKIS' tables table = yckis.
ARCHIVE_PUT_TABLE call function 'ARCHIVE_PUT_TABLE' exporting archive_handle = if_archive_handle record_flags = ' ' record_structure = 'CKIT' tables table = yckit.
ARCHIVE_PUT_TABLE call function 'ARCHIVE_PUT_TABLE' exporting archive_handle = if_archive_handle record_flags = ' ' record_structure = 'CMFK' tables table = ycmfk.
ARCHIVE_PUT_TABLE call function 'ARCHIVE_PUT_TABLE' exporting archive_handle = if_archive_handle record_flags = ' ' record_structure = 'CMFP' tables table = ycmfp.
ARCHIVE_PUT_TABLE call function 'ARCHIVE_PUT_TABLE' exporting archive_handle = if_archive_handle record_flags = ' ' record_structure = 'KNKO' tables table = yknko.
ARCHIVE_PUT_TABLE call function 'ARCHIVE_PUT_TABLE' exporting archive_handle = if_archive_handle record_flags = ' ' record_structure = 'S073' tables table = ys073.
ARCHIVE_PUT_TABLE call function 'ARCHIVE_PUT_TABLE' exporting archive_handle = if_archive_handle record_flags = ' ' record_structure = 'VBKFZ' tables table = yvbkfz.
ARCHIVE_PUT_TABLE CALL FUNCTION 'ARCHIVE_PUT_TABLE' EXPORTING ARCHIVE_HANDLE = if_archive_handle RECORD_FLAGS = ' ' RECORD_STRUCTURE = 'LOGTRM_RDP_HDR' TABLES TABLE = YLOGTRM_RDP_HDR.
ARCHIVE_PUT_TABLE CALL FUNCTION 'ARCHIVE_PUT_TABLE' EXPORTING ARCHIVE_HANDLE = if_archive_handle RECORD_FLAGS = ' ' RECORD_STRUCTURE = 'LOGTRM_RDP_ITM' TABLES TABLE = YLOGTRM_RDP_ITM.
ARCHIVE_PUT_TABLE call function 'ARCHIVE_PUT_TABLE' exporting archive_handle = if_archive_handle record_flags = ' ' record_structure = 'PAYSP_HL' tables table = ypaysp_hl.
ARCHIVE_SAVE_OBJECT call function 'ARCHIVE_SAVE_OBJECT' exporting archive_handle = if_archive_handle exceptions termination_requested = 1 file_io_error = 2 internal_error = 3 open_error = 4 wrong_access_to_archive = 5 data_object_not_saved = 6 others = 7.
ARCHIVE_PROTOCOL_COLLECT call function 'ARCHIVE_PROTOCOL_COLLECT' exporting i_object = prot_part-vbeln i_msgtype = 2 i_msgid = sy-msgid i_msgno = sy-msgno i_msgv1 = sy-msgv1 i_msgv2 = sy-msgv2 i_msgv3 = sy-msgv3 i_msgv4 = sy-msgv4.
ARCHIVE_PROTOCOL_COLLECT call function 'ARCHIVE_PROTOCOL_COLLECT' exporting i_object = prot_part-vbeln i_msgtype = 1 i_text = lf_text.
ARCHIVE_PROTOCOL_COLLECT call function 'ARCHIVE_PROTOCOL_COLLECT' exporting i_object = prot_part-vbeln i_msgtype = 1 i_text = lf_text.
K_UNITCOST_INIT call function 'K_UNITCOST_INIT' exporting i_obj_delete_flag = 'X'.
K_TOTAL_INIT call function 'K_TOTAL_INIT' exporting i_obj_delete_flag = 'X' tables t_objnr_select = lt_sel.
DYNSQL_READ_CONTROL_TABLE call function 'DYNSQL_READ_CONTROL_TABLE' exporting key_1 = it_vbak-auart key_2 = it_vbak-vkorg importing control_line = gt_ztvara exceptions key_value_invalid = 1 others = 2.
CPE_APPL_ACTIVATED_CHECK_CB call function 'CPE_APPL_ACTIVATED_CHECK_CB' exporting iv_application = 'V ' importing ev_activated = lv_cpe_active exceptions not_found = 1 others = 2.
CPE_KNUMVTOGUID_READ_MULTI_DB call function 'CPE_KNUMVTOGUID_READ_MULTI_DB' exporting it_knumv_struct = lt_knumv importing et_knumvtoguid = gt_knumvtoguid exceptions nothing_found = 1.
CPE_DEFFORMULA_ALL_PRESELEC_AC call function 'CPE_DEFFORMULA_ALL_PRESELEC_AC' exporting it_doc_guid = lt_doc_guid.
CPE_FORMULA_ALL_PRESELECT_AC call function 'CPE_FORMULA_ALL_PRESELECT_AC' exporting it_docitem_guid = lt_docitem_guid.
CPE_APPL_ACTIVATED_CHECK_CB call function 'CPE_APPL_ACTIVATED_CHECK_CB' exporting iv_application = 'V ' importing ev_activated = lv_cpe_active exceptions not_found = 1 others = 2.
ARCHIVE_PUT_TABLE call function 'ARCHIVE_PUT_TABLE' exporting archive_handle = archive_handle record_flags = ' ' record_structure = 'CPED_KNUMVTOGUID' tables table = lt_knumvtoguid.
CPE_DEFFORMULA_ALL_SAVE_AC call function 'CPE_DEFFORMULA_ALL_SAVE_AC' exporting iv_archive_handle = archive_handle it_doc_guid = lt_doc_guid.
CPE_FORMULA_ALL_SAVE_AC call function 'CPE_FORMULA_ALL_SAVE_AC' exporting iv_archive_handle = archive_handle it_docitem_guid = lt_docitem_guid.
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 S3VBAKWRS or its description.