SD_AGREEM_ARCH_WRITE is a standard Executable ABAP Report available within your SAP system (depending on your version and release level). Below is the basic information available for this SAP report including which OBJECTS it interacts with such as TABLES, FUNCTION MODULES, INCLUDES ETC. Also check out the submitted Comments related to this SAP report or see any standard documentation available.
If you would like to execute this report or see the full code listing simply enter SD_AGREEM_ARCH_WRITE 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: P_ABTY_A = Rebate Agreement - Sales
Selection Text: P_ABTY_B = Promotion
Selection Text: P_ABTY_C = Sales Deal
Selection Text: P_ABTY_F = Agreement - Purchasing Cust.
Selection Text: P_ABTY_K = Agreement - Purchasing Vendor
Selection Text: P_DAT1 = Past Period
Selection Text: P_DAT2 = Past Date
Selection Text: P_RDATE = Archiving Key Date
Selection Text: P_TAGE = Past Period in Days
Selection Text: S_BOART = Agreement Type
Selection Text: S_EKORG = Purchasing organization
Selection Text: S_KNUMA = Agreement
Selection Text: S_SPART = Division
Selection Text: S_SPARTE = Division
Selection Text: P_WRITST = D .
Selection Text: P_WRIPRD = D .
Selection Text: P_SNAP = D .
Selection Text: P_PROT_O = D .
Selection Text: P_PROT = D .
Selection Text: P_DEST = D .
Selection Text: P_DELTST = D .
Selection Text: P_COMENT = D .
Selection Text: P_AR_ILM = D .
Selection Text: S_VTWEGE = Distribution Channel
Selection Text: S_VTWEG = Distribution Channel
Selection Text: S_VKORGE = Sales Organization
Selection Text: S_VKORG = Sales Organization
Title: Agreements Archiving: New Write Program
Text Symbol: 206 = POrg
Text Symbol: 207 = Date from
Text Symbol: 208 = Date to
Text Symbol: 209 = Label
Text Symbol: 210 = Wr.
Text Symbol: 211 = Ov. Agree.
Text Symbol: 300 = Archive File
Text Symbol: 301 = Created On
Text Symbol: 302 = SAP System
Text Symbol: 303 = SAP Release
INCLUDE SD_AGREEM_COMMON_DATA.
INCLUDE SD_AGREEM_SELECT_PARAMETER.
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_AGREEM' 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 = arch_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'.
PROGRESS_INDICATOR_APPL call function 'PROGRESS_INDICATOR_APPL' exporting i_text = text-p01 i_output_immediately = 'X' importing e_progress_sent = g_progress_sent.
call function 'DB_COMMIT'.
ARCHIVE_WRITE_STATISTICS call function 'ARCHIVE_WRITE_STATISTICS' exporting archive_handle = arch_handle.
ARCHIVE_PROTOCOL_WRITE_APPL call function 'ARCHIVE_PROTOCOL_WRITE_APPL'.
ARCHIVE_CLOSE_FILE call function 'ARCHIVE_CLOSE_FILE' exporting archive_handle = arch_handle.
SD_BONUS_READ call function 'SD_BONUS_READ' exporting agreement_number = kona_tab-knuma bonus_agreement_in = kona_tab condition_read = yes header_read = yes scale_read = no tables condition = konp_tab condition_header = konh_tab condrec = kodat_tab exceptions agreement_not_found = 1 others = 2.
COND_AGREEMENT_READ call function 'COND_AGREEMENT_READ' exporting pi_kona = kona_tab * NO_KONP_KONM_KONW = ' ' tables pe_t_konh = konh_tab pe_t_konp = konp_tab pe_t_kondr = kodat_tab exceptions no_agreement = 1 agreement_not_found = 2 no_conditions_found = 3 others = 4.
ARCHIVE_NEW_OBJECT call function 'ARCHIVE_NEW_OBJECT' exporting archive_handle = arch_handle object_id = object_id.
ARCHIVE_PUT_TABLE call function 'ARCHIVE_PUT_TABLE' exporting archive_handle = arch_handle record_flags = del record_structure = struct_ekbo tables table = ekbo_tab.
ARCHIVE_SAVE_OBJECT call function 'ARCHIVE_SAVE_OBJECT' exporting archive_handle = arch_handle exceptions data_object_not_saved = 6.
ARCHIVE_PROTOCOL_COLLECT call function 'ARCHIVE_PROTOCOL_COLLECT' exporting i_object = kona_tab-knuma 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 = kona_tab-knuma i_msgtype = 1 i_text = lf_text.
ARCHIVE_PROTOCOL_COLLECT call function 'ARCHIVE_PROTOCOL_COLLECT' exporting i_object = kona_tab-knuma i_msgtype = 1 i_text = lf_text.
ARCHIVE_PROTOCOL_COLLECT call function 'ARCHIVE_PROTOCOL_COLLECT' exporting i_object = kona_tab-knuma i_msgtype = 1 i_text = lf_text.
ARCHIVE_PROTOCOL_COLLECT_APPL call function 'ARCHIVE_PROTOCOL_COLLECT_APPL' exporting i_object = kona_tab-knuma i_msgtype = '01' i_text = text-p06.
PROGRESS_INDICATOR_APPL call function 'PROGRESS_INDICATOR_APPL' exporting i_text = text-p09 * i_msgv1 = g_process1 * i_msgv2 = g_lines * i_processed = g_process1 * i_total = g_lines i_output_immediately = 'X' importing e_progress_sent = g_progress_sent.
DB_COMMIT call function 'DB_COMMIT'.
ARCHIVE_NEW_OBJECT call function 'ARCHIVE_NEW_OBJECT' exporting archive_handle = arch_handle object_id = object_id.
TEXT_ARCHIVE_OBJECT call function 'TEXT_ARCHIVE_OBJECT' exporting archive_handle = arch_handle client = sy-mandt id = '*' language = '*' name = da_thead-tdname object = 'KONA' object_delete_flag = 'X'.
CHANGEDOCU_ARCHIVE_OBJECT call function 'CHANGEDOCU_ARCHIVE_OBJECT' exporting archive_handle = arch_handle objectclass = cdhdr-objectclas objectid = cdhdr-objectid.
ARCHIVE_PUT_TABLE call function 'ARCHIVE_PUT_TABLE' exporting archive_handle = arch_handle record_flags = del record_structure = struct_konaind tables table = konaind_tab.
ARCHIVE_PUT_TABLE call function 'ARCHIVE_PUT_TABLE' exporting archive_handle = arch_handle record_flags = del record_structure = struct_konh tables table = konh_tab.
ARCHIVE_PUT_TABLE call function 'ARCHIVE_PUT_TABLE' exporting archive_handle = arch_handle record_flags = del record_structure = struct_kodat tables table = kodat_tab.
ARCHIVE_PUT_TABLE call function 'ARCHIVE_PUT_TABLE' exporting archive_handle = arch_handle record_flags = del record_structure = struct_konaind tables table = konaind_tab.
ARCHIVE_PUT_TABLE call function 'ARCHIVE_PUT_TABLE' exporting archive_handle = arch_handle record_flags = del record_structure = struct_wakhind tables table = wakhind_tab.
CONDS_ARCHIVE_OBJECT call function 'CONDS_ARCHIVE_OBJECT' exporting archive_handle = arch_handle pi_knumh = konh_tab-knumh.
CHANGEDOCU_ARCHIVE_OBJECT call function 'CHANGEDOCU_ARCHIVE_OBJECT' exporting archive_handle = arch_handle objectclass = cdhdr-objectclas objectid = cdhdr-objectid.
TEXT_ARCHIVE_OBJECT call function 'TEXT_ARCHIVE_OBJECT' exporting archive_handle = arch_handle client = sy-mandt id = '*' language = '*' name = da_thead-tdname object = 'KONP' object_delete_flag = 'X'.
ARCHIVE_PUT_TABLE call function 'ARCHIVE_PUT_TABLE' exporting archive_handle = arch_handle record_flags = del record_structure = struct_ekbo tables table = ekbo_tab.
ARCHIVE_PUT_TABLE call function 'ARCHIVE_PUT_TABLE' exporting archive_handle = arch_handle record_flags = del record_structure = struct_ebox tables table = ebox_tab.
ARCHIVE_SAVE_OBJECT call function 'ARCHIVE_SAVE_OBJECT' exporting archive_handle = arch_handle exceptions data_object_not_saved = 6.
ARCHIVE_PROTOCOL_COLLECT call function 'ARCHIVE_PROTOCOL_COLLECT' exporting i_object = kona_tab-knuma 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 = kona_tab-knuma i_msgtype = 1 i_text = lf_text.
ARCHIVE_PROTOCOL_COLLECT call function 'ARCHIVE_PROTOCOL_COLLECT' exporting i_object = kona_tab-knuma i_msgtype = 1 i_text = lf_text.
ARCHIVE_PROTOCOL_COLLECT_APPL call function 'ARCHIVE_PROTOCOL_COLLECT_APPL' exporting i_object = kona_tab-knuma i_msgtype = '01' i_text = text-p05.
ARCHIVE_PUT_RECORD call function 'ARCHIVE_PUT_RECORD' exporting archive_handle = pi_handle record = a_record record_flags = pi_flag record_structure = a_structure.
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 SD_AGREEM_ARCH_WRITE or its description.
SD_AGREEM_ARCH_WRITE - Agreements Archiving: New Write Program SD_AGREEM_ARCH_WRITE - Agreements Archiving: New Write Program SD_AGREEM_ARCH_FORMS - SDAGREEMARCHFORMS SD_AGREEM_ARCH_DELETE - Report SD_AGREEM_ARCH_DELETE SD_AGREEM_ARCH_DELETE - Report SD_AGREEM_ARCH_DELETE SDZAVDAT - Include for different users: Data declaration for ZAV