Skip to Content
Author's profile photo Former Member

XML as Global Payment file

Applies to

SAP ERP 5.0 / 6.0 with the focus of One XML format for global payments including SEPA


The purpose of this document is:

  • To provide possible country specific requirements (Europe and Americas) used at Banks to extend the XML format
  • Development highlights to extend XML format as Global format

It is necessary the consultant is aware of all the basic settings of the Automatic payment process. This document is only focused on the creation of complete structure of payment file in XML format with the use of SAP standard template SEPA_CT.

Table of Contents

1       Introduction.

2       Benefits of using XML format as Global format

3       General Configuration.

4       XML SEPA Country specific Configuration.

4.1        Rules to determine a SEPA Payment

4.2        General Considerations: All EU – SEPA countries.

4.2.1         Invoice reference in Payment file.

4.3        Country specific changes.

4.3.1         Spain.

4.3.2         Belgium.

4.3.3         France.

5       XML SEPA extension as Global format

5.1        General Considerations.

5.2        If Beneficiary Bank has ‘IBAN’

5.3        If Beneficiary has ‘No IBAN’ – User exit

5.4        DKK Payments in Denmark.

5.5        SEK Payments in Sweden.

5.6        NOK Payments in Norway.

5.7        GBP Payments in UK.

5.8        USD Payments in US.

6       Related Content

7       Disclaimer and Liability Notice.


This document aims to understand and to use the XML format as Global format including SEPA requirements / Transactions.

To start, SAP’s standard template SEPA_CT for Credit Transfer is used. The basic requirements and technicalities to generate the payment file takes into consideration the requirement of EPC (European Payments Council)

The EPC rulebooks contain the business requirements and rules for the operation of the SEPA. The implementation guidelines specify the SEPA core requirements that apply to the UNIFI (ISO20022) XML

standards and cover mandatory bank-to-bank messages and optional recommended customer-to-bank messages.

Benefits of using XML format as Global format

  • Converging to SEPA requirements, hence in line with the legal requirements
  • Less maintenance cost for the company
  • Adaptability and flexible to accommodate any future changes  either by Financial institutions or by business
  • Highly Secured

General Configuration

Standard SEPA_CT for credit transfer cannot be used unless changes are adopted as per the bank and country specific requirements. It also depends on the Beneficiary Bank details, Currency of payment and Beneficiary bank country.

A new format can be created as there are no formats available for a specific bank/ country. This customization can be either done through modifying the standard function modules of an existing PMW  (Payment Medium Workbench) format or through developing via Data Medium Exchange Engine (DMEE). (However this document does not deal with customizing through DMEE).

XML SEPA Country specific Configuration ¨

4.1 Rules to determine a SEPA Payment

·      Data Format

  • Ordering and beneficiary accounts have to be in IBAN format
  • BIC is required for both ordering and beneficiary parties

       How recognize a payment elligible for SEPA

·      The following are few of the rules to make SEPA Credit Transfer:

  • The transactions have to be in Euro
  • The Debtor and Creditor must each hold an account with a Participant located within the SEPA
  • The transfers have to be in the SEPA area.

The SEPA area comprises the following countries:
     o   EU : Euro-zone countries:

          Austria, Belgium, Cyprus, Estonia, France, Finland, Germany, Greece, Ireland, Italy, Luxemburg, Malta, Netherlands, Portugal, Slovakia, Slovenia

          and Spain

     o   Non-EU : non-Euro-Zone countries Bulgaria, Croatia, Czech Republic, Denmark, Great Britain, Hungary, Latvia, Lithuania, Monaco, Poland,

          Romania and Sweden

4.2 General Considerations: All EU – SEPA countries

SAP Standard template SEPA_CT to be copied as a base template with the necessary naming convention.

Path: SPRO      IMG      Financial Accounting (New)     Accounts Receivable and Accounts Payable Business Transactions       Outgoing Payments     Automatic Outgoing Payments      Payment Media    Make Settings for Payment Medium Formats from Payment Medium Workbench

The above path can also be accessed through the T. Codes OBPM1 / OBPM2 / OBPM3 / OBPM4.

The steps in implementing PMW:

  • Create/ change payment medium formats
  • Assign variant to the format
  • Assign the format to payment method

Tr. Code: DMEE: To Copy (highlighted below) the Standard template – Fig 1. This will copy all the standard segments of XML format used in payment file. 


The output structure of standard DMEE file is as shown below – Fig 2


