SAP Reports / Programs | Production Planning and Control | Basic Data | Work Center(PP-BD-WKC) SAP PP

PP_WKC_WRI SAP ABAP Report - Archive Workcenter : Write Program







PP_WKC_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 PP_WKC_WRI 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 PP_WKC_WRI. "Basic submit
SUBMIT PP_WKC_WRI AND RETURN. "Return to original report after report execution complete
SUBMIT PP_WKC_WRI 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: WERKS = D .
Selection Text: VERWE = D .
Selection Text: VERAN = D .
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: LV_DEL = D .
Selection Text: ARBPL = D .
Title: Archive Workcenter : Write Program
Text Symbol: N05 = The selection with these criteria is empty.
Text Symbol: N04 = Workset was not archived due to termination request.
Text Symbol: N03 = Data Archived sucessfully.
Text Symbol: N02 = Data has been destroyed.
Text Symbol: N01 = Snapshot has been created.
Text Symbol: 024 = &1 of &2 Workcenters processed
Text Symbol: 012 = Workset was not archived as filtering criteria for deletion does not match
Text Symbol: 011 = Workset was not archived
Text Symbol: 010 = Following work centers were archived
Text Symbol: 008 = Following work centers were archived or deleted:
Text Symbol: 007 = Work center
Text Symbol: 006 = Plnt
Text Symbol: 005 = used and cannot be archived or deleted:
Text Symbol: 004 = Workcenter Archived for Destruction
Text Symbol: 003 = Retention Per. End Reached
Text Symbol: 002 = &1% (&2 of &3) of the worksets processed
Text Symbol: 001 = Work Center


INCLUDES used within this REPORT PP_WKC_WRI

INCLUDE ARCH_WRITE_PRG_STANDARD2.


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:

ARCHIVE_PROTOCOL_COLLECT call function 'ARCHIVE_PROTOCOL_COLLECT' exporting i_object = lv_object_id i_text = 'Workset was not archived as filtering criteria for deletion does not match'(012) i_msgtype = 2.

ARCHIVE_PROTOCOL_COLLECT call function 'ARCHIVE_PROTOCOL_COLLECT' exporting i_object = lv_object_id i_text = 'Workset was not archived'(011) "#EC * "text shall be understandable for EN-speaking coleagues i_msgtype = 2.

CR_FILL_BUFFER_CRAR call function 'CR_FILL_BUFFER_CRAR' tables in_crhd = lt_loc_crhd_key not_archived_crhd = lt_nodel_crhd_key exceptions others = 1.

ARCHIVE_PROTOCOL_INIT call function 'ARCHIVE_PROTOCOL_INIT' exporting i_detailprotocol = p_prot i_protocol_output = p_prot_o.

ARCHIVE_PROTOCOL_COLLECT call function 'ARCHIVE_PROTOCOL_COLLECT' exporting i_object = lv_object_id i_text = 'Used and cannot be archived or deleted:'(005) "#EC * "text shall be understandable for EN-speaking coleagues i_msgtype = 2.

ARCHIVE_PROTOCOL_WRITE call function 'ARCHIVE_PROTOCOL_WRITE'.

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 = con_arch_object comments = p_coment do_not_delete_data = l_not_delete destroy = l_destroy importing archive_handle = lv_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 = lv_handle object_id = lv_object_id.

CR_WKC_ARCHIVE_OBJECT call function 'CR_WKC_ARCHIVE_OBJECT' exporting archive_handle = lv_handle object_delete_flag = abap_true crhd_objid = ls_loc_crhd_key-objid exceptions no_authority = 1 not_found = 2 wrong_access_to_archive = 3.

ARCHIVE_PROTOCOL_COLLECT call function 'ARCHIVE_PROTOCOL_COLLECT' exporting i_object = lv_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.

ARCHIVE_SAVE_OBJECT call function 'ARCHIVE_SAVE_OBJECT' exporting archive_handle = lv_handle exceptions termination_requested = 1 data_object_not_saved = 6.

ARCHIVE_PROTOCOL_COLLECT call function 'ARCHIVE_PROTOCOL_COLLECT' exporting i_object = lv_object_id i_msgtype = 1 i_text = lf_text.

ARCHIVE_PROTOCOL_COLLECT call function 'ARCHIVE_PROTOCOL_COLLECT' exporting i_object = lv_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.

ARCHIVE_PROTOCOL_COLLECT call function 'ARCHIVE_PROTOCOL_COLLECT' exporting i_object = lv_object_id i_msgtype = 1 i_text = lf_text.

ARCHIVE_PROTOCOL_COLLECT call function 'ARCHIVE_PROTOCOL_COLLECT' exporting i_object = lv_object_id i_msgtype = 1 i_text = lf_text.

ARCHIVE_PROTOCOL_COLLECT call function 'ARCHIVE_PROTOCOL_COLLECT' exporting i_object = lv_object_id i_msgtype = 1 i_text = lf_text.

PROGRESS_INDICATOR_APPL





call function 'PROGRESS_INDICATOR_APPL' exporting i_text = text-024 i_msgv1 = g_processed i_msgv2 = g_lines i_processed = g_processed i_total = g_lines i_output_immediately = 'X' importing e_progress_sent = lv_progress_send.

DB_COMMIT call function 'DB_COMMIT'. "otherwise message will not appear in the job-log

PROGRESS_INDICATOR_APPL call function 'PROGRESS_INDICATOR_APPL' exporting i_text = text-024 i_msgv1 = g_processed i_msgv2 = g_lines i_processed = g_processed i_total = g_lines i_output_immediately = 'X'.

ARCHIVE_WRITE_STATISTICS call function 'ARCHIVE_WRITE_STATISTICS' exporting archive_handle = lv_handle exceptions internal_error = 1 wrong_access_to_archive = 2.

ARCHIVE_PROTOCOL_WRITE call function 'ARCHIVE_PROTOCOL_WRITE'.

ARCHIVE_CLOSE_FILE call function 'ARCHIVE_CLOSE_FILE' exporting archive_handle = lv_handle.



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