CHVW_WRI 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 CHVW_WRI 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_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: CHK_DATA = Check Batch Master Record
Selection Text: %WERKS = Plant
Selection Text: %MATNR = Material Number
Selection Text: %BUDAT = Last Posting Before
Title: Creation of Archive Files for Batch Where-Used Records
Text Symbol: PO7 = No data records for archiving found
Text Symbol: 011 = Options
Text Symbol: 010 = Restrictions
Text Symbol: 008 = Find orphaned ALE_BATCHES_SENT records
Text Symbol: 007 = Find orphaned ALE_BATCHES_RECP records
Text Symbol: 006 = Find orphaned CHVW_INC_PUR records
Text Symbol: 005 = Find orphaned CHVW_INC records
Text Symbol: 004 = Batch where-used records archived for destruction
Text Symbol: 003 = Batch where-used records cannot be destroyed
Text Symbol: 002 = &1% (&2 of &3) batches processed
Text Symbol: 001 = Batch where-used records archived
Text Symbol: 000 = Batches
INCLUDE ARCH_WRITE_PRG_STANDARD2.
No SAP DATABASE tables are accessed within this REPORT code!
VB_BATCH_DEFINITION call function 'VB_BATCH_DEFINITION' importing kzdch = kzdch exceptions others = 0.
ARCHIVE_PROTOCOL_INIT call function 'ARCHIVE_PROTOCOL_INIT' exporting i_detailprotocol = p_prot i_protocol_output = p_prot_o.
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 = 'LO_CHVW' comments = p_coment do_not_delete_data = l_not_delete destroy = l_destroy importing archive_handle = 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_NEW_OBJECT call function 'ARCHIVE_NEW_OBJECT' exporting archive_handle = handle object_id = object_id exceptions internal_error = 1 wrong_access_to_archive = 2 others = 3.
ARCHIVE_PUT_RECORD call function 'ARCHIVE_PUT_RECORD' exporting archive_handle = handle record = arc_chvw record_structure = 'CHVW' exceptions internal_error = 1 wrong_access_to_archive = 2 invalid_record_structure = 3 others = 4.
ARCHIVE_SAVE_OBJECT call function 'ARCHIVE_SAVE_OBJECT' exporting archive_handle = handle exceptions termination_requested = 1 data_object_not_saved = 2.
ARCHIVE_PROTOCOL_COLLECT call function 'ARCHIVE_PROTOCOL_COLLECT' exporting i_object = object_id i_text = 'Chargenverwendungssätze für Vernichtung archiviert'(004) i_msgtype = 1.
ARCHIVE_PROTOCOL_COLLECT call function 'ARCHIVE_PROTOCOL_COLLECT' exporting i_object = object_id i_text = 'Chargenverwendunssätze archiviert'(001) i_msgtype = 1.
ARCHIVE_PROTOCOL_COLLECT call function 'ARCHIVE_PROTOCOL_COLLECT' exporting i_object = object_id i_text = 'Chargenverwendungssätze für Vernichtung archiviert'(004) i_msgtype = 1.
ARCHIVE_PROTOCOL_COLLECT call function 'ARCHIVE_PROTOCOL_COLLECT' exporting i_object = object_id i_text = 'Chargenverwendunssätze archiviert'(001) i_msgtype = 1.
ARCHIVE_PROTOCOL_COLLECT call function 'ARCHIVE_PROTOCOL_COLLECT' exporting i_object = object_id i_text = 'Chargenverwendungssätze können nicht vernichtet werden'(003) i_msgtype = 1.
ARCHIVE_PROTOCOL_COLLECT call function 'ARCHIVE_PROTOCOL_COLLECT' exporting i_object = object_id 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.
PROGRESS_INDICATOR call function 'PROGRESS_INDICATOR' exporting i_text = text-002 i_processed = cnt_chvw_1 i_total = cnt_chvw_2 importing e_progress_sent = lv_progress_send.
DB_COMMIT call function 'DB_COMMIT'.
PROGRESS_INDICATOR call function 'PROGRESS_INDICATOR' exporting i_text = text-002 i_processed = cnt_chvw_1 i_total = cnt_chvw_2 i_output_immediately = 'X'.
ARCHIVE_WRITE_STATISTICS call function 'ARCHIVE_WRITE_STATISTICS' exporting archive_handle = handle.
call function 'ARCHIVE_PROTOCOL_WRITE'.
ARCHIVE_CLOSE_FILE call function 'ARCHIVE_CLOSE_FILE' exporting archive_handle = handle.
ARCHIVE_PUT_TABLE call function 'ARCHIVE_PUT_TABLE' exporting archive_handle = handle record_structure = 'CHVW_INC' "N:1715720 tables table = lt_chvw_inc exceptions internal_error = 1 wrong_access_to_archive = 2 invalid_record_structure = 3 others = 4.
ARCHIVE_PUT_TABLE call function 'ARCHIVE_PUT_TABLE' exporting archive_handle = handle record_structure = 'CHVW_INC_PUR' "N:1715720 tables table = lt_chvw_inc_pur exceptions internal_error = 1 wrong_access_to_archive = 2 invalid_record_structure = 3 others = 4.
ARCHIVE_PUT_TABLE call function 'ARCHIVE_PUT_TABLE' exporting archive_handle = handle record_structure = 'ALE_BATCHES_RECP' "N:1715720 tables table = lt_ale_batches_recp exceptions internal_error = 1 wrong_access_to_archive = 2 invalid_record_structure = 3 others = 4.
ARCHIVE_PUT_TABLE call function 'ARCHIVE_PUT_TABLE' exporting archive_handle = handle record_structure = 'ALE_BATCHES_SENT' "N:1715720 tables table = lt_ale_batches_sent exceptions internal_error = 1 wrong_access_to_archive = 2 invalid_record_structure = 3 others = 4.
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 CHVW_WRI or its description.
CHVW_WRI - Creation of Archive Files for Batch Where-Used Records CHVW_WRI - Creation of Archive Files for Batch Where-Used Records CHVW_DEL - Deletion of Archived Batch Where-Used Records in the Database CHVW_DEL - Deletion of Archived Batch Where-Used Records in the Database CHOOSESCR - documentation and ABAP source code CHNGEKYFTP - CHANGE KYFTP