Important Considerations

  • In the Payment file, a swift BIC code can be on 8 or 11 characters. i.e., for example you can indicate in files as BNPAGB22 or BNPAGB22XXX. The four first characters have to be Letters & the 5 – 6 characters is the ISO country code.
  • In the payment file, Charges always set-up to SLEV for SEPA payments. This indicates to Bank that default charges set-up will be applied and is born by the debtor. Other charges available for NON SEPA payments are : CRED, DEBT and SHAR.
  • For example, in Denmark, default charges are shared. You can force charges to what you want by specifying one of the following values: SHAR or DEBT or CRED. This depends on the Business agreement with Beneficiaries.
  • If the Payment is SEPA relevant, it is always mandatory to have the Payment type information as follows:






  • Batch booking option.

§  If batch booking= true. The bank statement will mention a global debit of the instruction.

§  If batch booking= false. The bank statement will mention the details of all transactions within the instruction.

Sample as follows:


4.2.1 Invoice reference in Payment file

Based on the Business requirements, either the payment can be executed by grouping the invoices per vendor & currency or can be separated per invoice.  Thus with the following changes in SAP, invoice references can be transferred in the Payment file Group of invoices paid per Vendor & Currency

If the invoice is grouped per Vendor & Currency with multiple invoices to pay, it is required to capture all the invoice references in the payment file. This is required as this will serve as the reference to the Beneficiary when the Account statement is received.

Tr. Code: OBPM2: As per standard format, Note to Payee lines in XML tag can take only 4 reference Atoms that are available (32 * 4 = 128 characters separated by “/”) under <Ustrd> XML node. Hence for each vendor, four invoice numbers can only be accommodated in the unstructured field which may not be sufficient for vendors in getting remittance information details in their Account statement. It takes the details based on the above Note to payee text format (Typ 1) line: &FPAYP-XBLNR&


Tr.Code:  OBPM1


This change is called in the following node in the DMEE file:

Seven.png  Reference to be transferred without grouping

If grouping is not done, data is transferred with individual invoice references. Hence note to payee length is not a challenge as it is enough to accommodate 18 character length as the invoice reference.

4.3  Country specific changes                                                            

4.3.1 Spain

Non-resident vendors can be determined based on first three characters from their VAT Reg. No. “ESN” or Tax number contains pattern “N*” in vendor master control segment. Conditions can be maintained in Regulatory reporting XML tag where amount is greater than 50,000 Euros and Vendor Tax or VAT registration number contains pattern N* or ESN*. Hence the following condition.


4.3.2  Belgium

Initiating party ID needs to be mentioned as constant “KBO-BCE” for Belgium


4.3.3  France

·         For French beneficiaries, there is no sort code (it does not exist & sort code is just for UK domestic payments and on 6 digits – Explained below). The details as below:

Sample as follows:



·         Regulatory Reporting code needs to be mentioned as constant “152” for France where Payer is in France and Payee is outside France


Structure in the DMEE output file will appear as


Note: Null tags and empty tags are not allowed even on the address field => This involves the rejection of the whole file. Such Tags have to be removed (or fill in) from the file.

5. XML SEPA extension as Global format

5.1 General Considerations

XML pain.001.001.02 for SEPA EURO payments and xml iso pain.001.001.03 for Non EURO payments. Thus to facilitate the XML format as Global, it is required to have the header as follows :

     Sample output at Header

     <?xml version=”1.0″ encoding=”utf-8″ ?>

            <Document xmlns=”urn:iso:std:iso:20022:tech:xsd:pain.001.001.03″ xmlns:xsi=” /XMLSchema-instance”>f

To sum-up:
       – with pain.001.001.03, it is possible to send SEPA and non SEPA payments
       – with pain.001.001.02, you can only send SEPA payments

5.2 If Beneficiary Bank has ‘IBAN’

If IBAN is found in the Beneficiary bank account, the IBAN is printed via the structure in the Payment file. If not, BBAN (Basic Bank Account Number) is generated via the user exit

Output is:


5.3  If Beneficiary has ‘No IBAN’ – User exit

Conditions are put in place to check IBAN, and if blank under segment: Othr, User Exit is triggered. It is required to concatenate Bank Key and account number of the beneficiary under segment Id. 



Further, display the above generated numbers as the values are related to BBAN (Basic Bank Account Number)

under the SchemeNm as shown:


Also, Beneficiaries without IBAN number outside Europe, but with BIC code and / Beneficiary Bank country same as Postal address country structure should appear as:


If the Beneficiary Bank country same as Postal address country but without IBAN and without BIC code, the structure should appear as:


Note:  The tag   <Ctry> for french regulatory reporting is mandatory to show in DMEE file

It is required to note that, the country of the beneficiary bank is included in the swift BIC code.  In case the swift BIC code of the bank is not included, you will have to include the name and address of the bank of the beneficiary. Hence, the structure should appear as follows:


