Tips and tricks of working with DMEE trees in SAP

Dmitry Kaglik

January 2, 2017


No Comment

Share the knowledge!

DMEE trees is a powerful tool to generate payment files from SAP. It is one of three ways to generate payment files.

Some of the features that you can use in DMEE trees are not so obvious. Let SAP Expert give you some ideas how you can use these features.

Managing imported DMEE tree names

DMEE trees are managed and configured in SAP transaction code DMEE. If you look at this transaction, you will notice that there is a “Copy” button that allows you to copy existing DMEE trees into new ones.

Apart from copying the DMEE trees within your system, you can also upload XML files with DMEE trees that you get from somewhere else, for example from another system or from SAP Note. There is a menu item for that.

The DMEE tree in the externally acquired file may have a name that already exists in your system. Of course, it is not a good idea to upload such a file, because it will overwrite your configuration.

Before uploading the file, open it in any editor you have. Notepad is good enough. At the beginning of the file, search for tags Type and Name.

DMEE xml file
DMEE xml file

The Name tag after the Type tag defines the name of the DMEE tree to be uploaded. If you look at the screenshot, the Name of the tree is SEPA_CT. Check that this name is available in your system. If it already exists and you don’t want to overwrite your existing configuration for this DMEE tree, you can edit that value to give XML tree your own name after uploading. Change it, for example, to Z_SEPA_CT, and this DMEE tree will appear in the list of trees in transaction DMEE after you upload your edited file.

But that is not the end of the story. If you want to use your new DMEE tree in the payment method, you still have to define the Payment Medium Format for it. You do this in transaction OBPM1. You can either create your new format there from scratch, or better copy a similar format. Just to remember that OBPM1 format should have the same name as your DMEE tree, Z_SEPA_CT in the example above. Once you did OBPM1 definition, OBPM3 and OBPM4 are also available for fine-tuning of your payment format configuration.

Using multi-line payment remittance information

Remittance is a text information that you want to transfer to your vendor together with your payment. Most payment file formats support a section where remittance information can be placed. Remittance is usually a freely defined text. You can decide yourself what you send as a remittance. But it is very likely that you will send a list of invoice numbers so that vendor could reconcile the payment. There are 2 considerations here. First, payment file format can allow several repetitive components (tags, segments) for remittance information. Second, you do not know initially how much information you need to transfer, how many invoices should be listed.

Usually the contents of Remittance information is generated using the Note to Payee functionality configurable in OBPM2 transaction. You can create a Note to Payee, for example Type 1, containing the invoice number and date.

Say, you file format allows you to have 2 invoice number in each Remittance segment with up to 4 segments in each payment. It means you can transfer up to 8 invoice numbers with one payment, but the question is how to split them between 4 segments and avoid using the empty segments.

When configuring the first Remittance segment in the DMEE tree, create 2 “usual” elements (or atoms) and 1 technical element in it. Assign each element to structure field DMEE_PAYD-TEXT with Key Field 1 (corresponding to Note to Payee Type 1). Give the 3rd (technical) element a special Reference value.

DMEE tree - step 1
DMEE tree – step 1

This approach ensures that DMEE tree will refer to Note to Payee 3 times, retrieving one invoice number and date at a time. If there are up to 2 invoices, they will fill the first Remittance segment. If there are more than 2 invoices, then technical element will get a non-empty value, but it will not be output, because of its technical status.

The second segment will also contain 3 elements with the same contents, apart from the first element in the second segment being assigned to the contents of the Reference tree node. This ensures that the 3rd element will contain the invoice and date from the 3rd reading of Note to Payee, which happened when the last technical element of the first segment was created.

DMEE tree - step 2
DMEE tree – step 2

Another consideration is that the whole segment should only be created if the value of the Reference tree node is non-initial. The Condition should be imposed on the whole segment for that.

DMEE tree - step 3
DMEE tree – step 3

The 6th element is similar to the 3rd – it is technical-only and has a special Reference.

The third segment in the Remittance part of the payment file should be the same as the second.

The forth segment is very similar too, but it only contains 2 real elements. There is no need to create a technical element, because there is no follow-up segment for it.

DMEE tree - step 4
DMEE tree – step 4

Now, your remittance section will contain up to 8 invoice numbers in groups of 2 invoices per segment. If there are less than 8 invoices, the segments without any invoice will be omitted.

Working with restricted characters

There is a number of characters that are restricted from use in the payment files due to technical requirements of the file format itself, or due to your bank special requirements, or both. Sometimes it is even more complicated, because bank allows the use of special characters in some fields of the file, but not in others.

There is a special tab in the DMEE header where you can define a list of allowed or restricted characters.

However, placing a list of characters in that tab is not sufficient to exclude them from the output file. You need to activate this removal as an option in the conversion function for the node where the character may appear.

You also need to understand that some file formats have technical restriction on the use of characters. For example, the use of & (ampersand) or “ (quote mark) signs in HTML/XML files is not allowed. If these characters should be in the output text, the characters should be replaced with special combinations like & or ".

Let’s assume that you gave a list of restricted characters in the DMEE tree header.

The following rules will apply:

DMEE Tree header switch

Conversion function

System behaviour for file-restricted characters

System behaviour for other restricted characters

Do not allow

Not ticked

Replace with special combinations

Remain in the field

Do not allow


Remove from the file

Remove from the file


Not ticked

Replace with special combinations

Remain in the field



If special character is listed as allowed, replace it with a special combination. Remove all non-listed characters.

Remove all non-listed characters

Ticking or un-ticking of conversion function checkbox gives you an opportunity to control the contents of the each file field.

However, you also need to mind that it is not only the file creation program that is relevant to what you see on the screen when checking the file. The viewer is important too. For example, if you use a browser like Internet Explorer to check the file contents, it will convert special combinations like & or " back to the special characters. That is why it is important to check your file contents not only in the browser, but in a simple text editor like Notepad when dealing with special characters.

Do you have any questions about the use and creation of DMEE trees? Why not ask SAP Expert a question?

Share the knowledge!

Related Posts

New Platform for SAP Job Market

Let me introduce you a new on-line service for SAP specialists search This is the place where SAP projects and SAP consultants meet. SAPBAZAR is for: Quick and easy publication of your projects. Easy system of promoting your projects. You can post your project on the top positions of the first page. Receiving direct replies from […]

Read More

The real benefits of HANA? What are they?

SAP Expert ran a poll recently where you were asked to vote about the plans of your company / project for HANA use. It is time now to publish the results. Here they are As you can see from the diagram, more than a quarter of the voters neither use HANA, nor have any plans […]

Read More

Search this site

SAP Expert on the web


Enter your email address:


Will you be happy to pay for the 3rd edition of the book FREQUENTLY ASKED QUESTIONS ON SAP FINANCE?

View Results

Loading ... Loading ...
Visit Us On TwitterVisit Us On LinkedinCheck Our Feed