Fonction SAP BAPI_PAYMENTREQUEST_CREATE - Creation of a Payment Request

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
ACCOUNTS BAPI2021_ACCOUNTS u 61 Accounts
AMOUNTS BAPI2021_AMOUNTS u 133 Amounts and Currencies
CENTRAL_BANK_REP BAPI2021_CENTRALBANKREP u 23 X Financial Reporting Data
CORR_DOC BAPI2021_CORRDOC u 19 X Corresponding Accounting Document
INSTRUCTIONS BAPI2021_INSTRUCTIONS u 10 X Instruction Keys
ORGANISATIONS BAPI2021_ORGANISATIONS u 20 Organizations
ORIGIN BAPI2021_ORIGIN u 43 Origin
PAYM_CONTROL BAPI2021_PAYMENTCTRL u 72 Payment Control
REFERENCES BAPI2021_REFERENCES u 177 X Reference Data
RELEASEPAY BAPI2021_HELP-RELEASEPAY C 1 'X' X Release Payment Request for Payment
RELEASEPOST BAPI2021_HELP-RELEASEPOST C 1 'X' X Release Payment Request for Posting
TESTRUN BAPI2021_HELP-TESTRUN C 1 X Switch to Simulation Session for Write BAPIs
VALUE_DATES BAPI2021_DATES u 24 Data for Due Date and Value Date

Paramètre Reférence Type Long. Description
REQUESTID BAPI2021_KEYNO-REQUESTID C 10 Key Number for Payment Request
RETURN BAPIRET2 u 548 Return Parameter

Paramètre Reférence Long. Facultatif Description
ADDRESS_DATA BAPI2021_ADDRESS 333 Payment Request: Address Data
BANK_DATA BAPI2021_BANK 205 X BAPI Payment Request: Bank Data
EXTENSIONIN BAPIPAREX 990 X Ref. Structure for BAPI Parameters EXTENSIONIN/EXTENSIONOUT
REFERENCE_TEXT BAPI2021_REFTEXT 139 X BAPI Payment Request: Note to Payee Texts

Functionality
You can create payment requests with this method.
A payment request is a payment order that is carried out by the paymentprogram for payment requests. You use this method to transfer all datanecessary for the payment. Each time the method is called, only one
payment item is transferred.

