You are on page 1of 63

WHAT IS DME IN SAP?

| END TO END
PROCESS AND TESTING | SAP
FINANCIAL ACCOUNTING
MARCH 1, 2020
DME stands for Data Medium Exchange and you can associate it with SAP Payments.
For this post I will use Belgium related scenarios to help you visualize.

This post assumes that you have already created the DME tree and it is ready for
testing. If you need guidance for the creation of the actual DME tree, it will be covered in
another blog post.

It more or less has the same cycle, but you can expect slight differences (i.e file format)
in other countries or SAP systems. Either way, you can read through this post to
understand the purpose of DME.

Overview
 Process Flow
 How does DME relate to SAP Payments?
 SAP DME Configuration (High Level and Summary)
 Testing Proper (DME Only – Quick)
 How do I activate my tree? (Additional Help)
 Testing Proper (Detailed)
 Testing Steps Summary
 Additional Information / Tips

Process Flow
1. Accounting Documents exist that need to be paid through Payment Run (F110)
 Let us consider Vendor items due for payment.
2. Payment Run is executed (Proposal and Actual Run) which will generate a
payment medium file or output.
 Usually, payment medium file is generated for the Actual Run and NOT
the Proposal to prevent risky or erroneous scenarios.
 In this example, our payment medium file or output will be an XML file
(pink box).
3. This XML file will be provided to the bank or it will be uploaded to an online
banking system or portal.
 A good example would be Isabel since it has the capability to carry out
multiple transactions for several banks in one portal.
 .XML files usually have the payment information indicated.
 NOTE: This is where the payment medium output checking stops but you
may proceed up until the bank statement post processing.

4. When transactions have completed, the bank sends an Electronic Bank


Statement (EBS). In this example, Belgium banks send CODA or .COD files (white
box) with the corresponding payment details / transactions.

5. This .COD file or the Belgium Bank Statement is then uploaded to SAP through


FEBC (program RFEBBE00) where it will be “consumed” and converted to Multicash
Format.
 If the file is interpreted and converted to Multicash Format, you will see the
results in FEBAN where you can do bank statement post processing such as
clearing etc.
 If conditions are met upon file analysis, documents would be created.
Here you can view if the necessary amounts are posted to the intermediary bank
GL accounts etc.

6. If SAP is able to see a fully met condition that triggers an Interpretation


Algorithm, it will follow the configured settings accordingly.
 For example: if conditions are met for Interpretation Algorithm 19
(Reference no. DME management), it will proceed with the “auto clearing” setup.

You may refer to the full image below where the green circle signifies the starting point
while the red circle signifies the end point.

Purple signifies SAP


System, Blue signifies online banking, White signifies a file.
How does DME relate to SAP Payments?
From the process above, you can associate DME to the .XML file that generated as the
payment medium file. In the image below, I have colored it pink.

You may be wondering why the word DME was indicated in the 1 st box. The reason is
because DME is triggered by the payment run (F110) and the output is the .XML file.

DME Output =
Payment Medium Output ; In our example it is the generated .xml file.
Formally speaking, DME creates a file that contains payment details and serves
as instructions to the bank. In our example, this was the .XML file.

In order to create the right file (that will be understood by the bank or online bank portal),
it needs to be setup in SAP.

Note: that DME does not solely pertain to .XML files. You can also generate the
payment medium file as a flat file. It would also depend on the linked ABAP program that
creates these files. A custom program can be built to accommodate different formats
that are not doable in standard SAP.

SAP DME Configuration (High Level and Summary)


 Create Payment Medium Formats (OBPM1)
 Create Your DME Format Tree using the Data Medium Exchange Engine
(DMEE)
 Link Payment Method to the Payment Medium Format (FBZP)
 Maintain Payment Medium Selection Variants / Assign Payment Medium Format
to the house banks concerned (OBPM4)

Testing Proper (DME Only – Quick)


If you want to do a quick test on your DME Tree, you can do so via DMEE transaction
code. Note that this will only show the sample output. It can be useful but if you want a
realistic scenario you can follow the steps provided below in Testing Proper (Detailed).
 DMEE Enter your Tree Type and Format Tree then click on the Test Active
Version Button (highlighted in red).

 You will be shown the screen below. Click on the Test Button. Once clicked, a
new window will show you the .xml sample output. There you can do a check of the
.xml tags included and the details as well.

NOTE: If you want to be sure, it is advisable that you do an actual test payment run to
see the realistic populated values. This can give you peace of mind on the tree output.

How do I activate my DME Tree? (Additional Help)


 In the DEV environment, go to transaction code DMEE and enter the Tree Type
and Format Tree. Then click on the Change button.

 You should see a Wand Button (Activate). Click on it to activate your tree.
 IMPORTANT: It is important to ensure that you save your DME Tree in a
transport. It is equally important to ensure that the ACTIVATION status is saved in the
transport as well. If you are making a change to an already existing DME Tree, be
sure to create a copy and/or backup just in case.
 You will know it is your version by checking on the Last Changed By logs:

 If there are other versions maintained, you can switch, compare, and do some
checking by clicking on Utilities > Versions > Version Management

Testing Proper (Detailed)


This will help you create test data and perform validations. It helps to have data you can
reference from production or you can also find applicable test data and create from
reference (if applicable).

 FB01 Create Accounting Document for Payment Run


 Example: Posting Key 25 Outgoing Payment Vendor Number and Posting
