SAP BAPI_PAYMENTREQUEST_CREATE Function Module for Creation of a Payment Request









BAPI_PAYMENTREQUEST_CREATE is a standard bapi paymentrequest create SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Creation of a Payment Request 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 bapi paymentrequest create FM, simply by entering the name BAPI_PAYMENTREQUEST_CREATE into the relevant SAP transaction such as SE37 or SE38.

Function Group: 2021
Program Name: SAPL2021
Main Program: SAPL2021
Appliation area:
Release date: 26-Nov-1999
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function BAPI_PAYMENTREQUEST_CREATE 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 'BAPI_PAYMENTREQUEST_CREATE'"Creation of a Payment Request
EXPORTING
ORIGIN = "Origin
* REFERENCES = "Reference Data
* RELEASEPOST = 'X' "Release Payment Request for Posting
* RELEASEPAY = 'X' "Release Payment Request for Payment
* TESTRUN = "Switch to Simulation Session for Write BAPIs
ORGANISATIONS = "Organizations
ACCOUNTS = "Accounts
AMOUNTS = "Amounts and Currencies
VALUE_DATES = "Data for Due Date and Value Date
PAYM_CONTROL = "Payment Control
* CORR_DOC = "Corresponding Accounting Document
* CENTRAL_BANK_REP = "Financial Reporting Data
* INSTRUCTIONS = "Instruction Keys

IMPORTING
RETURN = "Return Parameter
REQUESTID = "Key Number for Payment Request

TABLES
ADDRESS_DATA = "Payment Request: Address Data
* BANK_DATA = "BAPI Payment Request: Bank Data
* REFERENCE_TEXT = "BAPI Payment Request: Note to Payee Texts
* EXTENSIONIN = "Ref. Structure for BAPI Parameters EXTENSIONIN/EXTENSIONOUT
.




Customer Function user exits

Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.
EXIT_SAPL2021_001 User Exit for Creation BAPI: Check
EXIT_SAPL2021_002 User Exit for Creation BAPI: Processing
EXIT_SAPL2021_003 User Exit for GetList BAPI: Check
EXIT_SAPL2021_004 User Exit for GetList BAPI: Restrict Selection
EXIT_SAPL2021_005 User Exit for Cancel BAPI: Check
EXIT_SAPL2021_006 User Exit for Cancel BAPI: Update Customer Data
EXIT_SAPL2021_007 User Exit for Post BAPI: Check
EXIT_SAPL2021_008 User Exit for Post BAPI: Update Customer Data
EXIT_SAPL2021_009 User Exit for Release BAPI: Check
EXIT_SAPL2021_010 User Exit for Release BAPI: Update Customer Data

IMPORTING Parameters details for BAPI_PAYMENTREQUEST_CREATE

ORIGIN - Origin

Data type: BAPI2021_ORIGIN
Optional: No
Call by Reference: No ( called with pass by value option)

REFERENCES - Reference Data

Data type: BAPI2021_REFERENCES
Optional: Yes
Call by Reference: No ( called with pass by value option)

RELEASEPOST - Release Payment Request for Posting

Data type: BAPI2021_HELP-RELEASEPOST
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

RELEASEPAY - Release Payment Request for Payment

Data type: BAPI2021_HELP-RELEASEPAY
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

TESTRUN - Switch to Simulation Session for Write BAPIs

Data type: BAPI2021_HELP-TESTRUN
Optional: Yes
Call by Reference: No ( called with pass by value option)

ORGANISATIONS - Organizations

Data type: BAPI2021_ORGANISATIONS
Optional: No
Call by Reference: No ( called with pass by value option)

ACCOUNTS - Accounts

Data type: BAPI2021_ACCOUNTS
Optional: No
Call by Reference: No ( called with pass by value option)

AMOUNTS - Amounts and Currencies

Data type: BAPI2021_AMOUNTS
Optional: No
Call by Reference: No ( called with pass by value option)

VALUE_DATES - Data for Due Date and Value Date

Data type: BAPI2021_DATES
Optional: No
Call by Reference: No ( called with pass by value option)

PAYM_CONTROL - Payment Control

Data type: BAPI2021_PAYMENTCTRL
Optional: No
Call by Reference: No ( called with pass by value option)

CORR_DOC - Corresponding Accounting Document

Data type: BAPI2021_CORRDOC
Optional: Yes
Call by Reference: No ( called with pass by value option)

CENTRAL_BANK_REP - Financial Reporting Data

Data type: BAPI2021_CENTRALBANKREP
Optional: Yes
Call by Reference: No ( called with pass by value option)