If the Beneficiary is in EURO zone and needs to be paid by multiple currencies, the challenge is to segregate and group the EURO (SEPA Relevant) and NON-EURO payments.

SAP provides with the option to control the structure and group in relation to the currency. Under the segment in Header node, we can control via the Key field as Transaction currency. Screen shot below shows what needs to be maintained under DMEE tree.


5.4 DKK Payments in Denmark

Payment type Information section for Denmark should be updated with segment Prtry (proprietary code) with ‘DO’ as follows.

This is a proprietary code which is mentioned to indicate that it is a specific domestic payment. It allows to identify that the payment is a FIK/GIRO payment.

Sample as follows:

    </SvcLvl>     <LclInstrm>

5.5 SEK Payments in Sweden

For SEK Payments, OCR – Reference text is mandatory. This reference should appear in TAG remittance info unstructured . It is important to populate ONLY with the OCR reference.
Sample as follows:

      <Ustrd>/OCR/ reference text</Ustrd>

·    The Regulatory reporting for Sweden is applied for all cross-border payment and when the beneficiary is a non-resident and for amount over 150,000 SEK (or equivalent) and has to be structure as the following one. You have to change as below

Sample as follows:




            <Cd>101</Cd> where 14 is the value of the reason code.




And the country of residence of the beneficiary has to be populated in the address section fo the beneficiary as below





                        <AdrLine>Apdo. 11111</AdrLine>

                        <AdrLine>11123 BOGOTA Colombie</AdrLine>




5.6   NOK Payments in Norway

·    KID Number in Norway

Domestic standard KID number is maintained during invoice posting. This should be populated during payment file creation to send the reference of the invoice against each payment.

It is important to populate only with /KID/ + KID reference

Sample as follows:




·    The Regulatory reporting for Norway is applied for all cross-border payment and has to be structure as the following.

Sample as follows:


5.7  GBP Payments in UK

The Clearing code for UK domestic payments has to be populated. It concerns only domestic payment and then it is to apply on the payments of the first instruction (PmtInf) only. You have to change as below

Sample as follows:












the value (050568) is a part of the IBAN (position from character 9 on 6 characters)

5.8  USD Payments in US

·       It is necessary to understand the types of USD payment based on the beneficiary country and bank country.

Beneficiary Country

  1. Bene. Bank country


Type of Transfer












NON ACH, can be USD Wires (499)




NON ACH, can be USD Wires (499)

                                                  ** CCD: Corporate Payments, PPD: Personal payments

Type of transfer should appear under tag Cd as follows:


  • For any USD local payments, service level code is NURG as follows





  • For any USD foreign payments, service level code is URGP as follows

Sample as follows:











Also, the formatting for the debtor account tag should be

Sample as follows:



– <Othr>









6.  Related Content

For more information for DMEE payment structure and configuration details, visit SAP help:

7. Disclaimer and Liability Notice

This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade.

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      A very deatiled and useful document. Thanks!!

      Author's profile photo Tanguy Muffat
      Tanguy Muffat

      Hello Srinvasa,

      Tahnk you for this document highlighting all those points of consideration.

      Something you do not mention - Do we have to maintain instruction key somehow ?

      Author's profile photo Former Member
      Former Member

      Hi Srinivasa,

      Thank you for the detailed documentation. It is very helpful.

      I am working on implementing the CGI_XML format for US. However, i am unable to get the Service Level Code - URGP, NURG and ACH Class Codes: CCD and PPD in my files.

      I have set up the URGP and NURG in the Instruction Key. I have also assigned the PPD and CCD in the Payment method supplement in FBZP.

      Can you provide any guidance as to how i can get these values to appear in my file?



      Author's profile photo Addvisor Cosultants
      Addvisor Cosultants

      Hi Srinivasa,

      Coul´d you help me? I´m using transformation program CGI_XML_CT_XSLT to process files of bank return for vendors payment.

      But processing ff.5 (using PAIN 002.001 as XML especif format,  occours the following error:

      Transformation program CGI_XML_CT_XSLT could not be processed - FB891.

      Do you have any hint or manual to activate this program for this purpose? Or I need to use other program, ou create my own program?

      Any sugestion is wellcome.


      Thanks a lot.


      Author's profile photo Neehir Bhatt
      Neehir Bhatt

      Hi Srinivasa,

      Thanks for the detailed explanation and I have a doubt regarding the Swedan payment.

      Actually I have a requirement to add the same condition as if the amount is greater than 150000 SEK when making payment abroad a unique code should populate in regulatory reporting. Can you please help me what all the details I have to enter in the regulatory reporting. In your blog you have only mentioned about the number as 101 but what condition I have to give in this case in payment format tree.


      Thanks and Regards

      Gokul Suresh