SAP PT_ESA_REQUEST_MODIFY Function Module for Modify a leave request using ESA Services
PT_ESA_REQUEST_MODIFY is a standard pt esa request modify SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Modify a leave request using ESA Services processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.
See here to view full function module documentation and code listing for pt esa request modify FM, simply by entering the name PT_ESA_REQUEST_MODIFY into the relevant SAP transaction such as SE37 or SE38.
Function Group: PT_ESA_SERVICES
Program Name: SAPLPT_ESA_SERVICES
Main Program: SAPLPT_ESA_SERVICES
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function PT_ESA_REQUEST_MODIFY pattern details
In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.CALL FUNCTION 'PT_ESA_REQUEST_MODIFY'"Modify a leave request using ESA Services.
EXPORTING
IV_LEAVE_REQUEST_ID = "Document ID
IV_LEAVE_REQUEST = "ESA Leave Request
IV_VERSION_NO = "Document Version
* IV_RUN_CHECK_ONLY = "Data element for domain BOOLE: TRUE (='X') and FALSE (=' ')
* IV_DO_COMMIT = 'X' "Data element for domain BOOLE: TRUE (='X') and FALSE (=' ')
IMPORTING
EV_REQUEST_DETAIL = "ESA Leaves request detail
EV_SUCCESS_CONFIRMATION = "Boolean Variable (X=True, -=False, Space=Unknown)
TABLES
ET_MESSAGES = "Leave Request: ESA Message Table
IMPORTING Parameters details for PT_ESA_REQUEST_MODIFY
IV_LEAVE_REQUEST_ID - Document ID
Data type: TIM_REQ_IDOptional: No
Call by Reference: No ( called with pass by value option)
IV_LEAVE_REQUEST - ESA Leave Request
Data type: PTARQ_ESA_REQUEST_STRUCOptional: No
Call by Reference: No ( called with pass by value option)
IV_VERSION_NO - Document Version
Data type: TIM_REQ_VERSIONOptional: No
Call by Reference: No ( called with pass by value option)
IV_RUN_CHECK_ONLY - Data element for domain BOOLE: TRUE (='X') and FALSE (=' ')
Data type: BOOLE_DOptional: Yes
Call by Reference: No ( called with pass by value option)
IV_DO_COMMIT - Data element for domain BOOLE: TRUE (='X') and FALSE (=' ')
Data type: BOOLE_DDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for PT_ESA_REQUEST_MODIFY
EV_REQUEST_DETAIL - ESA Leaves request detail
Data type: PTESA_REQUEST_DETAIL_STRUCOptional: No
Call by Reference: No ( called with pass by value option)
EV_SUCCESS_CONFIRMATION - Boolean Variable (X=True, -=False, Space=Unknown)
Data type: BOOLE_DOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for PT_ESA_REQUEST_MODIFY
ET_MESSAGES - Leave Request: ESA Message Table
Data type: BAPIRET2Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for PT_ESA_REQUEST_MODIFY Function Module
The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.| DATA: | ||||
| lt_et_messages | TYPE STANDARD TABLE OF BAPIRET2, " | |||
| lv_ev_request_detail | TYPE PTESA_REQUEST_DETAIL_STRUC, " | |||
| lv_iv_leave_request_id | TYPE TIM_REQ_ID, " | |||
| lv_iv_leave_request | TYPE PTARQ_ESA_REQUEST_STRUC, " | |||
| lv_ev_success_confirmation | TYPE BOOLE_D, " | |||
| lv_iv_version_no | TYPE TIM_REQ_VERSION, " | |||
| lv_iv_run_check_only | TYPE BOOLE_D, " | |||
| lv_iv_do_commit | TYPE BOOLE_D. " 'X' |
|   CALL FUNCTION 'PT_ESA_REQUEST_MODIFY' "Modify a leave request using ESA Services |
| EXPORTING | ||
| IV_LEAVE_REQUEST_ID | = lv_iv_leave_request_id | |
| IV_LEAVE_REQUEST | = lv_iv_leave_request | |
| IV_VERSION_NO | = lv_iv_version_no | |
| IV_RUN_CHECK_ONLY | = lv_iv_run_check_only | |
| IV_DO_COMMIT | = lv_iv_do_commit | |
| IMPORTING | ||
| EV_REQUEST_DETAIL | = lv_ev_request_detail | |
| EV_SUCCESS_CONFIRMATION | = lv_ev_success_confirmation | |
| TABLES | ||
| ET_MESSAGES | = lt_et_messages | |
| . " PT_ESA_REQUEST_MODIFY | ||
ABAP code using 7.40 inline data declarations to call FM PT_ESA_REQUEST_MODIFY
The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.| DATA(ld_iv_do_commit) | = 'X'. | |||
Search for further information about these or an SAP related objects