SAP BLOG DME EFT implementation

SAP Blog

Kayıtlı Üye
Katılım
22 Ara 2017
Mesajlar
1,925
Tepki puanı
7
Puanları
6
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:

Prerequisites:


31-2.png


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

15-20.png


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.

18-16.png


Ignore all the warnings issued while copying the format:

19-14.png


Select ‘copy all’

20-12.png


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

21-10.png


22-9.png


  • 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.

23-6.png


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

24-5.png


  • Execute transaction code OBPM2

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


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.

26-4.png


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

27-4.png


  • Execute transaction code OBPM4:

Create a variant for the house bank as shown below:

28-4.png


End to end functionality:

29-3.png




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

Detail

Batch trailer

File trailer

Leveraging DME Engine:

Execute transaction code DMEE:

32-1.png


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.

33-1.png


  • 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
  3. FPAYHX

35.png


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.

36.png


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

37.png


understanding nodes in DMEE:

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

38.png


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.

39.png


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:

40.png


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

41.png


42.png


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.

43.png




44.png


45.png


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”

42.png


46.png


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.

47.png


I have used the below condition:

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

48.png


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

49.png


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

50-1.png




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:

51.png


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:

52.png


53.png


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.

Okumaya devam et...
 
Üst