SAP EXIT_SAPL2021_005 Function Module for User Exit for Cancel BAPI: Check
EXIT_SAPL2021_005 is a standard exit sapl2021 005 SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for User Exit for Cancel BAPI: Check 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 exit sapl2021 005 FM, simply by entering the name EXIT_SAPL2021_005 into the relevant SAP transaction such as SE37 or SE38.
Function Group: X2021
Program Name: SAPLX2021
Main Program:
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:
Function EXIT_SAPL2021_005 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 'EXIT_SAPL2021_005'"User Exit for Cancel BAPI: Check.
EXPORTING
* REQUESTID = "Key Number for Payment Request
* REASON_REV = "Reason for Reversal
* DATE_REV = "Reversal Date
* TESTRUN = "Switch to Simulation Session for Write BAPIs
* PAYMENTREQUEST = "Payment Requests
IMPORTING
RETURN = "Return Parameter
Related Function Modules
Below is a list of related SAP function modules this CUSTOMER FUNCTION exit / user exit is relevant for.BAPI_PAYMENTREQUEST_CANCEL Cancel Payment Request
BAPI_PAYMENTREQUEST_CREATE Creation of a Payment Request
BAPI_PAYMENTREQUEST_GETLIST List of Payment Requests with Selections
BAPI_PAYMENTREQUEST_GETSTATUS Determination of Payment Request Status
BAPI_PAYMENTREQUEST_POST Posting a Parked Payment Request
BAPI_PAYMENTREQUEST_RELEASE Payment Request Released for Payment
BAPI_PAYMENTREQ_STARTPAYMENT Start Payment of Payment Request
FI_BL_PRQ_GETSTATUS
FI_BL_PRQ_POST
IDOC_INPUT_PAYMENTREQUEST_CANC
IDOC_INPUT_PAYMENTREQUEST_CREA
IDOC_INPUT_PAYMENTREQUEST_POST
IDOC_INPUT_PAYMENTREQUEST_RELE
IDOC_INPUT_PAYMENTREQUEST_STAR
PAYMENTREQUEST_BUFFER_DB_CMINS
PAYMENTREQUEST_BUFFER_DB_CMREV
PAYMENTREQUEST_BUFFER_DB_INS
PAYMENTREQUEST_BUFFER_DB_UPD
PAYMENTREQUEST_INTERACTION List for Release, Payment, Cancelation
IMPORTING Parameters details for EXIT_SAPL2021_005
REQUESTID - Key Number for Payment Request
Data type: BAPI2021_KEYNO-REQUESTIDOptional: Yes
Call by Reference: Yes
REASON_REV - Reason for Reversal
Data type: BAPI2021_REV-REASON_REVOptional: Yes
Call by Reference: Yes
DATE_REV - Reversal Date
Data type: BAPI2021_REV-DATE_REVOptional: Yes
Call by Reference: Yes
TESTRUN - Switch to Simulation Session for Write BAPIs
Data type: BAPI2021_HELP-TESTRUNOptional: Yes
Call by Reference: Yes
PAYMENTREQUEST - Payment Requests
Data type: PAYRQOptional: Yes
Call by Reference: Yes
EXPORTING Parameters details for EXIT_SAPL2021_005
RETURN - Return Parameter
Data type: BAPIRET2Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for EXIT_SAPL2021_005 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: | ||||
lv_return | TYPE BAPIRET2, " | |||
lv_requestid | TYPE BAPI2021_KEYNO-REQUESTID, " | |||
lv_reason_rev | TYPE BAPI2021_REV-REASON_REV, " | |||
lv_date_rev | TYPE BAPI2021_REV-DATE_REV, " | |||
lv_testrun | TYPE BAPI2021_HELP-TESTRUN, " | |||
lv_paymentrequest | TYPE PAYRQ. " |
  CALL FUNCTION 'EXIT_SAPL2021_005' "User Exit for Cancel BAPI: Check |
EXPORTING | ||
REQUESTID | = lv_requestid | |
REASON_REV | = lv_reason_rev | |
DATE_REV | = lv_date_rev | |
TESTRUN | = lv_testrun | |
PAYMENTREQUEST | = lv_paymentrequest | |
IMPORTING | ||
RETURN | = lv_return | |
. " EXIT_SAPL2021_005 |
ABAP code using 7.40 inline data declarations to call FM EXIT_SAPL2021_005
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."SELECT single REQUESTID FROM BAPI2021_KEYNO INTO @DATA(ld_requestid). | ||||
"SELECT single REASON_REV FROM BAPI2021_REV INTO @DATA(ld_reason_rev). | ||||
"SELECT single DATE_REV FROM BAPI2021_REV INTO @DATA(ld_date_rev). | ||||
"SELECT single TESTRUN FROM BAPI2021_HELP INTO @DATA(ld_testrun). | ||||
Search for further information about these or an SAP related objects