SAP Reports / Programs | Personnel Time Management(PT) SAP PT

RPT_REQUEST_WRITE SAP ABAP Report - Write Program for Request Database







RPT_REQUEST_WRITE is a standard Executable ABAP Report available within your SAP system (depending on your version and release level). It is used for You can use this report to archive leave requests and requests for clock-in/out corrections...see full standard documentation available for this report. Also check out the submitted Comments related to this SAP report and the details below to see which OBJECTS it interacts with such as TABLES, FUNCTION MODULES, INCLUDES ETC.

If you would like to execute this report or see the full code listing simply enter RPT_REQUEST_WRITE 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 RPT_REQUEST_WRITE. "Basic submit
SUBMIT RPT_REQUEST_WRITE AND RETURN. "Return to original report after report execution complete
SUBMIT RPT_REQUEST_WRITE 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 Archiving
Selection Text: P_COMENT = D Comment for Archiving Run
Selection Text: P_DATE = D Archive Until
Selection Text: P_DELTST = Deletion with Test Variant
Selection Text: P_DEST = D Data Destruction
Selection Text: P_MOLGA = D Country Grouping
Selection Text: P_PROT = Detailed Log
Selection Text: P_WRIPRD = Production Mode
Selection Text: P_WRITST = Test Mode
Selection Text: S_REQTYP = Request Type
Selection Text: PROTOCOL = D .
Selection Text: TESTRUN = D .
Title: Write Program for Request Database
Text Symbol: 000 = Selection Parameters


INCLUDES used within this REPORT RPT_REQUEST_WRITE

INCLUDE HCMDP_ARCH_WRITE_PRG_STD_ILM.


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_LINE_DETAIL CALL FUNCTION 'ARCHIVE_PROTOCOL_LINE_DETAIL'.

ARCHIVE_NEW_OBJECT CALL FUNCTION 'ARCHIVE_NEW_OBJECT' EXPORTING archive_handle = lv_handle object_id = lv_object_id.

HR_REQDB_ARCHIVE_OBJECT CALL FUNCTION 'HR_REQDB_ARCHIVE_OBJECT' EXPORTING archive_handle = lv_handle request_id = ls_header-request_id.

ARCHIVE_SAVE_OBJECT CALL FUNCTION 'ARCHIVE_SAVE_OBJECT' EXPORTING archive_handle = lv_handle EXCEPTIONS file_io_error = 1 " Error Writing to Archive File internal_error = 2 " Internal Error open_error = 3 " Error When Opening the Archive File termination_requested = 4 " Termination of Archiving Was Requested wrong_access_to_archive = 5 " Incorrect Access to the Archive data_object_not_saved = 6."The Data Object was not Written to the Archive

ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_msgid = sy-msgid i_msgno = sy-msgno i_msgtype = 2.

ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_object = lv_obj_id i_msgtype = 1 i_msgid = sy-msgid i_msgno = sy-msgno.

ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_object = lv_obj_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_msgno = sy-msgno i_msgid = sy-msgid i_processed = lv_objects_processed i_total = lv_total_of_objects IMPORTING e_progress_sent = lv_progress_send.

DB_COMMIT CALL FUNCTION 'DB_COMMIT'. "otherwise messag will not appear in the job-log

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 = cv_object comments = p_coment do_not_delete_data = lv_not_delete destroy = lv_destroy IMPORTING archive_handle = lv_handle EXCEPTIONS internal_error = 1 object_not_found = 2 open_error = 3 not_authorized = 4 archiving_standard_violation = 5 OTHERS = 6.

PROGRESS_INDICATOR CALL FUNCTION 'PROGRESS_INDICATOR' EXPORTING i_msgid = sy-msgid i_msgno = sy-msgno i_processed = lv_objects_processed i_total = lv_total_of_objects i_output_immediately = 'X'. "force the progress output

ARCHIVE_WRITE_STATISTICS CALL FUNCTION 'ARCHIVE_WRITE_STATISTICS' EXPORTING archive_handle = lv_handle.

ARCHIVE_PROTOCOL_WRITE CALL FUNCTION 'ARCHIVE_PROTOCOL_WRITE'.

ARCHIVE_CLOSE_FILE CALL FUNCTION 'ARCHIVE_CLOSE_FILE' EXPORTING archive_handle = lv_handle.

ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_object = iv_object_id i_msgid = sy-msgid i_msgno = sy-msgno i_msgv1 = sy-msgv1 i_msgv2 = sy-msgv2 i_msgtype = 2.



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