Enterprise Resource Planning Blogs by SAP
Get insights and updates about cloud ERP and RISE with SAP, SAP S/4HANA and SAP S/4HANA Cloud, and more enterprise management capabilities with SAP blog posts.
cancel
Showing results for 
Search instead for 
Did you mean: 
Michal_Pandosca
Advisor
Advisor
This blog aims to clarify the different parts of the Pain.001 file and explain what is the source of each tag. Pain.001 is a payments initiation message by ISO 20022 that depicts a Credit Transfer message in XML format.

Payment initiation message is composed of three parts: Group Header, Payment
Information and Credit Transfer Transaction Information.

GrpHdr (Group Header)


Group Header is presented only once. It contains common identifying elements to
the entire message.
    <GrpHdr>
<MsgId>1025348326</MsgId>
<CreDtTm>2022-01-08T00:58:07</CreDtTm>
<NbOfTxs>1</NbOfTxs>
<CtrlSum>1000.00</CtrlSum>
<InitgPty>
</GrpHdr>
























<MsgId> Message Identification (Manage Payment Media - Reference Number)
<CreDtTm> Creation Date Time (when was the file created)
<NbOfTxs> Total number of transactions in the message
<CtrlSum> Total number of individual amounts in the message
<InitgPty> see below

InitgPty


      <InitgPty>
<Nm>TEST OF PAYMENT FORMAT AT</Nm>
<Id>
<OrgId>
<Othr>
<Id>1234512345</Id>
<Issr>CGI_Issuer</Issr>
</Othr>
</OrgId>
</Id>
</InitgPty>

Initiating party contains the same information as the Debtor. If there is a need, for example, to have different IDs for a debtor, it can be done in the customer implementation.















<Nm> Name of company code is taken from the settings of company code or from the payment method
<Id> Identification is taken from the house bank field 'Customer Number' or from the company code parameter 'CGIID'
<Issr> Issuer is taken from the company code parameter 'CGIIR'

PmtInf (Payment Information)


Payment Information contains information related to the debit side of the transaction. It can be repetitive (it can occur 1 to n times in the file depending on the number of payments).
    <PmtInf>
<PmtInfId>1025348427</PmtInfId>
<PmtMtd>TRF</PmtMtd>
<BtchBookg>true</BtchBookg>
<NbOfTxs>1</NbOfTxs>
<CtrlSum>1000.00</CtrlSum>
<PmtTpInf>
<ReqdExctnDt>2019-01-01</ReqdExctnDt>
<Dbtr>
<DbtrAcct>
<DbtrAgt>
<ChrgBr>SLEV</ChrgBr>
<CdtTrfTxInf>
</PmtInf>

 



















































<PmtInfId> Payment Information Identification
<PmtMtd>

TRF (Transfer) or CHK (Cheque) depending on the settings of payments method

TRF - only credit transfers are allowed
<BtchBookg> The payer can state their wish for the
payments to be debited individually (false)
or in a batch (true).It can be done in 'Other specification for payment medium format - Batch Booking'
<NbOfTxs> Total number of transactions in the group
<CtrlSum> Total number of individual amounts in the group
<PmtTpInf> see below
<ReqdExctnDt> Execution date (FPAYH-AUSFD)
<Dbtr> see below
<DbtrAcct> see below
<DbtrAgt> see below
<ChrgBr> This tag is handled via the Instruction Keys (see blog Instruction Key Mapping to Payment Media File)
<CdtTrfTxInf> see below


PmtTpInf


Payment Type Information tag is used to define the payment type.
      <PmtTpInf>
<InstrPrty>NORM</InstrPrty>
<SvcLvl>
<Cd>SEPA</Cd>
</SvcLvl>
</PmtTpInf>

Information filled in the Payment Type Information tag is handled via the Instruction Keys. Please refer to the documentation How to use Instruction Keys attached to SAP Note 2253571.

You can also read about Instruction Keys in this blog post: Instruction Key Mapping to Payment Media File)

Dbtr


Debtor tag provides information about the party whose account is debited with the payment.
      <Dbtr>
<Nm>Test of payment format AT</Nm>
<PstlAdr>
<Ctry>AT</Ctry>
<AdrLine>Company Code Street 123</AdrLine>
<AdrLine>1234 Company Code City</AdrLine>
</PstlAdr>
</Dbtr>

Information for the debtor in case of pain.001 (Credit transfer) is taken from the paying company code.

Identification is taken from the house bank field Customer number or from the company code parameter CGIID. The scheme name can be also changed via the customer implementation.















<Nm> Name of company code is taken from the settings of company code or from the payment method
<Ctry> Country code taken from the settings of company code
<AdrLine>

Address taken from the settings of company code

The address can also be taken from the settings of the payment method (FPAYHX - AUST1, AUST2, AUST3, AUSTO)

 

DbtrAcct


Tag Debtor Account holds information about the payment debit account.
      <DbtrAcct>
<Id>
<IBAN>AT311200000012345678</IBAN>
</Id>
<Ccy>EUR</Ccy>
</DbtrAcct>

Information for the Debtor Account is taken from the house bank Customizing and from its account.

 











<IBAN> IBAN set for the bank account
<Ccy> Currency set for the bank account (T012K)

IBAN will be used when it is defined in the account. In other cases, section Othr will be displayed with the account number and the specific Scheme Name tag.
      <DbtrAcct>
<Id>
<Othr>
<Id>0123456789</Id>
<SchmeNm>
<Cd>BBAN</Cd>
</SchmeNm>
</Othr>
</Id>
<Ccy>USD</Ccy>
</DbtrAcct>
