INSTRUCTIONS - Instruction Keys

Data type: BAPI2021_INSTRUCTIONS
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for BAPI_PAYMENTREQUEST_CREATE

RETURN - Return Parameter

Data type: BAPIRET2
Optional: No
Call by Reference: No ( called with pass by value option)

REQUESTID - Key Number for Payment Request

Data type: BAPI2021_KEYNO-REQUESTID
Optional: No
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for BAPI_PAYMENTREQUEST_CREATE

ADDRESS_DATA - Payment Request: Address Data

Data type: BAPI2021_ADDRESS
Optional: No
Call by Reference: Yes

BANK_DATA - BAPI Payment Request: Bank Data

Data type: BAPI2021_BANK
Optional: Yes
Call by Reference: Yes

REFERENCE_TEXT - BAPI Payment Request: Note to Payee Texts

Data type: BAPI2021_REFTEXT
Optional: Yes
Call by Reference: Yes

EXTENSIONIN - Ref. Structure for BAPI Parameters EXTENSIONIN/EXTENSIONOUT

Data type: BAPIPAREX
Optional: Yes
Call by Reference: Yes

Copy and paste ABAP code example for BAPI_PAYMENTREQUEST_CREATE 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_origin  TYPE BAPI2021_ORIGIN, "   
lv_return  TYPE BAPIRET2, "   
lt_address_data  TYPE STANDARD TABLE OF BAPI2021_ADDRESS, "   
lv_references  TYPE BAPI2021_REFERENCES, "   
lv_releasepost  TYPE BAPI2021_HELP-RELEASEPOST, "   'X'
lv_releasepay  TYPE BAPI2021_HELP-RELEASEPAY, "   'X'
lv_testrun  TYPE BAPI2021_HELP-TESTRUN, "   
lt_bank_data  TYPE STANDARD TABLE OF BAPI2021_BANK, "   
lv_requestid  TYPE BAPI2021_KEYNO-REQUESTID, "   
lv_organisations  TYPE BAPI2021_ORGANISATIONS, "   
lv_accounts  TYPE BAPI2021_ACCOUNTS, "   
lt_reference_text  TYPE STANDARD TABLE OF BAPI2021_REFTEXT, "   
lv_amounts  TYPE BAPI2021_AMOUNTS, "   
lt_extensionin  TYPE STANDARD TABLE OF BAPIPAREX, "   
lv_value_dates  TYPE BAPI2021_DATES, "   
lv_paym_control  TYPE BAPI2021_PAYMENTCTRL, "   
lv_corr_doc  TYPE BAPI2021_CORRDOC, "   
lv_central_bank_rep  TYPE BAPI2021_CENTRALBANKREP, "   
lv_instructions  TYPE BAPI2021_INSTRUCTIONS. "   

  CALL FUNCTION 'BAPI_PAYMENTREQUEST_CREATE'  "Creation of a Payment Request
    EXPORTING
         ORIGIN = lv_origin
         REFERENCES = lv_references
         RELEASEPOST = lv_releasepost
         RELEASEPAY = lv_releasepay
         TESTRUN = lv_testrun
         ORGANISATIONS = lv_organisations
         ACCOUNTS = lv_accounts
         AMOUNTS = lv_amounts
         VALUE_DATES = lv_value_dates
         PAYM_CONTROL = lv_paym_control
         CORR_DOC = lv_corr_doc
         CENTRAL_BANK_REP = lv_central_bank_rep
         INSTRUCTIONS = lv_instructions
    IMPORTING
         RETURN = lv_return
         REQUESTID = lv_requestid
    TABLES
         ADDRESS_DATA = lt_address_data
         BANK_DATA = lt_bank_data
         REFERENCE_TEXT = lt_reference_text
         EXTENSIONIN = lt_extensionin
. " BAPI_PAYMENTREQUEST_CREATE




ABAP code using 7.40 inline data declarations to call FM BAPI_PAYMENTREQUEST_CREATE

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 RELEASEPOST FROM BAPI2021_HELP INTO @DATA(ld_releasepost).
DATA(ld_releasepost) = 'X'.
 
"SELECT single RELEASEPAY FROM BAPI2021_HELP INTO @DATA(ld_releasepay).
DATA(ld_releasepay) = 'X'.
 
"SELECT single TESTRUN FROM BAPI2021_HELP INTO @DATA(ld_testrun).
 
 
"SELECT single REQUESTID FROM BAPI2021_KEYNO INTO @DATA(ld_requestid).
 
 
 
 
 
 
 
 
 
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!