SAP Reports / Programs

MM_PREF_WRI SAP ABAP Report - Archiving Preference Results: Write Program







MM_PREF_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 MM_PREF_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 MM_PREF_WRI. "Basic submit
SUBMIT MM_PREF_WRI AND RETURN. "Return to original report after report execution complete
SUBMIT MM_PREF_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: P_DATUM = Archiving until date
Selection Text: P_AR_ILM = D .
Selection Text: P_COMENT = D .
Selection Text: P_DELTST = D .
Selection Text: P_DEST = D .
Selection Text: P_MATNR = D .
Selection Text: P_PROT = D .
Selection Text: P_PROT_O = D .
Selection Text: P_SNAP = D .
Selection Text: P_WERKS = D .
Selection Text: P_WRIPRD = D .
Selection Text: P_WRITST = D .
Title: Archiving Preference Results: Write Program
Text Symbol: 001 = Preference f.
Text Symbol: 003 = Restrictions
Text Symbol: 023 = Data is being read
Text Symbol: 024 = &2 Preferences Processed
Text Symbol: N01 = Snapshot archived
Text Symbol: N02 = Retention Period Ended
Text Symbol: N03 = Log Record is being Archived


INCLUDES used within this REPORT MM_PREF_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_INIT call function 'ARCHIVE_PROTOCOL_INIT' 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 = 'MM_PREF' comments = p_coment do_not_delete_data = l_not_delete destroy = l_destroy 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'.

PROGRESS_INDICATOR call function 'PROGRESS_INDICATOR' exporting i_text = lf_prog_text i_output_immediately = 'X' importing e_progress_sent = lf_progress_sent.

DB_COMMIT call function 'DB_COMMIT'.

ARCHIVE_NEW_OBJECT call function 'ARCHIVE_NEW_OBJECT' exporting archive_handle = archive_handle object_id = data_object_id.

ARCHIVE_PUT_TABLE call function 'ARCHIVE_PUT_TABLE' exporting archive_handle = archive_handle record_structure = 'MMPREF_PRO_01' tables table = gt_mmpref_pro_01.

ARCHIVE_PUT_TABLE call function 'ARCHIVE_PUT_TABLE' exporting archive_handle = archive_handle record_structure = 'MMPREF_PRO_01_B' tables table = gt_mmpref_pro_01_b.

ARCHIVE_PUT_TABLE call function 'ARCHIVE_PUT_TABLE' exporting archive_handle = archive_handle record_structure = 'MMPREF_PRO_02' tables table = gt_mmpref_pro_02.

ARCHIVE_PUT_TABLE call function 'ARCHIVE_PUT_TABLE' exporting archive_handle = archive_handle record_structure = 'MMPREF_PRO_03' tables table = gt_mmpref_pro_03.

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

ARCHIVE_PROTOCOL_COLLECT call function 'ARCHIVE_PROTOCOL_COLLECT' exporting i_object = l_mmpref 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 = l_mmpref i_msgtype = 1 i_text = lf_text.

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

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

PROGRESS_INDICATOR call function 'PROGRESS_INDICATOR' exporting i_text = lf_prog_text i_processed = lf_processed importing e_progress_sent = lf_progress_sent.

DB_COMMIT call function 'DB_COMMIT'.

ARCHIVE_NEW_OBJECT





call function 'ARCHIVE_NEW_OBJECT' exporting archive_handle = archive_handle object_id = data_object_id.

ARCHIVE_PUT_TABLE call function 'ARCHIVE_PUT_TABLE' exporting archive_handle = archive_handle record_structure = 'MMPREF_PRO_01' tables table = gt_mmpref_pro_01.

ARCHIVE_PUT_TABLE call function 'ARCHIVE_PUT_TABLE' exporting archive_handle = archive_handle record_structure = 'MMPREF_PRO_01_B' tables table = gt_mmpref_pro_01_b.

ARCHIVE_PUT_TABLE call function 'ARCHIVE_PUT_TABLE' exporting archive_handle = archive_handle record_structure = 'MMPREF_PRO_02' tables table = gt_mmpref_pro_02.

ARCHIVE_PUT_TABLE call function 'ARCHIVE_PUT_TABLE' exporting archive_handle = archive_handle record_structure = 'MMPREF_PRO_03' tables table = gt_mmpref_pro_03.

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

ARCHIVE_PROTOCOL_COLLECT call function 'ARCHIVE_PROTOCOL_COLLECT' exporting i_object = l_mmpref 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 = l_mmpref i_msgtype = 1 i_text = lf_text.

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

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

PROGRESS_INDICATOR call function 'PROGRESS_INDICATOR' exporting i_text = lf_prog_text i_processed = lf_processed importing e_progress_sent = lf_progress_sent.

DB_COMMIT call function 'DB_COMMIT'.

PROGRESS_INDICATOR call function 'PROGRESS_INDICATOR' exporting i_text = lf_prog_text i_processed = lf_processed i_output_immediately = 'X' importing e_progress_sent = lf_progress_sent.

DB_COMMIT call function 'DB_COMMIT'.

ARCHIVE_WRITE_STATISTICS call function 'ARCHIVE_WRITE_STATISTICS' exporting archive_handle = archive_handle.

ARCHIVE_PROTOCOL_WRITE call function 'ARCHIVE_PROTOCOL_WRITE'.

ARCHIVE_CLOSE_FILE call function 'ARCHIVE_CLOSE_FILE' exporting archive_handle = archive_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 MM_PREF_WRI or its description.