SAP Reports / Programs

MM_ASMD_WRI SAP ABAP Report - Archiving of Service Master: Generate Archive File







MM_ASMD_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_ASMD_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_ASMD_WRI. "Basic submit
SUBMIT MM_ASMD_WRI AND RETURN. "Return to original report after report execution complete
SUBMIT MM_ASMD_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_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: S_ASNUM = D .
Selection Text: S_ASTYP = D .
Selection Text: S_ERDAT = D .
Title: Archiving of Service Master: Generate Archive File
Text Symbol: 003 = Service Master
Text Symbol: 021 = Reading Service Master Records
Text Symbol: 027 = &1 of &2 Service Masters have been processed
Text Symbol: FSE = Further Selection Criteria
Text Symbol: N01 = Snapshot has been created.
Text Symbol: N02 = Data destruction
Text Symbol: N03 = Data has been archived.


INCLUDES used within this REPORT MM_ASMD_WRI

INCLUDE ARCH_WRITE_PRG_STANDARD2. "#EC INCL_OK


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 i_protocol_output = p_prot_o.

PROGRESS_INDICATOR_APPL call function 'PROGRESS_INDICATOR_APPL' exporting i_text = text-021 i_output_immediately = abap_true importing e_progress_sent = lv_progress_sent.

DB_COMMIT call function 'DB_COMMIT'.

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 = lv_not_delete destroy = lv_destroy output_sel_screen_when_dialog = space 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_GET_CUSTOMIZING_DATA call function 'ARCHIVE_GET_CUSTOMIZING_DATA' exporting object = con_arch_object importing commit_count_for_delete_prg = lv_commcnt.

ARCHIVE_NEW_OBJECT call function 'ARCHIVE_NEW_OBJECT' exporting archive_handle = lv_handle object_id = con_arch_object. "mm_object.

ARCHIVE_PUT_RECORD call function 'ARCHIVE_PUT_RECORD' exporting archive_handle = lv_handle record = ls_asmd "record_flags = l_flags record_structure = lv_structure.

ARCHIVE_SAVE_OBJECT call function 'ARCHIVE_SAVE_OBJECT' exporting archive_handle = lv_handle exceptions file_io_error = 1 internal_error = 2 open_error = 3 termination_requested = 4 wrong_access_to_archive = 5 data_object_not_saved = 6 others = 7.

ARCHIVE_PROTOCOL_COLLECT call function 'ARCHIVE_PROTOCOL_COLLECT' exporting i_object = lv_objectid i_msgtype = lv_msgty 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_objectid i_msgtype = lv_msgty i_text = lv_text.

PROGRESS_INDICATOR_APPL call function 'PROGRESS_INDICATOR_APPL' exporting i_text = text-027 i_msgv1 = lv_read "stik-asmd_read "lv_processed "i_msgv2 = lv_numrecs i_processed = lv_read "stik-asmd_read "lv_processed "i_total = lv_numrecs i_output_immediately = abap_true.

ARCHIVE_WRITE_STATISTICS call function 'ARCHIVE_WRITE_STATISTICS' exporting archive_handle = lv_handle.

ARCHIVE_PROTOCOL_WRITE_APPL call function 'ARCHIVE_PROTOCOL_WRITE_APPL'.

ARCHIVE_CLOSE_FILE call function 'ARCHIVE_CLOSE_FILE' exporting archive_handle = lv_handle.

ARCHIVE_PUT_RECORD call function 'ARCHIVE_PUT_RECORD' exporting archive_handle = iv_handle record = ls_asmdt "record_flags = l_flags record_structure = lv_structure.

SELECT_TEXT call function 'SELECT_TEXT' exporting id = lv_txtid language = lv_lang name = lv_txtname object = lv_txtobj importing entries = lv_entries tables selections = lt_header.

TEXT_ARCHIVE_OBJECT





call function 'TEXT_ARCHIVE_OBJECT' exporting archive_handle = iv_handle id = ls_header-tdid language = ls_header-tdspras name = ls_header-tdname object = ls_header-tdobject object_delete_flag = lv_delete.

CHANGEDOCU_ARCHIVE_OBJECT call function 'CHANGEDOCU_ARCHIVE_OBJECT' exporting archive_handle = iv_handle objectclass = lv_objectclass objectid = ev_objectid object_delete_flag = lv_delete. "abap_true.

CLASSIFY_ARCHIVE_OBJECT call function 'CLASSIFY_ARCHIVE_OBJECT' exporting archive_handle = iv_handle object = lv_objek ptable = lv_obtab object_delete_flag = lv_delete.

ARCHIVE_PROTOCOL_COLLECT call function 'ARCHIVE_PROTOCOL_COLLECT' exporting i_msgtype = iv_msgty i_msgid = sy-msgid i_msgno = sy-msgno i_msgv1 = sy-msgv1 i_msgv2 = sy-msgv2 i_msgv3 = sy-msgv3 i_msgv4 = sy-msgv4.

ENQUEUE_EASMD call function 'ENQUEUE_EASMD' exporting * MODE_ASMD = 'E' mandt = sy-mandt asnum = p_asnum * X_ASNUM = ' ' * _SCOPE = '2' * _WAIT = ' ' exceptions foreign_lock = 1 system_failure = 2 others = 3.

DEQUEUE_EASMD call function 'DEQUEUE_EASMD' exporting * mode_ASMD = 'E' mandt = sy-mandt asnum = p_asnum * x_asnum = ' ' * _scope = '3' * _synchron = ' ' exceptions others = 1 .



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