Key 35 Incoming Payment. You can use the proper posting keys set up for your
scenario / SAP system.
 If you have a reference document (or a good document existing in the test
system) you can Post With Reference and update the values according to your
need.
 F110 Create Payment Run and narrow down data by specifying parameters
such as vendor number, company code, docs entered up to, payment methods, and
even document number (in free selection tab).
 When referencing from production, be sure to copy the entries in printout /
data medium tab. If it is blank, then leave it blank.
 I will create a separate post on detailed F110 inputs and testing.
 Execute Payment Proposal (no need for payment medium if you don’t
need). After this you can review the pulled documents and check if there are errors.
 Execute Payment Run (IMPORTANT: be sure to tick the Create
Payment Medium checkbox)
 If successful, you should see a green square light with details on Posting
Orders.
IMPORTANT: Do not forget to tick the Create Payment Medium checkbox

Posting orders generated and


completed 2 because I created 2 test documents due for payment. The result also
corresponds to the parameters set in F110.

 AL11 Check on the generated .XML file. If you have access to the file
repository, you can directly check there. If not, download the .XML file from AL11 via
CG3Y (or refer to this post) to double check on entries.
 Check on your payment medium output setup. If it is configured to save
the payment medium in a secured folder or directory, you will find it there. Logs can
be seen in the payment run of F110.
 Refer to the purple highlight to know what the filename is and where it was
saved.
 Refer to the yellow highlight to check on the spool no. (if needed) through
SP01.

 If you do not have an external .COD file generator you can pull any available
.COD file from production and manipulate the data carefully to match the details from
payment run.
 If the .COD file can be provided from someone else, you can utilize it.
 FEBC Upload the test .COD file to SAP.
 If you encounter errors here it would most likely be the result of formatting
issues.
 FEBAN Double check results and perform post processing.
 This is where you check the populated fields and auto-clearing (if
applicable)

Testing Steps Summary


 FB01
 F110
 AL11 (CG3Y to download if needed)
 FEBC
 FEBAN

1. FB01 Create Accounting Document for Payment Run


2. F110 Create Payment Run and narrow down data by specifying parameters
such as vendor number, company code, docs entered up to, payment methods, and
even document number (in free selection tab).
3. AL11 Check on the generated .XML file. If you have access to the file
repository, you can directly check there. If not, download the .XML file from AL11 via
CG3Y (or refer to this post) to double check on entries.
4. If you do not have an external .COD file generator you can pull any available
.COD file from production and manipulate the data carefully to match the details from
payment run.
5. FEBC Upload the test .COD file to SAP.
6. FEBAN Double check results and perform post processing.

Additional Information / Tips


It is understood that the end to end testing in SAP will help you validate your work (aside
from business user confirmation). I personally tend to do an extra step outside of SAP.
Allow me to explain why I do this.

Extra Step (Additional Test)

Ultimately, we are dealing with payments and bank related files. I mentioned that it is
highly advisable to do a “penny test” or a “euro cent test” in production with the help of
the concerned business user in prior to doing a bulk load of payments.

This small production test helps give the assurance that the changes are indeed working
as expected. If something goes wrong, it will be seen in the penny / euro cent test and
you would have avoided messing up bulk transactions in production.

As an added measure, I make use of an online tool called xml validator. IMPORTANT: I


use this for Belgium related validations and SEPA payments. I am sharing this as
an optional extra step for you.

Once I have generated my payment medium output (xml file) in the test environment, I
head over to the online tool and upload the xml there for checking. Refer to the image
below for what the tool looks like.
Select the file and
click on the Confirm File Button.
If the file is validated successfully, you will see green results (as seen in the image
below). You also have the following options in line with the uploaded .xml file:

 Download statement of account (CAMT)


 View the Processed Payment Information
 View the content of the uploaded file. There will be a black screen at the right
side of the result page showing the .xml file content. I have not included it in the
screenshot for confidentiality purposes.

Successful Validation
The screens above are for SEPA / Belgium related payments. The online tool I shared is
utilized specifically for that kind of validation. You might have noticed that it was able to
understand the payment overview in the file.

If you want to do other checks that are not covered by this tool, you can try searching for
others or using the usual xml validation tool found online but keep in mind that it more or
less checks the syntax and not necessarily the validity of “payment transaction”.

I hope this helps. Good luck! 

This blog post has a YouTube version! Click here to see the video.

 Coffee Corner: I remember tinkering around DME Trees for the first time. It took
me hours to understand the structure and do some urgent comparisons. I definitely
found it difficult to compare several versions which is why I included the XML download
and Version Management tip. Did you have difficulties in DME Trees too?
SAP DATA MEDIUM EXCHANGE (DME) –
HOW TO MODIFY DME TREE | HOW TO
GENERATE DME FILE
MARCH 9, 2020BY TECHLOREAN

This post will provide a step by step scenario of making a minor change in the SAP DME
Tree and the testing that follows thereafter.

In this scenario, I will update and existing DME Tree. Only 1 attribute will be changed to
reflect a Mapping Procedure of Structure instead of Exit Module.

If you want to understand the purpose and full end to end process of the DME, you can
go to this post.

Overview
 Before Changes
 Change Proper
 Post Change Testing – How to Generate DME File
 Additional Information

Before Changes
Before making any changes whatsoever to the DME Tree it is important to create a
backup copy of the current active version. This means that you have something to go
back to in case there are issues with your modifications.

 Go to Transaction Code DMEE
 Enter the Tree Type and Format Tree Concerned
 Click on Format Tree > Download XML file
 Generated XML file will be your backup copy

