Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
1 Sanjay Babel
Configuration of DME Payment Files in SAP R3
Introduction
This paper attempts to provide simple Configuration tips while defining DME (Data Medium
Exchange) Payment file in R3.
Requirement
Of late most of the organisations send an Electronic Payment File to Banks and Financial
Institutions which contains all the Payment Details. The Banks and Financial Institutions define
their own file formats and accept the files from their clients in the same format. There is no standard
format universally used by the Banking organisations.
Hence it is becomes imperative for the bank customers to design a file in the same format as
acceptable to the bank.
Solution Overview in R3
In R3 there is a simple tool Data Medium Exchange Engine which enables you to define a file
format that is acceptable to banks. This tool does not require any ABAP knowledge.
2 Sanjay Babel
Configuration of DME Payment Files in SAP R3
Click DME Engine . You will reach the screen of format tree creation.
Pls. note that the Payment Medium Format Name created in Step1 above should be identical to the
DME Format Tree Name.
3 Sanjay Babel
Configuration of DME Payment Files in SAP R3
The format tree creation screen is divided into 3 parts as shown below
1. Tree Structure
2. Details: This place the attributes of the nodes are specified
3. Source Fields: This place contains the source fields from where the data is extracted and
mapped to the various nodes
Details
Tree Structure
Source fields
Tree Structure
In this section, the format tree is defined by inserting nodes and specifying their attributes in the
Details view in line with the file format requirements.
The format tree structure has two parts
1. Header
2. Nodes
Header
Nodes
4 Sanjay Babel
Configuration of DME Payment Files in SAP R3
Header: The Header Node is generated automatically when a new format tree is created. On the
right hand side in Details you specify all the attributes that are applicable to the entire file. This
consists the following:
I. Administrative Data: In this section the a short description of the file format is maintained. In
II. Format Attributes: This screen is divided in three sections as shown below
The field type 1 is used when you intend to have fixed field positions in which case the
field is valid even if it is blank. Field type 2 is used when you separate 2 fields by some
delimiter and the field position depends on whether other fields are filled up
The delimiters like , or / or : or _ etc can be defined here as delimiters between segment
groups or segments or composites
III. Levels: The number if levels required in the file are defined here.. Also a Repetition limit can be
specified here for each level. The number here restricts the output of that particular level in the
media file.
In our example it is unto 3 levels as seen in the file requirement and Repetition can be maximum
5 Sanjay Babel
Configuration of DME Payment Files in SAP R3
IV. Sort/Key fields: In this section, you can specify how the fields are sorted out at a specific level in
the file. One can specify Company Code or Currency or Account as the fields according to which
the file data shall be sorted. This is done by specifying the source field in a proper sequence.
In our example we sort Level 1 first Company Code and then by Bank Account Number. Level 2
is sorted by Payee and Level 3 by Document Number. If an accompanying sheet is also to be
printed, one has to check the key fields by which subtotals are required in the accompanying
sheet.
6 Sanjay Babel
Configuration of DME Payment Files in SAP R3
V. File Data: If required the segments can separated by Carriage feed or line feed. This is specified in
the File Data tab.
Nodes
In the format tree there are 6 different nodes that can be defined. They are as follows:
S.No. Node Description Where used
1 Segment Group To group segments
2 Segment To represent record in the file
3 Composite To group elements
4 Element To represent a target field in the DME file
5 Atom To describe the link from the file definition to
the internal R/3 structures
6 Technical Node To store some value (by reference to this node)
but not a target field in the output file
In our example, we will create a Segment Group which will have two segments viz. one for
payment details (Header) and other for total amount (Total). Within Header we will have another
segment (Business Partner) so as to group payment line items for a single payee together and then
another segment (Payment record) under Business Partner segment where all the actual Payment
records will be output. The screenshot below explains this
7 Sanjay Babel
Configuration of DME Payment Files in SAP R3
Once the nodes are created a detailed view is automatically generated on the right hand side with
the tabs Attributes, Source, Aggregation, Conditions and Comment. These tabs describes
the entire node.
Attributes
8 Sanjay Babel
Configuration of DME Payment Files in SAP R3
Constant: If the field has some constant value, this field is checked and the value is entered in the
Constant field of the Source tab as shown here
Structure field: If the field is to be extracted from R3, this field is checked and the source field is
specified in the Source tab. Normally in Payment files we source the fields from FPAYH,
FPAYP and FPAYHX structures. The screen shot below explains it further.
The user can pick up the source field on clicking this icon appearing on the right side of Field
Name
Reference to tree node: If the value of this field is to be derived with reference to some other node
in this tree structure, then this field is checked and that other field Reference ID is specified in the
Source tab
9 Sanjay Babel
Configuration of DME Payment Files in SAP R3
Aggregation: If a total of values of some other field is required, then this field is checked and the
Reference ID of that other field is specified in the Aggregation tab
Exit Module: If the value of this field is to be derived by using some exit module, this field is
checked and the name of the Exit Module is specified in the Exit Function section of the Source
tab
Own Mapping (atoms): If the value of a field is to sourced from more than one R3 fields then this
field should be checked, and atoms are created each of them having been mapped properly. E.g. the
field should have Date and time concatenated, then two atoms are created under an element. The
element is checked for Own Mapping (atoms). The screen shot below show this properly.
System date has the following Attributes and source tab information
10 Sanjay Babel
Configuration of DME Payment Files in SAP R3
Source
Note: This field can also be used if the value of a certain field in the file is derived with some
Conditions. In such a case, the conditions are specified in the Conditions tab
11 Sanjay Babel
Configuration of DME Payment Files in SAP R3
In the bank file format in this example, the mapping procedure required is as follows:
S. Leve Field Mapping Procedure Source tab (S)/ Aggregation tab
N l (A)/ Conditions tab (C)
o.
1 Header Record Segment Node
1 1 Record ID Constant (S) Value of Constant = HD
2 1 Sender Name - Payer Structure field (S) Structure = FPAYHX and Field
= AUST1
3 1 Account Number - Payer Structure field (S) Structure = FPAYHX and Field
= UBKNT
4 1 Bank ID - Payer Structure field (S) Structure = FPAYHX and Field
= UBNKL
5 1 Creation Date Structure field (S) Structure = SYST and Field =
DATL0
2 Business Partner Segment Node
6 2 Record ID of Business Partner Constant (S) Value of Constant = BP
7 2 Business Partner Structure field (S) Structure = FPAYH and Field =
ZNME1
8 2 Business Partners Account Structure field (S) Structure = FPAYH and Field =
Number ZBNKN
9 2 Business Partners Bank ID Structure field (S) Structure = FPAYH and Field =
ZBNKL
10 2 Business Partners Bank Name Structure field (S) Structure = FPAYH and Field =
ZBNKA
3 Payment Record Segment Node Reference ID in
Attributes=COUNT
11 3 Payment Record ID Constant (S) Value of Constant = PY
12 3 Payment Sequential Number Reference to tree Reference Node ID = COUNT
node Attribute = 3 (Counter reading)
13 3 Payment Amount Structure field (S) Structure = FPAYH and Field =
RWBTR
Reference ID in Attributes
tab=AMOUNT
14 3 Payment Currency Structure field (S) Structure = FPAYH and Field =
WAERS
15 3 Euro Indicator Own mapping
(atoms)
15 Euro (Yes) Constant (S) Value of Constant = Y with
a Condition (C) WAERS value=EUR
15 Euro (No) Constant (S) Value of Constant = N with
b Condition (C) WAERS value <>
EUR
1 Total Segment Node
16 1 Footer Record ID Constant (S) Value of Constant = SU
17 1 Sum of Payment Aggregation (A) of reference ID = AMOUNT
(Field 13 in our example)
12 Sanjay Babel
Configuration of DME Payment Files in SAP R3
All the above fields settings in the tree structure are as shown in the screen shots below:
Header Record
13 Sanjay Babel
Configuration of DME Payment Files in SAP R3
14 Sanjay Babel
Configuration of DME Payment Files in SAP R3
15 Sanjay Babel
Configuration of DME Payment Files in SAP R3
The fields Bank ID and Creation Date are similarly mapped in the tree structure
16 Sanjay Babel
Configuration of DME Payment Files in SAP R3
The fields Business Partner, Account Number, Bank ID, Bank Name, are mapped to the
structure fields as mentioned in the Mapping table above
The Payment Record segment is created at Level 3 under the Business Partner segment
There is a requirement to count the number of Payment records in the field Sequential Number in
this segment. This would be achieved by setting a counter at that node with reference to this
segment Payment Record. Hence this segment has been given a Reference ID COUNT. This is
marked in the red box above.
The node Sequential Number is mapped to Reference to Tree Node to Segment Payment
Record and the counter is set to 3 in Attributes which serves a counter.
17 Sanjay Babel
Configuration of DME Payment Files in SAP R3
There is a need in the file to specify which are EUR payments and which are not. This can be
achieved by creating a Element Node and two atom nodes just below it. Also there will be a
18 Sanjay Babel
Configuration of DME Payment Files in SAP R3
condition tied up to these nodes which will check if the Payment record has got EUR currency. If
it has EUR the field will output Y or else N. The screen shot below further explains this
The Euro Indicator Node
Atom Node EURO Yes has a constant Y mapped to it and a Condition to check the currency is
attached in the Conditions tab. The screen shots of all the three tabs are seen below
Attributes:
19 Sanjay Babel
Configuration of DME Payment Files in SAP R3
Source:
Conditions:
Similarly Atom Node EURO No has a constant N mapped to it and a Condition to check the
currency is attached in the Conditions tab. The screen shots of all the three tabs are seen below
Attributes:
20 Sanjay Babel
Configuration of DME Payment Files in SAP R3
Source:
Conditions:
Next the Total segment is created at Level 1, since this would be output only once in the file
21 Sanjay Babel
Configuration of DME Payment Files in SAP R3
There is a requirement to output the total amount of all the Payment records in the file. This is
achieved in the last node. This node is mapped to Aggregation procedure and the Reference node
for summing up used is Node Payment Amount with Reference ID AMOUNT.
Aggregation tab
22 Sanjay Babel
Configuration of DME Payment Files in SAP R3
Checks
After the tree is maintained there is a manual check for checking the correctness of the file. This can
be carried out anytime while defining the tree. The Manual check may output a log of message
which are either errors or warnings or information. These errors should be solved before activating
the format tree.
23 Sanjay Babel
Configuration of DME Payment Files in SAP R3
Click Enter
The system gives a message The Print job is scheduled
24 Sanjay Babel
Configuration of DME Payment Files in SAP R3
This takes you to the Data Medium Overview. Here you can download the file generated or view it
or delete it if required.
Conclusion
The Data Medium Exchange Engine (DMEE) helps to define file formats that meet the
requirements of your financial institution.
This Paper explains the steps to be followed while creation of a DME Payment File.With no ABAP
programming knowledge required, this tool enables you to flexibly define new formats and to
efficiently modify existing ones.
25 Sanjay Babel