Notes
The following authorization object is checked with activity 01(create):

  • F_PAYRQ,,Authorization object for payment requests

  • Transfer
    You determine how the payment request is created with parametersReleasepost and Releasepay:
    • The payment request is updated in cash management and forecast and is
    • released for payment:
      Releasepost "X"
      Releasepay "X"
      • The payment request is updated in cash management and forecast. The
      • method PaymentRequest.Release releases the payment request forpayment.
        Releasepost "X"
        Releasepay " "
        • The payment request is parked. Update in cash management and forecast
        • occurs with method PaymentRequest.Post. Next, release forpayment is effected with method PaymentRequest.Release.
          Releasepost " "
          Releasepay " "
          Processing steps
          This method executes the following processing steps:
          • Authorization check

          • Customer exit for check

          • Entry of payment request and completion of data

          • Payment request check

          • Optional: Entry and check of data for cash management and forecast

          • Entry of customer enhancements

          • Customer exit for update of own data

          • Update of payment request data

          • Optional: Update of cash management and forecast data

          • Update of payment request data and cash management and forecast data isdone using temporary storage. This means that the data is first savedinternally on a temporary basis and written in the database as a tableinsert with COMMIT WORK. Deletion of internal storage is carried outduring ROLLBACK WORK.
            Customer enhancements
            The method supports the SAP customer enhancement concept. It ispossible to enhance payment request table PAYRQ (BAPI table extension:BAPI_TE_PAYRQ) and to permit this to be updated with table Extensionin.Furthermore, two customer exits exist through which checks and updateof own data can be carried out (SAP enhancement: PRQ_BAPI).
            Messages
            INCLUDE BAPI_RET

            Further information
            You can find further information in the SAP Library underFinancials -> Financial Accounting -> Bank Accounting -> PaymentTransactions -> Automatic Payments -> Payment Program for PaymentRequests

            Description
            The key number is returned to the user in the field REQUESTID aftersuccessful creation of the payment request. Number assignment happensinternally and the user is not in a position to change it.

            Description
            INCLUDE BAPI_TABLE

            Value range
            Type,,ID ,,Nummer,,Text
            E ,,FIBL1 ,,003 ,,No execution authorization for company code &1 andorigin &2
            E ,,FICORE,,816 ,,House bank ID & does not exist for company code &
            E ,,FICORE,,817 ,,Account ID & does not exist for house bank ID &
            E ,,BF00 ,,211 ,,Bank & & does not exist
            E ,,PZ ,,300 ,,Address data is incomplete or contains errors
            E ,,PZ ,,301 ,,Bank details are incomplete or contain errors
            E ,,PZ ,,302 ,,Only account numbers containing up to 18characters are supported
            E ,,FICORE,,165 ,,Company code & is not defined
            E ,,F5 ,,162 ,,Business area & not supported
            E ,,PZ ,,710 ,,Partner number or account type invalid
            E ,,PZ ,,711 ,,Bank account transfers only possible with accounttype "S"
            E ,,PZ ,,712 ,,You can only specify an alternative payee foraccount types "D" and "K"
            E ,,PZ ,,713 ,,Specify a branch only for account types "D" and"K"
            E ,,FH ,,005 ,,Account &1 not found in company code &2
            E ,,PZ ,,643 ,,Payment currency & missing
            E ,,FIBL1 ,,001 ,,Origin indicator &1 does not exist
            E ,,PZ ,,706 ,,House bank group &1 with company code &2 does notexist
            E ,,PZ ,,014 ,,No payment method has been entered
            E ,,FZ ,,009 ,,Payment method & not defined in country &, correctyour entry
            E ,,FZ ,,012 ,,Payment method & not defined in company code &,correct your entry
            E ,,PZ ,,822 ,,Incorrect import parameters for module &
            E ,,F2 ,,403 ,,Payment block & not defined
            E ,,00 ,,058 ,,Entry & & & does not exist (check entry)
            E ,,69 ,,949 ,,Entry & & & missing in table &
            E ,,FIBL1 ,,040 ,,SCB indicator &1 does not exist
            E ,,FIBL1 ,,041 ,,DME recipient code &2 is invalid
            E ,,FIBL1 ,,042 ,,Instruction key &1 does not exist for any paymentmethod in bank country &2
            E ,,B0 ,,252 ,,Company code & accounting clerk & not supported intable T001S
            E ,,FB ,,279 ,,Company & not supported
            E ,,PZ ,,127 ,,Key number must not be filled in extension table
            Other messages can occur during conversion of amounts from businesspartner management, central address management, cash management andforecast, and number range management.

            Description
            This structure contains the accounts required to create the paymentdocument. Payment requests can refer to a concrete vendor/customer orG/L business transaction, but do not have to.
            At least both of the following fields have to be filled:

            • Account type (field ACCT_TYPE)

            • If the payment refers to a business transaction in accountspayable/receivable, you enter either "K" or "D". Otherwise you enter an"S" so that the posting can be made to a G/L account.
              • Business partner account (field PARTNER_ACCOUNT)

              • Depending on the business partner, the account and account type have tobe entered here. The clearing document number in the payment documentis posted to this account.
                The following fields do not have to be filled/have to be filled only inspecial circumstances:
                • Alternative reconciliation account ( field RECONCIL_ACCOUNT)

                • The alternative reconciliation account can be filled forvendor/customer business transactions. If the field is not filled, thealternative reconciliation account that is stored in the master recordis used.
                  • Bank clearing account (field BANK_CLEARING_ACCT)

                  • The bank clearing account for the payment document only has to beentered when payment program account determination is not being used.You enter account determination in Customizing under FinancialAccounting -> Bank Accounting -> Business Transactions -> PaymentTransactions -> Payment Handling -> Enter Origin Indicators.
                    • Bank account number (field PARTNER_ACC_TRANSFER)

                    • The bank account number (G/L account) of the partner's bank is onlyrequired for update of cash management and forecast in the case ofbank-to-bank transfers.
                      • Alternative payee (field ALTERN_PAYEE)

                      • The alternative payee is only needed for payments to vendors orcustomers.
                        • Branch account number (field BRANCH)

                        • The branch account number is only needed for payments to vendors orcustomers with a branch.

                          Default

                          Description
                          This structure contains currencies and amounts.
                          INCLUDE BAPI_DATAELEMENT
                          You must provide at least the following data:

                          • Payment currency (field PAYM_CURR)

                          • Payment amount (field PAYM_AMOUNT)

                          • Local currency data, parallel currency data, business transactioncurrency and amount can also be transmitted. Furthermore, cash discountand withholding tax amounts are entered in payment currency and localcurrency.
                            Otherwise amounts in house currency are calculated on the paymentrequest creation date using the average rate (exchange rate type "M").Parallel currency amounts are calculated on the creation date with theexchange rate type that you defined in activityDefine Additional Local Currencies.

                            Value range
                            Negative amounts are outgoing payments.

                            Default

                            Description
                            This structure contains data for a message to the central bank. Theextent to which this data is transferred depends on the country and thebusiness transaction.
                            INCLUDE BAPI_DATAELEMENT

                            Description
                            This structure contains the item data of the corresponding accountingdocument. A corresponding document is created by the application alongwith the payment request.
                            INCLUDE BAPI_DATAELEMENT
                            When the document data has been transferred into this structure andopen item managment is not active for this account, the document iscleared with the payment.
                            If no data is transferred to the structure or open item management isnot active for the account, the item is posted on account.
                            You enter the account to which the line item belongs in thePartner_Account field in structure accounts. You enterthe company code in the structure organisations.

                            Example
                            Besides the payment request, a G/L account item is created for thebusiness transaction in a clearing account. The payment program createsthe payment document and it's clearing line item is posted to theclearing account. Both G/L account items are cleared.

                            Description
                            This structure contains instructions for the house bank.
                            You decide whether or not certain payments require instructions inconjunction with the house bank for the business transaction. It onlymakes sense to enter instructions when a certain house bank isdetermined in the structure PaymControl or when house banks areable to interpret the instructions. In addition, the payment mediumprograms have to be able to forward instructions to the house bank.
                            INCLUDE BAPI_DATAELEMENT

                            Description
                            This structure contains those organizations involved in the payment.This is why you have to enter the company code (COMP_CODE). You enterthe company code where the original business transaction occurred.
                            You only need to enter paying and sending company codes if theapplication entered the paying company code in the origin as defaultand this happens to differ from the company code.
                            Entering the business area BUS_AREA (cleared item in the paymentdocument) and BUS_AREA_BANK (bank item in the payment document) isoptional.
                            INCLUDE BAPI_DATAELEMENT
                            You must enter at least the following data:

                            • Company code (field COMP_CODE)
                            • Description
                              This structure contains theorigin of the paymentrequest.
                              This is on the one hand the business origin (ORIGIN) and on the otherhand the reference to a source object (OBJ_TYPE, OBJ_KEY) for a certainsystem (LOGSYSTEM).
                              You must provide the system with at least the following data:

                              • Origin indicator (field ORIGIN)
                              • Default

                                Description
                                This structure contains data that controls how the payment programclears the payment request.
                                You have to provide the following data:

                                • List of payment methods (field PAYMENT_METHODS)

                                • The following fields are optional:
                                  • Group of house bank accounts (field HOUSEBANKACCT_GROUP)

                                  • In bank determination in the payment program, all the possible housebank accounts required for the payment are restricted.
                                    • Fields HOUSEBANKID, HOUSEBANKACCTID

                                    • Entry of a house bank account that must be used for clearing. If youenter a house bank account, you cannot enter a group of house banks,and vice versa.
                                      • List of payment methods (field PAYMENT_METHODS)

                                      • Group of payment methods used for clearing.
                                        Here, you must enter all payment methods that could possibly berequired. (For example, automatic debit of a receivable at the businesspartner: Here, the entry of the payment method for the automatic debitis required. Also, because it is possibile that payables might be usedfor clearing, the additional entry of a payment method for outgoingpayments might also make sense).
                                        • Bank ID (field BANKID)

                                        • Entry of partner bank details for a central business partner.
                                          When using a central business partner, partner bank details can bepredefined.
                                          • Grouping for payments (field PAYM_GROUP)

                                          • The payment program only clears items together when they display thesame entries in the grouping field. This field can also be used togroup payments.
                                            • No exchange rate differences (field NO_EXCHANGE_RATE_DIFF)

                                            • You can stipulate that the payment program for payment requests doesnot post any exchange rate differences
                                              • Individual payment (field INDIV_PAYMENT)

                                              • Indicates that this payment request should not be cleared along withother items.
                                                • Urgent payment (field URGENT_PAYMENT)

                                                • You set this indicator if you want the payment request to be paidimmediately. This overrides any due date data.
                                                  • Payment block (field PMNT_BLOCK)

                                                  • When you set a payment block, the payment program inserts the paymentrequest in the exceptions list. The block can be deleted manually inproposal processing.
                                                    • Payment method supplement (field PMTMTHSUPL)

                                                    • Grouping of payments can be controlled by entry of a payment methodsupplement, if this has been defined in company code details. This iscarrie out in Customizing under Financial Accounting -> AccountsReceivable and Accounts Payable -> Business Transactions -> OutgoingPayments -> Payment Method/Bank Selection for Payment Program -> Set UpAll Company Codes for Payment Transactions.
                                                      • Payment code (field PAYCODE)

                                                      • The payment code is used in consultation with the house bank. Itrepresents an instruction that states between which accounts thepayment will occur.

                                                        Default

                                                        Description
                                                        This structure contains reference data for the payment request.
                                                        These reference fields can be used to create the note to payee for thepayment or the payment advice note. The business transaction dictateswhich fields are used.
                                                        Special fields in this structure are Accounting clerk (this datais read during creation of correspondence) and Company ID oftrading partner (required for consolidation).
                                                        INCLUDE BAPI_DATAELEMENT

                                                        Description
                                                        Releases the payment request for payment.

                                                        Description
                                                        Means that the payment request is updated in cash management andforecast.

                                                        Description
                                                        Means that the payment request stages can be simulated up to the actualposting itself. In particular, checks are carried out.

                                                        Description
                                                        This structure contains due date and value date data.
                                                        INCLUDE BAPI_DATAELEMENT
                                                        If the due date is not transmitted, the due date is set to the earliervalue date. If the value date is not transmitted to the sending bank,the due date is set to the system date, meaning that the paymentrequest is payable immediately.
                                                        The due date check and value date calculation at the house bank iscarried out in the payment program. The value date is set inCustomizing under Financial Accounting -> Bank Accounting ->Business Transactions -> Payment Transactions -> Payment Handling ->Value Date.
                                                        At least one of the two value dates must be transmitted.

                                                        Default

                                                        Description
                                                        The table contains business partner and payee address data. Theperson/entity whose address is meant is laid down in fieldPARTNER_ROLE.
                                                        Address data can be entered either explicitly, or by entering thecentral business partner and the address number in central addressmanagement. Whether the address data has to be transmitted in itsentirety depends on the payment method. (With checks, you have to enterthe street and house number or P.O. Box, whereas in the case of banktransfers this is not a requirement).

                                                        Description
                                                        This table contains payee bank data and abank chain comprising amaximum of three banks.
                                                        The role of the bank is entered in field ACCOUNT_ROLE. In the case ofintermediary banks, the role has to be entered as intermediary bank inthe field BANKCHAIN_BANK_ROLE.
                                                        If no intermediary banks are entered, these are determined in thepayment program.
                                                        You transmit the bank details of the payee. Bank details (REGION,BANK_NO, SWIFT_CODE) can be determined automatically using bank countryand bank key data.
                                                        If the central business partner is used, you can fill the field BANKIDin the PaymControl structure.
                                                        Depending on the payment method used, transmission of business partnerbank details is / is not necessary. (For example, bank details are notrequired where payment is made by check). Whether or not transmissionof a bank chain is required depends (amongst other factors) on whetherthe payment medium program is able to process the bank chain.

                                                        Description
                                                        It is possible to use the SAP enhancement concept for BAPIs with thetable ExtensionIn. Payment request table PAYRQ can be enhanced usingBAPI table extension: BAPI_TE_PAYRQ Update is then happens through theBAPI.

                                                        Description
                                                        The reference text is a SAPscript text that can be used to createcorrespondence (payment advice). Whether or not you can edit this textdepends on the type of programs used for payment medium creation andfor correspondence.