NOTE: In case you need to restore the DME tree to the backup, you can repeat the
steps but select Upload XML file instead. If the XML file is stored on your laptop, select
location as “P” Presentation Server then select the backup file.
Change Proper
1. Go to Transaction Code DMEE and Enter the Tree Type and Format Tree to be
updated.

2. Take note of the DMEE Tree: Properties such as the Last Changed By USERID,
DATE, and, TIME.

This is important because these details (highlighted in dark pink) will be your basis to
check if the DME Tree is updated.

3. Go to or Locate the node you need to change. Notice how the current values are
the following (highlighted in red):

 Length: Blank
 Mapping Procedure: Exit module
 Exit Function: DMEE_EXIT
4. Now we will do our change proper by updating the Mapping Procedure from
Exit Module to Structure. I changed the following (highlighted in black):

 Length
 Mapping Procedure is now Structure Field

 Source Tab > Source Offset


 Source Tab > Structure
 Source Tab > Field Name
 Exit Function: REMOVED
Structure: FPAYHX Field Name: RENUM
See Additional Information section below to get insight on why we used the mentioned
structure and field name.

5. As soon as I have done my changes, I will click on the Save Button. This will
prompt a Workbench Transport Request. Simply fill up the details to create your
Transport.

6. If I am sure with the changes, I will now click on the Activate Tree Button (blue
wand) and make sure that action is saved in the transport request I created earlier.

7. By Activating the Tree, you should be prompted with a transport request


selection then you will receive the notification “Format Tree Activated”.

Note: Save the tree activation in the SAME transport.


8. You can double check the changes by Selecting the Display option on
Transaction Code DMEE. You will be prompted with a question “Which version
would you like to display”. Select Active Version.

9. To ensure that you have activated the tree and changes have been saved, check
the DMEE Tree: Properties. This would have been updated to the most recent change.
In the screenshot below, the color updated from dark pink to light pink (signifying the
change).

NOTE: You can always switch your DME tree view by going to Utilities > Versions >
Version Management and select the version you want to check.

Post Change Testing – How to Generate DME File


Now we will generate a “realistic” DME file from the updates we have done. I say
“realistic” because we can always do a quick test in TCode DMEE to check the XML
structure.

In my experience, that is not enough. That approach only provides a high level test of
the output. It is always best to do a payment run to see the values that will be populated
in the payment medium output.

Remember that DME File = Payment Medium Output.


The steps below assumes we are in the test environment and the transport has been
moved to the QA environment.

1. First, you need to go to TCode FB01 to create a document that is due for
payment. Example: Posting Key 25 Outgoing Payment Vendor Number and Posting
Key 35 Incoming Payment. You can use the proper posting keys set up for your scenario
/ SAP system.

2. Second, you will go to TCode F110 to do a payment run. Enter a Run Date and
Payment Identification.

3. Go to the Parameter tab and fill in the details (in line with the test document you
created). The goal is to pull the test document (that is due for payment) through
the parameters. Make sure to specify the right payment method that triggers the DME
setup.
4. I tend to leave the Free Selection Tab blank if I am sure that it will only pull the test
document just created. If you want to narrow down your search, you can add some
restrictions.

5. For the Additional Log Tab, I tick all the relevant checkboxes I prefer to show up
on the payment run log.

6. I also leave the Printout / Data Medium Tab blank since the current
configuration in SAP will work just fine without it. It will still trigger the DME payment
medium format accurately.

NOTE: At the end of the day, it is best to pattern a realistic scenario in production. So, if
you need to specify a printout in your test, feel free to do so.

7. Finally, you can save the payment run parameter details.


8. This time we will do a Payment Proposal Run by clicking on the “Proposal”
Button. At this point, you do not need to tick the create payment medium checkbox.

9. Once done, you can check on the proposal details by clicking on the Proposal
Button (with eyeglasses icon). In the screenshot below you will notice that it was able
to successfully pull the test document and the corresponding details.
10. This time we will finally do a Payment Run by clicking on the “Payment Run”
Button. At this point, you NEED to tick the create payment medium checkbox. By
doing this step, you will generate the DME file.

11. If payment run goes well, you will see the posting order results below. You can
click on the “Payment” button to review the details.

In the screenshot below you will notice that the vendor, company code, payment
method, and generated document number details are included in the log.
The format used for payment medium is also included (highlighted in dark pink). You can
also find the location of where the generated DME file (payment medium output) was
saved (highlighted in light purple).

12. Depending on the setup, the DME file can go to a designated secured folder or
you can always check through transaction code AL11. In my case, I can directly go
to the secured folder to check on the generated file. I can also do a quick check on the
generated xml details by viewing the file.

Additional Information
How do I know which Structure and Field to use for SAP DME Tree?

Structure: FPAYHX Field Name: RENUM

In our example, we used Structure FPAYHX and Field Name RENUM. Basically, this
approach is telling the DME tree to pull a specific populated value (RENUM) from the
indicated structure (FPAYHX). In simple words: we want the DME file to include a
reference number from the payment run.

To help you visualize, let us first refer to Table REGUT with the field RENUM.

Enter the Company Code, Narrow down to exclude proposal run entries, Limit date (Run
On) based on testing

Notice how the Reference Number field name coincides with technical name RENUM.
To help you visualize the technical names easier, you can go to Extras > Change
Settings > Select Technical Name as Column Heading.

Extras > Change Settings

Select Technical Name as Column Heading


You should now see the technical names as headings and quickly check on the
Reference Number (RENUM). This is the reference number you can refer to for table
checking.

