Note to payee functionality in SAP

https://wiki.scn.sap.com/wiki/display/ERPFI/Modifying+Standard+PMW+Formats

Dashboard

…

Outgoings - Payment Medium

Skip to end of banner

Go to start of banner

Modifying Standard PMW Formats

Skip to end of metadata

Created by Diogo Peretti, last modified on Dec 21, 2011

Go to start of metadata

Purpose

The purpose of this WIKI is to show how you can modify standard DME formats using PMW functionality

Overview

The PMW is a flexible tool that provides to the customers the opportunity to modify standards DME formats to meet their business requirements. These changes can be done directly in DMEE tree or via custom events.

1) Using PMW Events

In transaction OBPM3 you can add events which are Custom Function modules. In the events 06, 21, 31 and 41 you receive the results of the events 05, 20, 30 and 40 in the table T_FILE_OUTPUT. You can change the contents of the table in the exit.

The data is in the T_FILE_OUTPUT table in an unstructured form. If you want to access individual fields, copy the row of the table to a structure that you take from the standard module of the corresponding event (see transaction OBPM1).

For example, if you want to change a specific record, you can use event 31.

2) Using DMEE transaction

If the PMW format is implemented via DMEE tree (DME flag is set in OBPM1), you can make a Z copy of the standard format via transaction DMEE and modify the nodes of the Z format copied.

The structures used are FPAYH, FPAYP and FPAYHX, so the fields of these structures can be used in the nodes.

Related Content

Related Documents

SAP Help - Payment Medium Workbench Overview

Related Notes

SAP Note 965723 : PMW: Use of exits (transaction OBPM3)

Bohdan Petrushchak

July 24, 2018 5 minute read

Note to payee functionality in SAP – part 1

FollowRSS feedLike

3 Likes 5,384 Views 2 Comments

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

Bohdan Petrushchak

September 16, 2018 5 minute read

Note to payee functionality in SAP – part 2

FollowRSS feedLike

2 Likes 2,345 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

DMEE Customizing

Skip to end of metadata

Created by Former Member, last modified by Humberto Ordosgoitia on Aug 19, 2016

Go to start of metadata

OBPM1

Payment medium without docs - available Types:

01 File 02 IDoc 03 Obsolete 04 XML 05 XI Proxy 06 FTA

SAP note 921720 - Payment medium: Security and encryption PMW formats of type FTA (transaction OBPM1): In the case of PMW files (transaction FBPM, report SAPFPAFYM), the file is signed with SSF (Secure Store and Forward) and encoded with BASE64 if you select the type FTA in transaction OBPM1 (call module 'SSF_KRN_SIGN_BY_AS', function group BNK_FTA). This, however, is not encryption.

When switch BNK_SFWS_DDIC_BRM is on, then ‘FTA’ fixed value is available for domain DTTYP_FPM  Payment medium output divided by level of detail:

Relevant SAP note: 1794408 - PMW: Granularity, denomination, group number, logical file, sorting

If the report SAPFPAYM is called online and multiple groups exist, a dialog box that allows you to select the group appears.

OBPM2

OBPM3

For further info see SAP note Relevant SAP Notes:

965723 - PMW: use of exits (transaction OBPM3)

1360302 - PMW: Read and change report parameters in the exit

Maximum Number of Payments

1932233 - PMW: Lack of memory in XML, limit number of payments per file

Scheduling of Jobs

2157597 - OBPM3: Scheduling of jobs: Sequential, parallel, SAP values

Create a Variant in SAPFPAYM:

OBPM4

SAP Note 984462 - Report SAPFPAYM/SAPFPAYM_SCHEDULE: Several files

Schedule the report SAPFPAYM_SCHEDULE, not the report SAPFPAYM. The variants of SAPFPAYM must then be defined in transaction OBPM4. Background information: The report SAPFPAYM can generate only one payment medium at once. If several payment media have to be generated, the system issues a dialog box in which you must select which payment medium is to be generated.

The report SAPFPAYM can generate only one payment medium at once.

When scheduling the payment run using transaction F110 Report SAPFPAYM_SCHEDULE is executed, which reads the variants maintained in OBPM4 and call SAPFPAYM with it.

If you are clicking on the “Print” button in F110 all relevant variants maintained in OBPM4 will be executed. The same is valid for Programs which have a variant maintained in F110 tab Printout/data medium.

SAP Note 1782685 - OBPM4: Different variants for HR/HCM and FI, determination of parameters in exit.

Customizing (FBZP)

1. You wish to use different payment formats for the same payment method, depending on house bank and company code. Example: You use a payment method for SEPA payments. But one house bank is requesting a different SEPA-version than the other house banks.

Relevant SAP Notes: 1943453 - PMW-format depending on house bank and company code 2045873 - Jump from transaction FBZP to the view cluster VC_T042ZA_FORMAT

2. Note to payee:

Relevant SAP notes:

SAP Note 1837294 - Note to payee DMEE_PAYD-TEXT in file

SAP note 1404650 - Consulting note: Note to payee in PMW payment medium DMEE

.3. How is separation or denomination performed for Payment Medium Workbench (PMW) files?

Relevant SAP note :

1781325 - SEPA: No separation by company code/field and

1794408 - PMW: Granularity, denomination, group number, logical file, sorting

1.  You wish to use different payment formats for the same payment method, depending on house bank and company code. Example: You use a payment method for SEPA payments. But one house bank is requesting a different SEPA-version than the other house banks. Relevant SAP Notes: 1943453 - PMW-format depending on house bank and company code 2045873 - Jump from transaction FBZP to the view cluster VC_T042ZA_FORMAT

No labels

1 Comment

Former Member

We need to encrypt (PGP) the payment file that will be stored in the SAP server (secure folder) all the configuration is ready, the DMEE writes the file (not encrypted) in a folder in the server. My question is related to the fact that I do no't know exactly where to call the external command to execute the encryption (where in SAPFPAYM). I am thinking it should be included in an enhancement point after the non encrypted file is written, however, where in the SAPFPAYM is SAP writting the standard payment file? Any comments will be highly appreciated.

返回TECH参考资料列表