Skip to Content
Technical Articles
Author's profile photo Jarna Hemnani

DME EFT implementation

EFT payments are common payment methods for any company. EFT stands for Electronic Fund Transfer. These are commonly used for domestic payments.

EFT files are generated by executing the Automatic Payment Program. These files are generated as .dat or .txt files. These files are downloaded in directory, encrypted and sent to the bank via MIM job. The bank decrypts the file, reads and sends back bank reconciliation file.

DMEE(Data medium Exchange Engine) is used to generate EFT payment files in the format specified by the bank. This blog will cover the implementation of EFT format for multiple currencies using DMEE.


Getting started with DME:


How to create a DME tree?

The biggest challenge here is to choose an appropriate tree for the format and customize the same. Below are some tips and tricks which can be used for choosing an appropriate tree:

  • If you are using country-specific format, choose a tree for a particular country from standard trees.
  • Configure the standard tree in FBZP.
  • Execute a payment run and generate the file with the standard tree.
  • Compare the output with the format specified by the bank.
  • If this format is close to what is specified by the bank. You can go ahead and copy the same tree to generate the file and tweak it as per requirements.
  • No standard tree can fulfill all the requirements of the bank, there will still be changes in mapping and levels which we shall discuss in the later section.


How to copy a standard format?

Execute transaction code OBPM1:

SAP delivers standard structures which can be copied and customized as per the format specified by the bank. Transaction OBPM1 allows to copy a standard tree to ‘Z’ tree and use the same. Customizing standard tree is dangerous. Below is the screenprint from transaction code OBPM1

Give an appropriate name to the tree and change description appropriately.

  • Make sure the documentation module is not changed while copying
  • Use appropriate format output
  • Choose levels at which you wish to divide outputs for the file.
  • Make sure mapping using DMEE engine is selected. If this box is not selected, you may not be able to customize the format using the DME engine.

Ignore all the warnings issued while copying the format:

Select ‘copy all’

Do not make any changes while copying the format. Just ignore warnings. These are harmless warnings:

  • Execute transaction code DMEE

In this transaction, we create the copied structure again to use it for customizing using DME engine. Click on the copy.

Give the target name of the tree and copy and save. Make sure tree type is PAYM.

  • Execute transaction code OBPM2

Assign note to payee in this transaction. Mostly used for ACH payments. This is not required for EFT though.

Create a note to the payee as per requirements. Your ABAPer can create FM for customized requirements.

  • Execute transaction code OBPM3

There might be instances when your format is as expected but not displayed properly or not readable, hence you might want to assign a code to the format so that it is downloaded and is readable.

Select the code if your output format is displayed in a format other than expected.

  • Execute transaction code OBPM4:

Create a variant for the house bank as shown below:

End to end functionality:


Understand EFT bank formats:

I will talk about the most common formats for EFT since every bank will have their own specific format. More or less below is how your bank format for EFT will be:

  • Usually, EFT format will be 80-byte file layout.

The file format will comprise of:

File header

Batch header


Batch trailer

File trailer

Leveraging DME Engine:

Execute transaction code DMEE:

Click on display/change in above screen.

The tree with DME engine opens up. here you have few controls. we will discuss same below:

  • File data- this controls how the data in file will appear. You can define your special characters and control if they can be allowed or ignored. Most of the banks fail files with special characters.

  • sort/key fields- This is the beauty of DME Engine. It gives you flexibility to sort fields as you wish.

Please note: DMEE is based on structures- these structures have fields. these fields are then updated in REGUH table once payment is made.

structures in DME Engine:

  1. FPAH
  2. FPAYP

Levels are the level at which you want the data to appear. For example header data with record type 1; this has to be at level 1. Header data should not be repeated in the file.

Format attributes  gives you the option for attaching sap script for correspondence to the nodes of the dme tree.

understanding nodes in DMEE:

There are several nodes available with different functionality to achieve the desired format.

Segment- Segment is a record type in the file. Each segment has to have a composite or an element.

Segment group- groups segments/elements under one head

composite- mostly used when one condition is applied to more than one element. this group’s all such elements

Element- This is the field in the target file. This has a mapping for the data that will be in the target file.

Technical node- The value is not output in the target file, this stores values for other nodes.

Atom- create an atom under element to have more than one mapping rule for one element.

Reference ID of the node- contains the reference of nodes. Assign unique reference id to each node when you create it

Reference to other nodes- this will refer to other nodes.

Mapping using DMEE:

Below are the properties of the tree I have copied. I have copied the standard 005 tree to ZZ005.

You can have version management, There will be changes on and off which you will have to do. You can keep versions of your structure. You can also download the structure and keep it with you for reference. We will discuss that later.

for example, my bank format says “header record is at level 1 which is a mandatory record and must have value as “5” every time. This means I can have a constant value for this element. Below is how you can map for this example:

Note in below screen print, Header record is a segment, this segment has several elements under it.