In line with what we found in Field RENUM, let us now go to TCode SE11. To search for
the corresponding Structure: Select Data Type then choose “Search for Structures”.

Data Type > Search for Structures

In the Find Structures window, enter “BFIBL_PAYM” package then click on the Check


Button. BFIBL_PAYM is the standard SAP ABAP Package for Payment Medium.

Package: BFIBL_PAYM
You should now see a list of available Structures for your review / analysis. Once you
have selected a Structure, double click on the row to see more details. In our
example, we used FPAYHX Structure to target the “Payment Medium: Prepared Data for
Payment”.

Double click on the selected Structure

You should eventually end up with the screen below. Notice how we can see the specific
component “RENUM” as the Reference Number. Thus, the utilization of FPAYHX-
RENUM.

What is the link of FPAYHX and Table REGUT?

To get a high level overview on how they relate to one another, you can always click on
the Where-Used Button (three-arrow box beside the activation wand) of Structure
FPAYHX. You can then try to locate Function
Module “FI_DME_ADMINDATA_FILL” and double click on it.
FPAYHX Where-Used List > FI_DME_ADMINDATA_FILL

After double clicking on the Function Module, you should see the code below. Notice
how there are instances of FPAYHX and REGUT. Both of these are related to DME
administration and the creation of the DME output / file. You can explore more at your
own pace by looking through the code if needed.

You can explore more at your own pace by looking through the code if needed.

I hope this helps. Good luck! 

 Coffee Corner: I remember tinkering around DME Trees for the first time. It took
me hours to understand the structure and do some urgent comparisons. I definitely
found it difficult to compare several versions which is why I included the XML download
and Version Management tip. Did you have difficulties in DME Trees too?
SAP DME NOTE TO
PAYEE FUNCTIONALITY
APRIL 30, 2020BY TECHLOREAN

SAP Note to Payee Functionality

DME or Data Medium Exchange goes hand in hand with SAP Payments. It is triggered
through payment run where you can expect a payment medium output. For example, by
form of an XML file etc.

If you are interested, you can refer to the SAP DME End to End Process and
Testing post. You can also check out the post on Modify and Generate SAP DME Tree
File where I included a sample scenario.

For this post, we will focus on the SAP DME Note to Payee functionality. In most cases,
the client may need the Note to Payee information to be part of your DME output. This
information is important because it can be part of a legal requirement and / or it simply
must be provided to the bank or payee.

Overview
 What is a Note to Payee?
 Configuration and Checklist
 Testing
 Note to Payee Output
 Additional Information
 Summary

What is a Note to Payee?


According to SAP Help, it is a field on a data medium containing information on paid line
items relevant for the business partner. The number and length of the note to payee
fields are defined in the payment medium format, whilst the content itself is defined in
the note to payee.

For me, you can simply think of it as a sticky note (or post-it) that is part of the payment
transaction. It contains the payment information for the concerned business partner /
vendor/ entity. In some cases, it may even contain a payment reference note.

At the end of the day, we want to be able to include those Note to Payee details
(according to the given requirements) and output those details as part of the DME or
payment medium output file.

You should note that (in general) there is no set or fixed format for Note to Payee details.
It will always depend on the request / requirements of the client.

Configuration and Checklist


The easiest or straightforward approach to including a Note to Payee in DME is to create
a Function Module (FM). Throughout my career, I have mostly encountered custom
function module enabled setups for Note to Payee functionality. This is most likely due to
the flexibility it can provide in terms of requirements. As such, we will focus or prioritize
that approach.

On a high-level overview, you can refer to the checklist or transaction code list below for
the Note to Payee setup in DME.

 OBPM1
 OBPM2
 FBZP
 DMEE

Let us go through each of these transaction codes.

OBPM1 Payment Medium Formats

Make sure there is a defined Payment Medium Format. If not, create one. Highlight the
concerned payment medium format that will be used for DME Note to Payee
functionality.
Select the Text Fields for Reference Information as highlighted below. Here you can
define the types of text fields for the reference information. Again, this information is
defined in the SAP Help document linked earlier.

SAP Help Document Screenshot

OBPM2 Note to Payee

You can directly go to transaction code OBPM2 or click on the Note to payee button
from OBPM1. It will direct you to the same screen below.

Create your Note to Payee entry (Example: “Z_NTP_FORMAT” masked in purple) and
enter the custom Note to Payee function module.
Input the function module

In our example we indicated “Z_DMEE_NOTETOPAYEE”. This function module should


be triggered or called during payment run or proposal run whenever the user selects the
“Create Payment Medium” checkbox.

Note: The results of triggering this function module should be stored in Table DFPAYHT
in SAP. You can double check some entries after payment run or proposal run below.
Multiple lines can be stored per payment run or proposal run. This basically covers the
layout portion of your Note to Payee.
If needed, this function module logic can cover the ruling “note to payee should not be
empty”.

After indicating the function module, double-click on “Default Note to Payee”. Here we
will define the actual content.

From the screenshot below, we see that there are several notification types (from 1 to 5)
for line number 1. The entries below are for example purposes.

The Note to payee text is declared in SAPscript format. You can refer to this SAP Help
Document on Using SAPscript Symbols or SAPscript Formatting Options.

You can also utilize the Preview Button to further check. We put 3 items below because
our maintenance in OBPM1 consists of 3 types only.
After clicking on the Check Button, you should see this type of output:

FBZP Customizing: Maintain Payment Program

