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.
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.
- What is a Note to Payee?
- Configuration and Checklist
- Note to Payee Output
- Additional Information
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.
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.
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.
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.
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.
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.
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.
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_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.
- 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
I hope this helps. Good luck! 🙂