Skip to Content
Product Information
Author's profile photo Michal Pandoscak

Source of Information for Tags of CGI Pain.001 File

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.

Assigned Tags

      4 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Andrei PLAIASU
      Andrei PLAIASU

      Hi Michal,

      Thanks for sharing.

      We have a bank that doesn't accept both Structured and Unstructured in tag <PstlAdr> . Is there a standard setting to prevent both in config or master data ?

       

      TxnRegards,

      MY

      Author's profile photo Ondrej Zatopek
      Ondrej Zatopek

      Dear Andrei,

      we have no standard settings. In some country versions where we have a strict country-specific documentation which supports only one or the other, we adapted our trees accordingly. But in many cases we indeed do produce both structured and unstructured. You can deactivate the elements in your customer copy of our standard country-specific tree (on S/4 HANA) or in the customer BADI implementation in case you are using CGI_XML_CT/DD on an SAP_FIN/SAP_APPL system. Please refer to our collective notes for full information:

      S4: https://launchpad.support.sap.com/#/notes/2253571

      Non-S4: https://launchpad.support.sap.com/#/notes/2784858

      Regards,

      Ondrej

      Author's profile photo Jochem Schueltke
      Jochem Schueltke

      Dear Michal Pandoscak

      Great article 👍. Where and how can we find details about the 'bank control key' (table BUT0BK,  field BKONT) - particularly to map it into an appropriate pain.001 XML tag, please?

      I am asking on behalf of a Swiss customer, which is going to use this kind of payment file for credit transfers to various foreign countries (outside the SEPA area), like Japan, South Africa or Argentinia for instance.

      Many thanks in advance for addtional information.

      Best regards,

      Jochem

      Author's profile photo Marco Lentini
      Marco Lentini

      Dear Michal,

      how to pilot in customizing between Structured and Unstructured in tag <PstlAdr> ?

       

      BR