After defining OBPM1 and OBPM2, you need to go to transaction code FBZP. Here you
will assign the note to payee to the specific payment method (on country level per
origin). This should trigger the configuration when you run the payment program or F110
with create payment medium checkbox selected.

In the scenario below, I selected the country and specific payment method. After
highlighting the row, double-click on “Note to Payee by Origin”.
Remember the purple highlighted masking? We declared the Note to Payee and named
it as Z_NTP_FORMAT. This time, we are linking it to the country and payment method
through FBZP.

Some of you may be wondering why there is no Origin specified. In the scenario below it
should cover FI-AP as the SAP system (and corresponding setup) focuses on F110 only.
The Note to Payee format is shared across origins.

If you need to distinguish or maintain the origins, you can refer to SAP Note 1977304 for
guidance. This SAP Note covers origins that distinguish between F110, F111, FI-AP
(vendor), FI-AR (customer), loan management, treasury management, in-house cash,
etc.

If you have executed some payment runs already, you should be able to find this origin
details in table REGUH. Our scenario will pull the details below where all consists of FI-
AP.

Again, you can click on the Note to payee button to go back to OBPM2 if needed.

As additional check, you can also go to FBZP > Payment Methods in Company Code
> Select the Company Code and Payment Method > Scroll Down to Payment
Advice Control area.
This setting is not applicable if you are using DME as seen in the information screen
(F1) but it could help to check on this in case needed.

DMEE DME Engine

Now we can go to transaction code DMEE to modify our DME Tree. This is the part
where we link the Note to Payee in DME. Enter the tree type and format tree concerned.

Here you need to consider that a separate function module should be created. Recall
that we created function module that focuses on the Note to Payee layout. Once
payment run or proposal run triggers the create payment medium checkbox, the details
will be stored in table DFPAYHT.

On the DMEE standpoint, the other (or second) function module should pull these values
from DFPAYHT table (corresponding to the specific payment run).

For a simpler explanation, think of this function module as an instruction to SAP to


please get all related payment proposal / run details from DFPAYHT and put all these
values as a one-liner in the DME Tree.

Please note that you are not directly accessing the table. Rather you are utilizing the
given FPAYH Structure. This means the code would most likely obtain information from
these structures instead of directly getting values from DFPAYHT.
The screenshot below shows the approach of linking the Function Module on the
preferred DME Node as an Exit Function. This type of approach considers the need for
flexibility. If standard or usual DMEE mapping options still does not meet the
requirements, the function module should help you with those requirements.

Here we created the function module Z_DMEE_EXIT_NTP and defined it in the DME


Tree as an Exit Function.

Alternatively (without the additional function module), you can also declare the
DMEE_PAYD structure and corresponding Field TEXT as several Atoms in the DME
Tree.
Recall the Node Legend in DMEE

In some cases, you may need to include additional details in the DME. You can also
utilize Structure FPAYHX and Field Name (REF**) like REF05 as mapping.

In the screenshot below, we used standard structure FPAYHX and Field Name REF05
as mapping.
Please do not forget the Conditions tab as needed:

For further visualization, we can see that the Structure FPAYHX has Component REF05
where we can freely define what is indicated. This is a screenshot from transaction code
SE11.

Before you can fully utilize them, these component types need to be declared in OBPM1
under Event Modules for Payment Medium Formats (specifically under Event 5). Here
you need to specify the custom function module you will be creating to accommodate the
additional information.

It is in the function module that you can mention what the REF** fields (user-defined /
additional info) will contain. For example, if you need REF05 to contain a FIK code (for
Denmark payments) or any other requirement, you can specify it in the FM.
Testing
As mentioned, the Note to Payee functionality changes will be triggered during a
payment run or payment proposal (F110) when the “create payment medium” checkbox
is selected upon execution.

This will be your main testing or validation proper. You can also refer to Modify and
Generate SAP DME Tree File where detailed steps of generating the DME file is shown.

Note to Payee Output


The screenshot below is an example of how the Note to Payee information is seen on a
DME / Payment Medium Output file in XML format. The tags used <Ref></Ref> will not
be the same for all cases as the requirement will differ depending on the scenario or
client. The same goes for the content.

Additional Information
Function Modules

Earlier we talked about needing two function modules. One to store payment details in
Table DFPAYHT and another to retrieve those values to be included in your DME tree.

The developer does not need to create this function module from scratch because SAP
has a standard template or sample as reference. The developer can copy this FM
sample as guidance.

You can view these function modules through transaction code SE37.


FI_PAYMEDIUM_SAMPLE_DETAILS

DMEE_EXIT_TEMPLATE_ABA

For alignment, the table below shows our example function modules and which standard
FM was used as reference.

Function Module based on scenario Standard SAP Sample / Template

Z_DMEE_NOTETOPAYEE (OBPM2) FI_PAYMEDIUM_SAMPLE_DETAILS

Z_DMEE_EXIT_NTP (OBPM1 and DMEE) DMEE_EXIT_TEMPLATE_ABA

Make sure that the exit function modules are defined in OBPM1 according to the type of
event.
Summary
 Note to Payee functionality can be considered as a legal requirement and / or
mandatory information for payment transactions.
 There is no set or fixed format for Note to Payee details. It depends on the
request / requirements of the client.
 You can test the DME output or Note to Payee functionality by doing a payment
run and selecting the create payment medium checkbox upon execution.
 In most cases, requirements that cannot be fulfilled by simple or standard DMEE
configuration will require the creation of function module/s for flexibility purposes.
 OBPM1 > OBPM2 > FBZP > DMEE