<Id>
Account Number
<SchmeNm>

External Account Identification Code

See code specification by ISO20022
<Ccy> Currency set for the account

DbtrAgt


Debtor Agent tag holds information about the payer's bank.
      <DbtrAgt>
<FinInstnId>
<BIC>BKAUATWWXXX</BIC>
</FinInstnId>
</DbtrAgt>

Debtor Agent section holds information about the debtor's bank and it is taken from the house bank Customizing and from its account







<BIC> Identification of the bank



CdtTrfTxInf (Credit Transfer Transaction Information)


Credit Transfer Transaction Information is part of the Payment Information part,
and is mandatory and can be repetitive. It contains information related to the credit
side of the transaction.
      <CdtTrfTxInf>
<PmtId>
<Amt>
<ChrgBr>SLEV</ChrgBr>
<CdtrAgt>
<Cdtr>
<CdtrAcct>
<InstrForCdtrAgt>
<RmtInf>
</CdtTrfTxInf>




































<PmtId> see below
<Amt> see below
<ChrgBr> This tag is handled via the Instruction Keys (see blog Instruction Key Mapping to Payment Media File)
<CdtrAgt> see below
<Cdtr> see below
<CdtrAcct> see below
<InstrForCdtrAgt> see below
<RmtInf> see below

PmtId


        <PmtId>
<InstrId>01-PAT120000001092017</InstrId>
<EndToEndId>2000000109</EndToEndId>
</PmtId>












<InstrId> Payer’s unique transaction identification, which
is used between the payer and payer’s bank.(concatenation of document type, company code, document number and year)
<EndToEndId> Unique identification assigned by the payer to
identify the transaction. This identification will be
returned to the payer and passed on to the
beneficiary.Recommended settings:Short entry for note to payee, internal: FPAYH-DOC1R+4(10)

Amt


        <Amt>
<InstdAmt Ccy="EUR">1000.00</InstdAmt>
</Amt>








<InstdAmt>


Transaction currency and amount before deductions

(FPAYH-WRBTR)

CdtrAgt


Creditor Agent tag holds information about the beneficiary’s account holding bank.
        <CdtrAgt>
<FinInstnId>
<BIC>BAWAATWWXXX</BIC>
</FinInstnId>
</CdtrAgt>








<BIC>
Bank Identifier Code



Cdtr


Creditor tag holds information about the party whose account is credited with the
payment.
        <Cdtr>
<Nm>Vendor for paym. format test</Nm>
<PstlAdr>
<StrtNm>Vendor street</StrtNm>
<BldgNb>123</BldgNb>
<PstCd>1234</PstCd>
<TwnNm>Vendor QRPCH3R city</TwnNm>
<Ctry>CH</Ctry>
</PstlAdr>
</Cdtr>

        <Cdtr>
<Nm>Vendor for paym. format test</Nm>
<PstlAdr>
<Ctry>CH</Ctry>
<AdrLine>Vendor Street 123</AdrLine>
<AdrLine>1234 Vendor QRPCH3R city</AdrLine>
</PstlAdr>
</Cdtr>















<Nm>


Account Holder Name

FPAYH-KOINH or FPAYH-ZNME1/ZNME2 if FPAYH-KOINH is empty
<PstlAdr>



Structured:

<StrtNm>, <BldgNb>, <PstCd>, <TwnNm>, <Ctry>


Unstructured:

<Ctry>, <AdrLine>, <AdrLine>

CdtrAcct


The Creditor Account tag holds information about the beneficiary's account.
        <CdtrAcct>
<Id>
<IBAN>AT816000000007654321</IBAN>
</Id>
</CdtrAcct>








<IBAN> IBAN set for the bank account

IBAN will be used when it is defined in the account. In other cases, section Othr will be displayed with the account number and the specific Scheme Name tag.
      <CdtrAcct>
<Id>
<Othr>
<Id>0123456789</Id>
<SchmeNm>
<Cd>BBAN</Cd>
</SchmeNm>
</Othr>
</Id>
</CdtrAcct>












<Id>
Account Number
<SchmeNm>

External Account Identification Code

See code specification by ISO20022

InstrForCdtrAgt


        <InstrForCdtrAgt>
<InstrInf>UETR/9851f7a0-9e5b-4004-9ba5-3b113258ff43</InstrInf>
</InstrForCdtrAgt>

RmtInf


The Remittance Information tag holds information about the payment details. Credit transfer may contain either free text as unstructured remittance information or structured remittance information, but not both at the same time. This is controlled by the "Structure Remittance Information" checkbox on the format parameter in the FBPM transaction.


Structured form
        <RmtInf>
<Strd>
<CdtrRefInf>
<Tp>
<CdOrPrtry>
<Cd>SCOR</Cd>
</CdOrPrtry>
</Tp>
<Ref>RF18000000000539007547034</Ref>
</CdtrRefInf>
</Strd>
</RmtInf>








<Ref> Creditor Reference

Unstructured form
        <RmtInf>
<Ustrd>/INV/XBLNR 2.6.2017</Ustrd>
</RmtInf>

Unstructured Remittance Information is filled via the Note to Payee settings in the OBPM2 transaction

 

 

Find more information about CGI Payment Medium Formats in this SAP Note or this SAP Note.

For more information about Instruction Keys, see this blog post.

You can find more information about Payment Formats in this collective blog.




Do you have any further comments regarding this topic? Do not hesitate to share them in the comment section below. You are also welcome to ask any questions about SAP S4/HANA Finance in the Community Q&A section.
6 Comments