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“.
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.
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.
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.
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.
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.
function zdmee_build_note_to_payee.
*"--------------------------------------------------------------------
*" 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)
*"--------------------------------------------------------------------
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.
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.
*"--------------------------------------------------------------------
*" 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
*"--------------------------------------------------------------------
result(160) type c,
linetab type standard table of text_fpm with header line.
<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.
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.
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.
...