SAP DME TREE CONFIGURATION –


DMEE FOCUSED
(SIMPLE EXPLANATION)
MAY 6, 2020BY TECHLOREAN

SAP DME Tree


Configuration – DMEE Focused (Simple Explanation)
In this post, we will focus on transaction code DMEE to understand how to
configure the DME tree and align it with the intended requirements. We will
discuss a scenario where we a sample DME tree will be created and towards the
end of the post, you should be able to see the file output.

This topic can be complex depending on the requirements and can be a handful to learn
in one sitting. As such, I have removed the other chunks of configuration and focused on
the Data Medium Exchange Engine (DMEE) or DME Tree creation for now.

As seen in previous posts, DME or Data Medium Exchange goes hand in hand with SAP
Payments. It is triggered through payment run where you can expect a payment medium
output.

Our example will show you a file output by form of an XML file. We will use this XML file
to compare the information seen on the file to transaction code DMEE. This approach
will help you visualize the configuration in DMEE in relation to the file output.

If you are interested, you can refer to the SAP DME End to End Process and
Testing post. You can also check out the post on Modify and Generate SAP DME Tree
File where I included a sample scenario.

Overview
 Configuration and Visualization
 Creation of DME Tree
 DME Tree Properties
 DME Tree Creation of Nodes
 Final Output
 Additional Information

Configuration and Visualization


As you know, our main transaction code for this post will be DMEE. Please be aware
that the examples used in this post are random and created for tutorial purposes to help
you understand how DMEE works

Creation of DME Tree

1. Go to Transaction Code DMEE, Enter the Tree Type and Format Tree, then click
Create.

 Tree Type: PAYM


 Format Tree: Z_DMESAMPLE_XML
2. You will encounter the question “What kind of file would you like to create with
the DMEE format?”. In our example, we will be using XML. As such, click on the
XML file button.

DME Tree Properties

3. You will now end up in the DMEE tree creation screen. For now, we have 1 row
called “DMEE tree: properties”. You need to fill out the tabs first before creating
anything else. The screenshot below shows that we are populating the
“Administrative Data Tab”

 Short Description: Z_DMESAMPLE_XML DESCRIPTION

You can leave the documentation blank for now since that will only generate a Warning.
4. Click on the next tab called “Format Attributes”. Here you will see entries for
Format Data and Print Accompanying Sheet. You can click on F1 on your
keyboard per field to understand the usage more.

For XSLT Program, refer to additional information for more details.

In the example below, I indicated Structure FPM_SEPA in the format specific structure
field so I can use its fields later on when I do mapping configurations for format
purposes. If you do not need this, you can leave this blank.

 Fmt-spec.strct. : FPM_SEPA
 Print accompanying sheet : Without accompanying sheet

In this example, I do not need an accompanying sheet. If you need more information on
this, you can check out the SAP Note on Accompanying sheet for a DMEE format .

Here is a screenshot of the FPM SEPA Structure Parameters for SEPA Formats. This
means that later on I can use the components or fields later on when I do mapping for
format purposes.
5. Click on the next tab called “Levels”. Here you will see a Level column and a
Repetition Factor column.

 Level 0 – Repetition Factor 9999999


 Level 1 – Repetition Factor 1
 Level 2 – Repetition Factor 9999999

This may be intimidating, but simply think of this as how many times (repetition factor)
the information can be repeated per level.

What is the use of Levels in SAP DMEE?

Consider Scenario 1 above where we said Level 1 will only repeat once and Level 2 can
repeat 9999999 times. Now look at Scenario 1.1. This means that Level 1 details will
only occur once per output file and Level 2 details can occur multiple times in an output
file.
Level now talks about the hierarchy of the data in your output file. Level 1 can serve as
the header or in our example <Document> </Document>.

This time, let us consider Scenario 2 where we added a Level 3 and set the repetition
factor to 9999999. This means that Level 3 can only occur multiple times in a file. If you
notice, <Information> </Information> details are within the <Payment Details></Payment
Details> thus it being Level 3 in the hierarchy.

6. Click on the next tab called “Sort / Key Fields”. Here you will specify what type
of information (structure and field) you can find per level. In our example below,
we are saying that we need some fields from Structure FPAYH and these details
will be found on Level 2.

Since we specified Level 2, that means we expect these details can be repeated multiple
times in one output file.

If you select the Key Field, it means that any change in the value tells SAP that the level
has ended. If you select the No Sorting Field, then there will be no sorting whatsoever
for that field in that specific level.

In our example, DOC1R is a field denoting a payment reference from Structure FPAYH
and we indicated Level 2. In this case, we can expect multiple payment references (up to
9999999 times) to occur in one output file.

