SAP BAPI_PAYMENTREQ_STARTPAYMENT Function Module for Start Payment of Payment Request









BAPI_PAYMENTREQ_STARTPAYMENT is a standard bapi paymentreq startpayment SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Start Payment of 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 paymentreq startpayment FM, simply by entering the name BAPI_PAYMENTREQ_STARTPAYMENT 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_PAYMENTREQ_STARTPAYMENT 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_PAYMENTREQ_STARTPAYMENT'"Start Payment of Payment Request
EXPORTING
* PSTNG_DATE = SY-DATUM "Posting Date in the Document
* NEXT_DATE = '99991231' "Date of Next Payment Run
* USE_PAYMENT_MEDIUM_TOOL = "Create Payment Media with the PAYM-Tool?
* PAYMENT_RUN_LOG = "Write the Additional Log for the Payment Run?
* TESTRUN = "Simulate Payment of Payment Requests

IMPORTING
RETURN = "Confirmations
PAYMENT_RUN_DATE = "Payment Run Date
PAYMENT_RUN_ID = "Identification of the Payment Run

TABLES
REQUESTID = "Selection of Payment Request Key
* REPORTS = "Transfer Structure of Reports and Variants
.




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_PAYMENTREQ_STARTPAYMENT

PSTNG_DATE - Posting Date in the Document

Data type: BAPI2021_PAY-PSTNG_DATE
Default: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)

NEXT_DATE - Date of Next Payment Run

Data type: BAPI2021_PAY-NEXT_DATE
Default: '99991231'
Optional: Yes
Call by Reference: No ( called with pass by value option)

USE_PAYMENT_MEDIUM_TOOL - Create Payment Media with the PAYM-Tool?

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

PAYMENT_RUN_LOG - Write the Additional Log for the Payment Run?

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

TESTRUN - Simulate Payment of Payment Requests

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

EXPORTING Parameters details for BAPI_PAYMENTREQ_STARTPAYMENT

RETURN - Confirmations

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

PAYMENT_RUN_DATE - Payment Run Date

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

PAYMENT_RUN_ID - Identification of the Payment Run

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

TABLES Parameters details for BAPI_PAYMENTREQ_STARTPAYMENT

REQUESTID - Selection of Payment Request Key

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

REPORTS - Transfer Structure of Reports and Variants

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

Copy and paste ABAP code example for BAPI_PAYMENTREQ_STARTPAYMENT 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, "   
lt_requestid  TYPE STANDARD TABLE OF BAPI2021_SELREQUESTID, "   
lv_pstng_date  TYPE BAPI2021_PAY-PSTNG_DATE, "   SY-DATUM
lt_reports  TYPE STANDARD TABLE OF BAPI2021_REPORTS, "   
lv_next_date  TYPE BAPI2021_PAY-NEXT_DATE, "   '99991231'
lv_payment_run_date  TYPE BAPI2021_PAY-PAYMENT_RUN_DATE, "   
lv_payment_run_id  TYPE BAPI2021_PAY-PAYMENT_RUN_ID, "   
lv_use_payment_medium_tool  TYPE BAPI2021_PAY-USE_PAYMENT_MEDIUM_TOOL, "   
lv_payment_run_log  TYPE BAPI2021_PAY-PAYMENT_RUN_LOG, "   
lv_testrun  TYPE BAPI2021_HELP-TESTRUN. "   

  CALL FUNCTION 'BAPI_PAYMENTREQ_STARTPAYMENT'  "Start Payment of Payment Request
    EXPORTING
         PSTNG_DATE = lv_pstng_date
         NEXT_DATE = lv_next_date
         USE_PAYMENT_MEDIUM_TOOL = lv_use_payment_medium_tool
         PAYMENT_RUN_LOG = lv_payment_run_log
         TESTRUN = lv_testrun
    IMPORTING
         RETURN = lv_return
         PAYMENT_RUN_DATE = lv_payment_run_date
         PAYMENT_RUN_ID = lv_payment_run_id
    TABLES
         REQUESTID = lt_requestid
         REPORTS = lt_reports
. " BAPI_PAYMENTREQ_STARTPAYMENT




ABAP code using 7.40 inline data declarations to call FM BAPI_PAYMENTREQ_STARTPAYMENT

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 PSTNG_DATE FROM BAPI2021_PAY INTO @DATA(ld_pstng_date).
DATA(ld_pstng_date) = SY-DATUM.
 
 
"SELECT single NEXT_DATE FROM BAPI2021_PAY INTO @DATA(ld_next_date).
DATA(ld_next_date) = '99991231'.
 
"SELECT single PAYMENT_RUN_DATE FROM BAPI2021_PAY INTO @DATA(ld_payment_run_date).
 
"SELECT single PAYMENT_RUN_ID FROM BAPI2021_PAY INTO @DATA(ld_payment_run_id).
 
"SELECT single USE_PAYMENT_MEDIUM_TOOL FROM BAPI2021_PAY INTO @DATA(ld_use_payment_medium_tool).
 
"SELECT single PAYMENT_RUN_LOG FROM BAPI2021_PAY INTO @DATA(ld_payment_run_log).
 
"SELECT single TESTRUN FROM BAPI2021_HELP INTO @DATA(ld_testrun).
 


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!