Mapping procedures:

  • constant- Use when the value in the target file is not going to change at all and a fixed value is expected.
  • Structure field- Use when a value is expected from a structure- FPAYH, FPAYP, FPAYHX. for instance, you expect beneficiary bank details.
  • Reference to tree node- Use reference ID to assign the reference to tree node. This is a reference to another node in the same tree.
  • Exit module- Use this when you want to have a custom value in target file which is not directly available in structures.
  • Own mapping (atoms)- Use when you have multiple mapping procedures for the same atom.

Below is how payment structures look like. choose the appropriate field as per your bank format.


I want record type for batch header record to appear as 1 every time a file is generated. Hence my mapping rule is constant and my value in constant is “1”

Below is how you can use the same structure for multiple currencies. You can assign only one payment format for one payment method. Hence, Below is the option to use conditions in case of multiple currencies.

If you want the value to populate in case of xyz currency, below is the argument.

In the below scenario, I have 2 originator numbers one for USD currency and one for CAD currency. I have created 2 elements as shown below. My originator numbers are constant and change only as per currency.

I have used the below condition:

If FPAYH-WAERS is a structure field; value is ‘CAD’, the argument is constant.

My condition for when I want value only in case if my currency is USD

Using source offset:

My branch transit number is ZBNKL from FPAYH. My bank wants this value to be only 5 characters and the actual value is 9 characters. Bank wants only the last 5 characters as branch transit number and does not want the first 4 characters in the target file. Below is how the mapping procedure will be:

  1. My source offset is 4
  2. attributes of this node will be source structure
  3. the length will be 5


Using aggregation mapping

Aggregation is used to inform the bank of the total amount paid in the file. The total number of records in the file at the batch level and file level. Below is how you can use aggregation.

for example; I want to display the total number of records in the file at the file level, this will be in trailer record, I will use aggregation mapping procedure as follows:

I have given a reference ID in record type node to count the number of entries for a particular record type. Below is how you can do this:

Wrap up

I have covered EFT file format and mapping procedures to achieve the format using DME Engine. It is difficult to cover everything in one blog, hence below is the link to ACH IAT format. I will soon be publishing a more detailed blog on Wire formats to generate xml files using DMEE with multiple currencies.

Happy SAPing.

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Carlos del Bosque
      Carlos del Bosque

      HI Jarna Hemnani

      Very good tutorial, congratulations.

      Question, any idea  how to generate CPA 005 file  with vendor payment per line,  as you can see in example, SAP standard 005 create single line for all payments

      thanks again for tuturial

      as is



      to be


      Author's profile photo Preethi Agarwal
      Preethi Agarwal

      Are you able to achive this ? I have same requirement .

      Author's profile photo Kalana Gunasekera
      Kalana Gunasekera

      Hi Jarna,

      Thanks for the documentation. Since some banks require a transmission header prior to the message header have you had experience appending a transmission header prior to the message header via the DMEE itself?

      Author's profile photo Jarna Hemnani
      Jarna Hemnani
      Blog Post Author

      Hi Gunasekera,

      Sincere apologies for delay on the reply.

      Yes you can create a header which is usually called data pdu and is used for transmission to swift or any other interface used prior to sending file to the bank. I will include this detail in my next blog on dme. The best practice is  to create elements in DME structure itself prior to group header portion which will be called as data pdu. This data will be read by swift or interface through which you intend to osend the bank file. This interface will acknowledge the receipt of file as acceptance or rejection. once the file is accepted by interface it will push the file to bank.

      Hope this answers your question.



      Author's profile photo Preethi Agarwal
      Preethi Agarwal

      Have you created any Blog on XML CGI format for wire and ACH format .

      Author's profile photo Jarna Hemnani
      Jarna Hemnani
      Blog Post Author

      Hi Preethi,


      I am creating one. its in progress. will share the link to the blog very soon.




      Author's profile photo Rajiv Shukla
      Rajiv Shukla

      Very nice and Good tutorial...! Keep it up Good Work....!

      Author's profile photo Deena Dayakar Babu Karnati
      Deena Dayakar Babu Karnati

      Thanks Jarna..Very useful

      Author's profile photo Marie Mills
      Marie Mills

      Great blog Jarna,

      I am struggling with the CPA005 Canadian format. I am having the problem of the detail lines type "C" coming out with a single string of all the individual payments.

      My file should have 4 separate C detail line items, but the file has only one C record with all  details in one string.


      Thanks for your  help,  Marie

      Author's profile photo Jarna Hemnani
      Jarna Hemnani
      Blog Post Author

      Hi Marie,


      Below is what you can do to solve the problem:

      1. check sorting on the DMEE structure. it is on top of the DMEE structure. Here you specify what is repeated and what's not. Basically its the level of that field on the file.
      2. check obpm3 configuration
      3. I believe you have copied standard structure to your Z structure, in your Z structure, check your constant value for payment transaction. Also remove any bad condition on the payment transaction field where you are getting "C" with every line.

      More or less this will definitely solve your issue, if you are still facing the issue, feel free to connect with me. Also a screen print of error will be more helpful to guide further.