Configure pain.002 payment status report in SAP

This post is a detailed guide on implementing ISO 20022 XML pain.002 payment status report or payment acknowledgement files in SAP S/4HANA: Multi-Bank Connectivity, Bank Communication Management and Advanced Payment Management.

Pain.002 payment status report

Payment status report, pain.002 or pain.002.001.03 is a log containing the actual status of payments (e. g. rejection, acceptance) submitted by SEPA Credit Transfer (pain.001) or SEPA Direct Debit (pain.008).

pain.002 Payment Status Report
Payment Status Report integration via SAP Multi-Bank Connectivity

It helps to track the end-to-end payment status in the payment lifecycle. These XML files contain group and transaction level status.

  1. Validates the file schema or syntax is correct upon receipt of the file.
  2. Validates each payment transaction in the file and check if all the information needed to process the transaction further downstream is present correctly.
  3. You receive ACSP or ACSC in case of accepted by bank or RJCT in case of rejected by bank as an external status from the bank at this level.

ISO20022 PAIN.002 XML Schema

Group Header

This block is provided once per Payment Status Report and contains fields like Message ID and ID. Message Id is a unique field (Mandatory Block).

ISO XML TagInformation
<MsgId>Message Id is generated by bank
<Id>Identification is generated by bank

Original Group Information and Status

This block is provided once per PSR and contains values from the outgoing pain.001 file, it contains fields like original message ID, original number of transactions, original control sum, and group status (Mandatory Block).

ISO XML TagInformation
<OrgnlMsgId>RENUM
<OrgnlNbOfTxs>Number of transactions in the file
<OrgnlCtrlSum>File total
<GrpSts>Group status

Note: <OrgnlPmtInfId> – System reads the first 10 digits (RENUM) from the XML tag to identify the batch.

Original Payment Information and Status

This block is provided multiple times per PSR and contains values from the outgoing pain.001 file, it contains important fields like original payment information ID, original instruction ID, original EndtoEnd Id, and reason code (Optional block).

ISO XML TagInformation
<OrgnlPmtInfId>RENUM+CC+Last two digits of Fiscal Year
<OrgnlInstrId>01-Company Code+Payment Doc+Year
<OrgnlEndToEndId>Payment document number
<TxSts>Transaction status

Configuring pain.002 Payment Status Report

This section covers baseline configuration steps and prerequisites for pain.002 payment status reports in SAP Bank Communication Management, SAP Multi-Bank Connectivity and SAP Advanced Payment Management.

Note: You need to activate Business Function FIN_FSCM_BNK by running transaction SFW5

Bank Communication Management

Go to SPRO > SAP Reference IMG > Financial Supply Chain Management > Bank Communication Management > Payment Status Management > Map External Status to Internal Status

This node allows us to configure bank specific status codes that are coming externally in payment status reports. These codes will update the status in BCM reports like BNK_MONI transaction or Monitor Payments app.

pain.002 Payment Status Report

Note: You need to configure external status code PAIN_ABCD to internal code BSP (Batch partially processed), or else the system will give an error message while uploading the files.

Commonly used status

BACAccepted by Bank
BPAPartially Accepted by Bank
BPEPending by Bank
BRBReceived by Bank
BRERejected by Bank
BSPBatch partially processed

SAP Multi-Bank Connectivity

You can use this Customizing activity to maintain application-specific inbound processing steps. Execute transaction code SPRO and choose Multi-Bank Connectivity Connector > Maintain Inboud Processing Steps.

To use SAP Multi-Bank Connectivity for sending a message to a bank using the SWIFT network, you need to define the relevant SWIFT parameters in the connector for SAP Multi-Bank Connectivity. More information: Configure Multi-Bank Connectivity for SWIFT and Bank Statements.

Are you finding it useful? Help for more content!

Select Payment Method
Personal Info

Credit Card Info
This is a secure SSL encrypted payment.

Donation Total: 5,00€

SAP Advanced Payment Management

You can classify bank response codes per financial institute. For each institute, different status codes can be expected. You can set the classification for the values you receive from your bank.

Go to SPRO > Financial Supply Chain Management > Advanced Payment Management > External Interfaces > File Handler > External Status > Define Status for Bank Messages

You can assign exception handling reactions to the relevant bank reject messages.

Go to SPRO > Financial Supply Chain Management > Advanced Payment Management > External Interfaces > File Handler > External Status > Assign Exception Handling Reaction to Bank Reject

Upload pain.002 payment status report

You can use this report to automatically upload Payment Status Report XML files from the application server directory to update the status of payment batches that were created in SAP Bank Communication Management. You can schedule this report in the background at regular intervals.

Prerequisites

You have defined three logical paths using transaction FILE:

  • One for the input files,
  • one for the processed files without errors,
  • and one for the processed files with errors.

You have created the subobject STATUSREPORT. Use transaction SLG0, select object FBNK and create its subobject STATUSREPORT with the text XML Payment Status Report.

Upload pain.002 file

Run transaction S_EBJ_98000208 or report RBNK_IMPORT_PAYM_STATUS_REPORT via SE38.

informe estado pago pain.002
  1. Specify the logical path of the files containing Customer Payment Status Report.
  2. You can use multiple selection to search for files, for instance with a specific string and extension (such as *.xml). The selection is case sensitive.
  3. If the system cannot store a processed file there, it remains in the import directory after processing.
  4. If the system cannot store a processed file there, it remains in the import directory after processing.
  5. Name of XSL Transformation: The default value is PAIN002_V3_TO_CPON.

Payment status update

Pain.002 payment status report updates the status in Bank Communication Management (BCM) and payment reports like BNK_MONI transaction or Monitor Payments app.

informe estado pago pain.002
Monitor Payments (Fiori app ID F2388)

Did you find it useful? Help for more content!

Select Payment Method
Personal Info

Credit Card Info
This is a secure SSL encrypted payment.

Donation Total: 5,00€

Leave a Reply

Your email address will not be published. Required fields are marked *