Bohdan Petrushchak
July 24, 2018 5 minute read
Note to payee functionality in SAP – part 1
FollowRSS feed
1 Like 1,454 View 1 Comment
Hello SAPers!
I’ve planned to write this post for some time, but began working on it just recently. I hope it would be of interest for you and will give some new insights on note to payee functionality in SAP. This post contains a lot of technical details, if you have any questions or need some clarification, feel free to post them as comments.
Please also check out the second part of this topic under the following link “Note to payee functionality in SAP – part 2“.
1.1 Introduction
Note to payee is a part of a data medium that contains additional information about payments, which might be relevant for payee or is required legally. As a rule, note to payee is transferred in fields of data medium, which from bank’s perspective are freely definable. That means that if there are no explicit legal or technical bank platform requirements, you can fill it with whatever information you want. Typical usage cases:
To provide list of vendor invoice numbers, which are being paid (e.g. CITI Direct);
To provide information on payment purpose and VAT amount paid (e.g. typical business practice in Ukraine, Russia);
To provide specific legally required details (e.g. typically budget-related payments require additional details).
You can use a lot of standard mapping options in DMEE-tree to generate note-to-payee quite flexibly, but you can also use dedicated note-to-payee functionality to achieve greater flexibility.
1.2 Define technical attributes of note to payee
Technical attributes of note to payee should be defined during creation of payment medium format (hereinafter referred to as PMW). Use the following menu path or transaction OBPM1 to access the customizing:
SPRO → Financial Accounting (new) → Accounts Receivable and Accounts Payable → Business Transactions → Outgoing Payments → Automatic Outgoing Payments → Payment Media → Make Settings for Payment Medium Formats from PMW → Create Payment Medium Formats.
Select your PMW and navigate to tab “Text Fields for Reference Information”:
Add an entry with note to payee type 1, indicate the length of the field and number of fields. Length of note to payee field usually depends on the requirements of your bank. Number of fields depends on the approach to payments:
if you pay each document separately, it would be enough to set up this value to 1 (i.e. one note to payee for each payment document);
if you use grouped payments (i.e. one payment for many vendor invoices), number of fields should be high enough to allow creation and storing of note to payee details for each paid invoice.
if number of lines is not enough, you’ll encounter error BFIBL02231 “Payment advice note created for payment document XXXXXXXXXX” and note to payee will not be generated properly.
1.3 Create note to payee
Note to payee is a functionality of SAP that allows to creation and storing of note to payee information (i.e. payment details) that can be used in payment file. Note to payee can be defined via customizing or with help of custom FM. Launch t-code OBPM2 and define note to payee using FM or using customizing. This post will focus on note to payee using FM-based approach, customizing-based note to payee will be covered in upcoming post.
Menu path to access note to payee settings is provided below:
SPRO → Financial Accounting (new) → Accounts Receivable and Accounts Payable → Business Transactions → Outgoing Payments → Automatic Outgoing Payments → Payment Media → Make Settings for Payment Medium Formats from PMW → Adjust Note to Payee.
If note to payee is FM-based, no additional customizing is necessary in this view. Additional customizing steps for customizing-based note to payee are described in separate post.
1.4 Assign note to payee to payment method
Note to payee should be assigned to a payment method on country level per origin in FBZP (example below):
The purpose behind this customizing is that note to payee can be generated differently depending on the origin of payment data. Origin refers to the source of payment data e.g.:
FI-AP – payment of vendor items (from F110);
FI-AR – payment of customer items (from F110);
FI-AP-PR – vendor payment requests (from F111);
FI-AR-PR – customer payment requests (from F111);
FI-BL – other payments (e.g. free-form payments, also triggered in F111).
Please check out OSS-note 1977304 “FBZP: Explanation of origins when assigning a note to payee” for details on origins in APP.
1.5 Create FM to build note to payee
FM should be created by copy of standard FM FI_PAYMEDIUM_SAMPLE_DETAILS which provides an interface to build note to payee details. This FM will be triggered during proposal / payment run when option “Create payment medium” is ticked off. The result of FM execution will be saved into database table DFPAYHT – it will store one or more line for each payment document and might store additional technical information as well.
Sample source code for FM that generates note to payee can be found below:
function zdmee_build_note_to_payee.
*"--------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" VALUE(I_FPAYH) LIKE FPAYH STRUCTURE FPAYH
*" VALUE(I_FPAYHX) LIKE FPAYHX STRUCTURE FPAYHX
*" TABLES
*" T_FPAYP STRUCTURE FPAYP
*" T_PAYMENT_DETAILS STRUCTURE FPM_PAYD
*" CHANGING
*" REFERENCE(C_XAVIS_REQ)
*"--------------------------------------------------------------------
data:
ls_note type fpm_payd,
lv_note type string.
constants: lc_inv type string value 'INV'.
field-symbols: <doc> like line of t_fpayp.
ls_note-type = 1.
ls_note-line = 1.
ls_note-text = lc_inv.
ls_note-length = strlen( ls_note-text ).
loop at t_fpayp assigning <doc>.
clear: lv_note.
append ls_note to t_payment_details.
lv_note = <doc>-xblnr.
ls_note-length = strlen( lv_note ).
ls_note-text = lv_note.
add 1 to ls_note-line.
append ls_note to t_payment_details.
endloop.
endfunction.
1.1.6 Create FM for DMEE-tree
Another FM (e.g. ZDMEE_NOTE_TO_PAYEE) should be created to retrieve note to payee details from DFPAYHT table and link it DMEE-tree. From technical perspective this FM is concatenating all lines from table DFPAYHT into one line.
This FM should be created via copy of standard template DMEE_EXIT_TEMPLATE_ABA. Please check out my post on “Exit modules in DMEE” for more details on this mapping options in DMEE-tree. Proposed source code for this FM can be found below.
function zdmee_note_to_payee.
*"--------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" VALUE(I_TREE_TYPE) TYPE DMEE_TREETYPE_ABA
*" VALUE(I_TREE_ID) TYPE DMEE_TREEID_ABA
*" VALUE(I_ITEM)
*" VALUE(I_PARAM)
*" VALUE(I_UPARAM)
*" REFERENCE(I_EXTENSION) TYPE DMEE_EXIT_INTERFACE_ABA
*" EXPORTING
*" REFERENCE(O_VALUE)
*" REFERENCE(C_VALUE)
*" REFERENCE(N_VALUE)
*" REFERENCE(P_VALUE)
*" TABLES
*" I_TAB
*"--------------------------------------------------------------------
data:
result(160) type c,
linetab type standard table of text_fpm with header line.
field-symbols:
<fs> type dmee_tab_type_aba.
loop at i_tab assigning <fs>.
linetab = <fs>-text.
append linetab.
endloop.
concatenate lines of linetab into result separated by space.
c_value = result.
endfunction.
Sample note to payee generated by this FM can be found below:
This example might be rather simple, but I hope it provides enough details to understand where to start if you would like to implement more complicated logic for note to payee.
Your suggestions and comments are welcome!
Regards,
Bohdan Petrushchak
Like
Alert Moderator
Assigned tags
FIN (Finance)
DFPAYHT
dmee
fbzp
obpm1
View more...
Related Blogs
Note to payee functionality in SAP – part 2
By Bohdan Petrushchak, Sep 16, 2018
Search String Functionality- based on unique text in the note to payee lines for EBS.
By Mohammed Kalim, Oct 19, 2015
France Article A47 A-1 SAP DART SAP Note 0001923322
By Rajesh NG, Mar 12, 2014
Related Questions
FF_5 : Import Electronic Bank Statement : EBS Note to Payee : Automatic Clearing
By Former Member, Jan 21, 2017
Invocie Reference in DMEE XML file
By Venkata sai, Nov 08, 2018
Alternate payee in document
By Kamarudzaman Nur Darwisyah, Sep 21, 2017
1 Comment
You must be Logged on to comment or reply to a post.
Kishore Marodia
September 23, 2018 at 4:38 pm
Wonderful post Bohdan… One doubt: Instead of creating NOTE TO PAYEE as a separate object and then again call it with another FM in DMEE node, why dont we use 1 FM in DMEE node and just simply code it there?
Like(0)
Note to payee functionality in SAP – part 2
FollowRSS feed
1 Like 537 Views 0 Comments
Hello SAPers!
Here is second part of the post on note to payee functionality in SAP. The first part was published a bit earlier and covered customizing setup for note to payee as well as one of the approaches to generation of note to payee details namely custom development using functional module. This post covers customizing approach to generation of note to payee.
1.1. Introduction
As mentioned above, there are two approaches to create note to payee in SAP – via customizing or using custom FM. Some of the settings are the same regardless the approach e.g. you should define technical requisites of note to payee in t-code OBPM1, create definition of note to payee in OBPM2, assign it to payment method in FBZP, build DMEE-tree etc. Most of these basic settings are described in my previous post. This blog will cover two areas which differ – definition of note to payee and customizing of DMEE-tree.
1.2. Create note to payee
Launch t-code OBPM2 and create note to payee by indicating its name and description. Activate checkbox “Note to payee layout using customizing” as a controlling option.
Save the entry and navigate to “Default Note to Payee” tab to define the structure of note to payee information.
Indicate note to payee type 1 and number of line item. The type of note to payee in OBPM2 should be the same as defined in technical attributes in t-code OBPM1. Indicate the reference to the variables which will be used to generate note to payee text. Note to payee can include: – references to system variables (e.g. FPAYP-XBLNR); – fixed text constants (e.g. “Invoice #:” etc.); – controlling parameters (e.g. X, Z, R, S etc.) to impact the formatting of the values. System variables include fields from the same structures FPAYP, FPAYH, FPAYHX that are used in DMEE as mapping options. To get an overview of all values, select the field “Note to payee text” and press F4 to retrieve search help:
As you can see, search help is divided into two parts – each of them is referencing the same structures, but the first one contains primarily business information (name of the vendor, invoice number etc.), whereas the second one contains fields of technical nature (sorting / grouping fields, sequential payment number etc.). Select the field you need (1) and press “Copy” (2) button to insert it into note to payee definition. If note to payee is to be used for payments to vendors from several countries, you can define language-dependent note-to-payee. Technically speaking, configuration is the same, but you can translate fixed text elements into different languages (see example below).
Selection of note to payee depends on the language of payee (i.e. payment recipient). Note to payee maintained in language of payee has higher priority over default note to payee. SAPscript formatting options can be used to format output of values for example:
&VARIABLE+4(X)& – Offset and take X number of characters (e.g. &FPAYH-DOC1R+4(10)&) &VARIABLE(X)& – Display only X characters of variable value; &VARIABLE(C)& – Condense variable value (i.e. remove empty spaces e.g); &VARIABLE(Z)& – Remove leading zeros (e.g. &FPAYP-ZBLNR(Z)&); &VARIABLE(.2)& – Indicate number of decimal places to be displayed; &VARIABLE(I)& – Do not display initial value; &VARIABLE(R)& – Right-justified display; &VARIABLE(S)& – Remove leading sign.
1.3. Configure DMEE tree
Configuration of DMEE tree for note to payee involves creation of quite many technical nodes. To begin with create a composite node to group together 10 technical nodes which will store 10 references to vendor invoice number. The length of each node should 16 characters i.e. the same as for field BKPF-XBLNR, which stores vendor invoice number in accounting document. These technical nodes will not be displayed in payment file but will be used as a source of data by other fields in DMEE tree. Each node contains reference ID (INV_X) which will be used by other nodes.
Each technical node uses structure field DMEE_PAYD-TEXT as a mapping option. Key field 1 in the settings of source field indicates type of note to payee. 10 consecutive references to the structure DMEE_PAYD ensure that the system will retrieve first 10 values from table DFPAYHT.
Note to payee is split into four parts i.e. segments due to layout requirements from the bank. The length of each segment is 35 characters. Thus, each segment can contain 2 maximal 3 references to vendor invoice number. Each segment uses own mapping as a mapping procedure which basically concatenates the values of all child atoms into value without spaces. First segment contains atom “note_beginning” that contains constant value “Inv.:” that will be displayed once at the beginning of note to payee.
Each atom with name “line_x” will contain a reference to vendor invoice number. Mapping option “Reference to tree node” will be used to get values from technical nodes at the beginning of DMEE-tree (i.e. atom line_x will use Reference Node ID INV_X).
Each “delimiter” atom has a constant value “,”. To make sure that comma is not displayed unnecessary condition is set up for each delimiter. The condition checks whether a next line with vendor invoice number is not empty. Delimiter will be displayed only if next line is not empty.
That’s basically all you need to configure to generate note to payee in necessary format. The only advantage of this approach (at least for this requirement) is that you can do without any development efforts at all. Disadvantages are obvious: you’re limited to display of X invoice numbers only and you must do a lot of technical setup, which is not straightforward and might be difficult to support. Development approach i.e. via custom FM would be much more efficient and easier at least in my humble opinion😊.
Hope this post was useful and you found something of value. Please comment and let me know if you have any questions or suggestions. Please also check out other posts on this and related topics.
Regards,
Bohdan Petrushchak
Payment Requests
You use this function (transaction F111) to start the Payment Program for Payment Requests. The payment program for payment requests is an additional automatic payment option in the SAP system. Unlike the standard payment program, the payments are not based on open items (customer items) but on payment requests.
Integration
You use the Payment Program for Payment Requests in the Money Market, Foreign Exchange, Derivatives, and Securities areas of Treasury and Risk Management and in Loans Management in the Bank Applications area.
Accounting Financial Supply Chain Management Treasury and Risk Management Transaction Manager Money Market/Foreign Exchange/Securities/Derivatives Accounting Payment Payment Request
Accounting Bank Applications Loans Management Accounting Receivables/Payment Management Generate Payments Automatic Payment Transactions - Payment Request
Accounting Financial Accounting Banks Outgoings Automatic Payment Payment Requests
Note
You can also use a BAdI (technical name TPM_EXT_PAYMENT_TRPR) to make payments for payment requests using another payment program (such as In-House Cash). The BAdI is available in Customizing for the Transaction Manager under General Settings Payment Management Payment Requests Customer Payment Programs .
See also:
Connection of Transaction Manager to In-House Cash
Prerequisites
Before you can use the Payment Program for Payment Requests, you are required to make certain settings in Customizing for the Transaction Manager (TRM) in addition to settings for configuring the payment program.
Money Market, Foreign Exchange, Derivatives, and Securities Areas
You have entered a number range for key number assignment of payment requests in Customizing for Treasury and Risk Management under Transaction Manager General Settings Payment Management Payment Requests Define Number Ranges for Payment Requests .
You have set up the planning levels for payment requests in Customizing for Cash and Liquidity Management under Master Data G/L Accounts Define Planning Levels .
You have created the clearing account in the chart of accounts and assigned it to the company code in Customizing for TRM under Transaction Manager General Settings Payment Management Payment Requests Define Clearing Account for Payment Requests .
You have set the Payment Request indicator for the individual flow types in the IMG activity Define Flow Types. This activity can be found in Customizing for the Transaction Manager in the areas Money Market, Foreign Exchange, Derivatives, and Securities. In this way, you specify whether payment requests can be generated for flow types.
You can choose from the following:
Notes on Generating Payment Requests in these Areas
If you want to generate payment requests for transactions with a business partner, you can define these in the standing instructions for the business partner payment details. To do this, set the Payment Request indicator in the standing instructions of the payment details and enter at least one payment method in the List of Payment Methods field. These settings are the default values for the payment details for each transaction with the business partner.
You make the final decision as to whether to generate a payment request when you actually enter the transaction. If you do not want to generate a payment request, you can overwrite the default values from the standing instructions in the payment details for the transaction.
In a transaction, one payment request is generated for each flow. If you use the functions from the Public Sector area, one payment request is generated for each account assignment.
Note
In the relevant posting record, the bank clearing account is exchanged for the clearing account for payment requests. The Payment Program for Payment Requests makes the clearing posting from the clearing account for payment requests to the original bank clearing account.
Grouping Payment Requests
You can group payment requests with the payment program as long as the following fields match:
Business Area
Company Code
Business Partner
Payment Currency
Value Date: Recipient
Payee (bank details in the item)
Payment Method
Contents of the grouping fields (Grouping field and Same Direction field). The Grouping field contains the key for the Netting function, for example. In addition, you can use the Group Determination field in the payment details to specify what is entered in the Grouping field. The field may be predefined for the individual business partners when the Standing Instructions for the Payment Details were defined in the business partner master data.
The contents of the Same Direction field is also written to the Grouping field for the payment request.
You cannot make single payments.
The payment request must be released to make the payment.
No payment blocks can be set.
Example of a Payment Block
If transactions are grouped with the netting function, they can then only be paid together. If one of the transactions has already been posted but the other has not, then a payment block is set. The block is undone once the second transaction is posted in the netting transaction.
Loans Area
For more information on the settings in the "Loans" area, see Payment Request.
Other Settings
You have made the required settings for the payment program in Customizing (see Customizing the Payment Program).
Call the Payment Program for Payment Requests (transaction "F111"). Choose Environment Maintain Configuration to make your Customizing settings for the payment program.
Activities
To start a payment run, call the Payment Program for Payment Requests (transaction F111). The Automatic Payment Transactions for Payment Requests screen appears.
Enter a date and a payment run ID.
All information relating to the payment run is stored under these values.
Choose Edit Parameters Maintain Payment Run Parameters . The Automatic Payment Transactions: Parameters screen appears.
Enter the values for the parameters.
The Dynamic Selections function gives you the option of using other fields for selecting payment requests.
You can create an additional log by choosing Additional Log.
Save the parameters for the payment run.
To generate a proposal run or a payment run, choose Edit Proposal Schedule or Edit Payment Schedule .
Specify a starting time (or set the Immediate Start indicator) and a computer, if required.
If you create a proposal, you can display the log, payment list, and exception list. You can edit or delete the payment proposal. If you are satisfied with this payment proposal, choose Edit Payment Schedule and execute the update run.
After the payment run, the system generates the posting documents, the payment and exceptions lists, and the payment media.
More Information
In the documentation for the Payment Program for Payment Requests (FI-BL), see the sections on Executing the Payment Program.
| Character | Create payment request? |
|---|---|
| None | |
| - | For outgoing payments |
| + | For incoming payments |
| X | For outgoing and incoming payments |