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 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
SAP DMEE Configuration

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.

SAP DMEE Configuration

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.

SAP DMEE Configuration

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 .

SAP DMEE Configuration

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.

SAP DMEE Configuration

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.

SAP DMEE Configuration

What is the use of Levels in SAP DMEE?

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

What is the use of levels in SAP DMEE

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.

SAP DMEE Configuration

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.
  • +^”$%&{[]}=`*~#;_!’
SAP DMEE Configuration

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.

SAP DMEE Configuration
SAP DMEE Configuration

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.

NodeKey Words
ElementXML Tag
XML AttributeDetails inside an XML Tag
Technical NodeThis won’t show up in the XML file. You can define exit modules / function modules here or even store values from other nodes here.
AtomTo 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 for Detail ViewYou double clicked the node and have it currently selected. You are viewing this node.
Reference ID of NodeYou have entered details in the Reference ID field in the Node.
Reference to Another Node ExistsYou referenced another Node (by indicating the Reference ID either through mapping rules, conditions, or aggregation).
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.

SAP DMEE Configuration

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.

SAP DMEE Configuration

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
SAP DMEE Configuration

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

SAP DMEE Configuration

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 1xmlns
XML Attribute 2xmlns:xsi

12. Right click on the 1st element you created (Document) and select Create Attribute.

SAP DMEE Configuration

You should have the following screen below:

SAP DMEE Configuration

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

XML Attribute 1xmlns
  • Name : xmlns
  • Short Description : xmlns attribute
  • Mapping Procedure : Own Mapping (Atoms)
SAP DMEE Configuration
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 1st 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 2xmlns:xsi
  • Name : xmlns:xsi
  • Short Description : xmlns:xsi attribute
  • Mapping Procedure : Own Mapping (Atoms)
SAP DMEE Configuration

You can drag the XML attributes up or down in the tree to arrange them.

SAP DMEE Configuration

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.

SAP DMEE Configuration

We are still missing the details for each:

15. On the XML Attribute (xlmns), right click and select Create Atom.

SAP DMEE Configuration

You should have the following screen below:

SAP DMEE Configuration

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)
SAP DMEE Configuration

We declared the length as 70 since our structure FPM_SEPA says the length of XMLNS is 70. The same approach follows thereafter.

SAP DMEE Configuration

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
SAP DMEE Configuration

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.

SAP DMEE Configuration

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)
SAP DMEE Configuration

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

SAP DMEE Configuration

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.

SAP DMEE Configuration

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.

SAP DMEE Configuration

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
SAP DMEE Configuration

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.

SAP DMEE Configuration

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

InformationName of TagStructureField
Paying Company CodeCompanyCodeFPAYHZBUKR
House BankHouseBnkFPAYHHBKID
Bank Account NumberBankAcctFPAYHXUBKNT
Name of PayeePayeeNameFPAYHZNME1
Payment ReferencePayRefFPAYHDOC1R
CurrencyCurrencyFPAYHHWAER
AmountAmountFPAYHRWBTR

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

SAP DMEE Configuration

Here we see FPAYH-HBKID

SAP DMEE Configuration

Here we see FPAYH-DOC1R

SAP DMEE Configuration

Here we see FPAYH-HWAER

SAP DMEE Configuration

Here we see FPAYH-RWBTR

SAP DMEE Configuration

Here we see FPAYH-ZNME1

SAP DMEE Configuration

Here we see FPAYHX-UBKNT

SAP DMEE Configuration

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

SAP DMEE Configuration

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)
SAP DMEE Configuration

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.

SAP DMEE Configuration

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.

SAP DMEE Configuration

You should have the following screen below where you can continue the same approach up until the last request detail which is Amount.

SAP DMEE Configuration

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

SAP DMEE Configuration

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.

SAP DMEE Configuration

The same approach applies where you map the corresponding structure and field.

SAP DMEE Configuration

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.

SAP DMEE Configuration

Final Output

Our Final XML Output should be the screenshot below.

SAP DMEE XML OUTPUT FILE

Comparing it to our DME tree:

SAP DMEE XML OUTPUT FILE
<?xml version="1.0" encoding="UTF-8"?><Document xmlns="urn:iso:std:iso:20022:tech:xsd:pain.001.001.03" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><PaymentDetails><CompanyCode>CCCC</CompanyCode><HouseBnk>HSBK</HouseBnk><BankAcct>1234512345</BankAcct><PayeeName>Random Services Incorporated</PayeeName><PayRef>03052020REF1234</PayRef><Currency>EUR</Currency><Amount>1000.22</Amount></PaymentDetails></Document>

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.

SAP DMEE Configuration OBPM1

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.

XLST Program for Postprocessing DMEE SAP

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.

SAP DME Reference ID of Node and Reference to Another Node Exists

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

SAP DME Reference ID of Node and Reference to Another Node Exists

In the next tab “Source”, you will see that I entered “REFID1” to the source.

SAP DME Reference ID of Node and Reference to Another Node Exists

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.

SAP DME Reference ID of Node and Reference to Another Node Exists

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.

SAP DMEE Configuration TECHNICAL NODE
SAP DMEE Configuration TECHNICAL NODE

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.

SAP DMEE Configuration TECHNICAL NODE EXIT MODULE

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

SAP DME XMLNS and XLMNS:XSI Formatting
SAP DME XMLNS and XLMNS:XSI Formatting
SAP DME XMLNS and XLMNS:XSI Formatting

XML Attribute xmlns:xsi

SAP DME XMLNS and XLMNS:XSI Formatting
SAP DME XMLNS and XLMNS:XSI Formatting

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.

Structure of DME File and SAP Example

I hope this helps. Good luck! 😊

Other Learning Alternatives

Looking for an on-the-go copy of all DME topics? Check out “SAP Data Medium Exchange eBook by Techlorean“.

SAP DME EBOOK

3 thoughts on “SAP DME Tree Configuration – DMEE Focused (Simple Explanation)

  1. Loved your way of explanation. May I ask a question and may sound very naïve as DMEE is new to me.

    Q: What is the triggering point to create a new DMEE structure on how it should look? I mean since this information goes to the bank, does the bank provide you with the sample xml file with various details so that same can be integrated in their system? At the end of day, my file should be compliant at bank’s end.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.