7. Click on the next tab called “File Data”. Here you need to specify which
characters you want to allow OR which characters you do not allow.

 Character Definition : Do Not Allow These Charact.


 +^”$%&{[]}=`*~#;_!’
DME Tree Creation of Nodes

8. You are now done with the DMEE tree properties. You can now create nodes
according to your needs. As a refresher, below is a Node Legend for you to refer
to. You can always go to Extras > Node Legend for information. Click on the
Information Icon to obtain details for each.

It can be quite technical, but I have added some personal keywords per node. Feel free
to use your own keywords according to how you best understand them.

Node Key Words

Element XML Tag

XML Attribute Details inside an XML Tag

This won’t show up in the XML file. You can define exit modules / function modules here
Technical Node
or even store values from other nodes here.

Atom To define a mapping rule or more than one mapping rule. You need to display certain
values in one line from different fields. For example, use 3 atoms to output the
combination of 3 difference numerical codes from diff fields from SAP to make up a one
liner combination like “Field1 + Field2 + Field3” = “AA123BB”

Selected Node
You double clicked the node and have it currently selected. You are viewing this node.
for Detail View

Reference ID of
You have entered details in the Reference ID field in the Node.
Node

Reference to
You referenced another Node (by indicating the Reference ID either through mapping
Another Node
rules, conditions, or aggregation).
Exists

SAP DME Node Legend

9. Right click on DMEE tree : properties and Select Create Element. You should
have a New Element as seen in the screenshot below.

Let us analyze our XML file below. We want to show the <Document></Document> tags
in the output file and we need to make sure it only occurs once.

10. In our New Element row, we filled up the details below.

 Name : Document (This will output <Document> </Document> tags)


 Short Description : Document Tag
 Level : 1 (We put level 1 meaning I want this to repeat only once)
 Mapping Procedure : No Mapping (No mapping It is just a tag we want to output.)
 Other Tabs : Leave BLANK
11. Now let us consider the scenario that we need to put extra details IN the
<Document> tag. Refer to the XML file below where we see details such as
“xmlns” and “xmlns:xsi”.

 Detail 1: xmlns =”urn:iso:std:iso:20022:tech:xsd:pain.001.001.03″


 Detail 2: xmlns:xsi = http://www.w3.org/2001/XMLSchema-instance

Inside the document tag we have xlmns and xlmns:xsi and their corresponding
information. This means that we can create an XML Attribute to add extra details IN our
<Document> tag.

XML Attribute 1 xmlns

XML Attribute 2 xmlns:xsi

12. Right click on the 1st element you created (Document) and select Create
Attribute.
You should have the following screen below:

13. Let us create XML Attribute 1. We can expect this XML Attribute to include
details within the <Document> tag.

XML Attribute 1 xmlns

 Name : xmlns
 Short Description : xmlns attribute
 Mapping Procedure : Own Mapping (Atoms)

If you need to change the default value of Atom handling simply select an option.
14. This time, let us create XML Attribute 2. Right click on the 1 st element you
created (Document) again and select Create Attribute. We can also expect this
XML Attribute to include details within the <Document> tag.

XML Attribute 2 xmlns:xsi

 Name : xmlns:xsi
 Short Description : xmlns:xsi attribute
 Mapping Procedure : Own Mapping (Atoms)
You can drag the XML attributes up or down in the tree to arrange them.

By now, hypothetically speaking the XML output would be the image below. We have
the xmlns and xmlns:xsi but we are missing the details for each attribute.

We are still missing the details for each:

 Detail 1: xmlns =”urn:iso:std:iso:20022:tech:xsd:pain.001.001.03″


 Detail 2: xmlns:xsi =http://www.w3.org/2001/XMLSchema-instance

15. On the XML Attribute (xlmns), right click and select Create Atom.
You should have the following screen below:

16. Enter the additional details needed for this XML Attribute 1

 Name : ISO
 Short Description: ISO Details Atom
 Length : 70
 Type : Character
 Mapping Procedure : Constant (This is a fixed value all the time. It will output the
same value)

We declared the length as 70 since our structure FPM_SEPA says the length of XMLNS
is 70. The same approach follows thereafter.
17. Click on the next tab called “Source”. Here will copy paste the constant value
as needed.

 Constant : urn:iso:std:iso:20022:tech:xsd:pain.001.001.03

Note that if you need this value to be present ALL the time, you can follow by clicking on
the Conditions tab and specifying the conditions below.

For reference on the conditions:

 Arg 1-1 reference value that should be checked (our example stated the
structure)
 Arg 1-2 field value
 Type argument type (1 for constant value, 2 for field in source structure, 3 for
reference ID)
 Operator logical comparison for the conditions
 Arg 2-1 comparison value
 Arg 2-2 comparison value field value
 Type argument type for comparison value (same as previous Type)
 Operator linking operator used if you have several other conditions / lines (AND /
OR values only)
 Press F1 button on keyboard to double check further per entry.

18. Enter the additional details needed for this XML Attribute 2

 Name : ISO
 Short Description: ISO Details Atom
 Length : 70
 Type : Character
 Mapping Procedure : Constant (This is a fixed value all the time. It will output the
same value)

19. Click on the next tab called “Source”. Here will copy paste the constant value
as needed.

 Constant : http://www.w3.org/2001/XMLSchema-instance
Now that we are done with our XML attributes in the <Document Tag>, let us level up
our scenario.

20. Consider that within the <Document> </Document> tags, we need to include
payment details as seen in the XML file below. This means that we need to add
<Payment Details> </Payment Details> tags in our tree.

21. Right click on the (Document) element node and select Create Element as
Subnode. We are doing this because we are considering that the Payment Details
go within the Document tags.

22. You should have a sub node element under Document. You can now fill in the
details as seen below.

 Name : PaymentDetails
 Level : 2 (This means that payment details can occur multiple times in 1 output
file)
 Mapping Procedure: No Mapping (No mapping It is just a tag we want to output.)
 Other Tabs : Leave BLANK
By now you have created the <PaymentDetails> </PaymentDetails> tag within the
<Document> </Document> tag.

23. Now let us add to our scenario and consider that we need several information
within the <PaymentDetails> as seen in our XML file below.

From the file we can see that we need the following information below:

 Paying Company Code


 House Bank
 Bank Account Number
 Name of Payee
 Payment Reference
 Currency
 Amount

For this example, recall that we can create the xml tags accordingly as Elements (sub
node elements to <PaymentDetails>. From here, I can introduce the concept of
“Mapping Procedure: Structure Field”.

In SAP, we can obtain the needed information from these standard SAP structures.
Consider the breakdown below. Screenshots also provided for the structure and field.

Payment Details Needed

Information Name of Tag Structure Field

Paying Company Code CompanyCode FPAYH ZBUKR

House Bank HouseBnk FPAYH HBKID

Bank Account Number BankAcct FPAYHX UBKNT


Name of Payee PayeeName FPAYH ZNME1

Payment Reference PayRef FPAYH DOC1R

Currency Currency FPAYH HWAER

Amount Amount FPAYH RWBTR

This means you can now create the different tags in the DME tree and map them to the
existing SAP structures. You know that these structures have specific fields that are in
line with the data you need as well.

Here we see FPAYH-ZBUKR

Here we see FPAYH-HBKID

Here we see FPAYH-DOC1R

Here we see FPAYH-HWAER


Here we see FPAYH-RWBTR

Here we see FPAYH-ZNME1

Here we see FPAYHX-UBKNT

24. Now let us add those details by right clicking on the PaymentDetails node and
select Create Element As Subnode.

You can now enter the details as seen below.


 Name : CompanyCode
 Short Description : CompanyCode Element
 Length : 4 (We just followed the length indicated in the corresponding structure-
field)
 Type : Character (We just followed the data type indicated in the corresponding
structure-field)
 Level : 2 (This means that we can expect multiple instances of this in one output
file)
 Mapping Procedure : Structure field (We will indicate the corresponding structure-
field in the Source tab)

25. Click on the next tab called “Source”. Here you can specify the corresponding
structure and field for for this node as seen below. Basically, when you generate
the DME output, it should pull the value from the corresponding structure and
specified field.

26. Now you can create the next node. In this case, right click on the
CompanyCode element and select Create Element Same Level. This option is
selected because the next few payment details will be on the same level. There are
no further details within each of these payment details.
You should have the following screen below where you can continue the same approach
up until the last request detail which is Amount.

Follow the same process of creating an element at the same level. Below is the
continuation for BankAcct.

Note: for amount be sure to indicate that it is Type Numerical because we are talking
about a numerical value. You may be confused why Length is “10” instead of what is
specified in the structure but you can consider it as a limitation measure to keep the
amount value to 10 digits only.
The same approach applies where you map the corresponding structure and field.

27. Finally, we are complete with out DME tree. If you have not saved your creation
yet, be sure to hit the Save button where you can save the setup in a Workbench
Request as seen below.

Final Output
Our Final XML Output should be the screenshot below.
Comparing it to our DME tree:

<?xml version="1.0" encoding="UTF-8"?><Document xmlns="urn:iso:std:iso:20022:tech:xsd:pai


instance"><PaymentDetails><CompanyCode>CCCC</CompanyCode><HouseBnk>HSBK</HouseBnk><BankA
Incorporated</PayeeName><PayRef>03052020REF1234</PayRef><Currency>EUR</Currency><Amount>

Additional Information
Format Tree Name and Structure Format in OBPM1

It is important to note that the format tree name you create in DMEE has to be the same
as the payment medium format name you enter in OBPM1. Also, don’t forget to indicate
the structure format specified in DMEE in OBPM1 as well.

XSLT Program for Postprocessing

You can specify an XSLT Program for Postprocessing before the DME output file is
finally generated. This can be used to enhance the structure of the format tree. The
program is declared in the “DMEE tree: properties” Format Attributes Tab.
Reference ID of Node and Reference to Another Node Exists

We can assign the a Reference ID to once of our nodes in the DME Tree. In the
screenshot below, you see Reference ID “REFID1” in <CompanyCode>. Notice how the
tree shows the Reference ID’s beside the CompanyCode node.

Let us say I added that Reference ID so I can reuse the information later on. For
example, I create another Element / Node called “Payment Footer”. I then put the
Mapping Procedure as “Reference to tree node”.

In the next tab “Source”, you will see that I entered “REFID1” to the source.
Alternatively, I can also opt to indicate Mapping Procedure “Aggregation” and go to the
Aggregation Tab. This can output the number of occurrences based on the Aggregation
Type selected.

This is of course a trivial example. You can realistically use this approach if you want to
output the number of transactions in an output file etc.

Technical Nodes

If there is a requirement that cannot be fulfilled by the standard mapping procedures,


you can create a technical node and specify an exit module to include a custom Function
Module to accommodate the additional requirements.
In the example below, we entered Exit Function “Z_DMEEXIT_ADDTL”. Please keep in
mind that whatever Function Module or Exit Function you decide to input here, it needs
to be reflected in transaction code OBPM1 (Event Modules for Payment Medium
Formats) as well.
XMLNS and XLMNS:XSI Formatting

You can utilize SAP Formatting Structure FPM_SEPA as mapping for XMLNS and
XLMNS:XSI formatting. Simply create an Atom under the XML Attribute xmlns or
xmlns:xsi and specify the corresponding structure and field. Screenshots below.

XML Attribute xmlns


XML Attribute xmlns:xsi

Structure of DME File and SAP Example

There are different structures of DME Files depending on the requirements. In the
example below, there are other nodes utilized. Here we see a Root, Header Record,
Total etc. You can freely explore this Format Tree example as it will give you first hand
overview on how it is used.

You might also like