Enterprise Resource Planning Blogs by SAP
Get insights and updates about cloud ERP and RISE with SAP, SAP S/4HANA and SAP S/4HANA Cloud, and more enterprise management capabilities with SAP blog posts.
Showing results for 
Search instead for 
Did you mean: 
The goal of this post is to describe the step-by-step process of how to export the custom field and logic in the payment file. Based on the best practice experience, it will be explained for you with an example: export customer e-mail into a payment file.

The content of this blog post is the following:


The business process is described in the section Business Process for Payment Medium Formats or in the blog post Payment formats in SAP.

  1. Create, Copy, Delete & Release in Map Payment Format Data

  2. Create, Copy & Delete Payment Medium Format

  3. Linking Payment Medium Format to a Payment Method

Create a new enhancement implementation

You use the application Payment Medium: Custom Additional Reference Fields (Business Add-In BAdI) to implement your own logic to fill the data into ZREFxx custom reference fields, which will be exported into payment file.

Note: To be able to access this app and follow the described process, your user must be assigned a role that has the authorization as defined in the business catalog Extensibility (SAP_CORE_BC_EXT).

  1. Open the Custom Fields and Logic app from the Extensibility business group on your launchpad.

  1. Switch to the Custom Logic tab

  2. Choose + (Create) to add and create new enhancement implementation.

  3. Fill out the dialog box as explained in the following table and then choose Create.

Field Explanation
Business Context Select Finance: Payment Medium.
BAdI Description Select Payment Medium: Custom Additional Reference Fields.
Implementation Description Enter a description, for example Export customer e-mail into payment file
Implementation ID The field is filled out automatically as you enter the implementation description. You can change the ID if you like.


  1. Then define filter. Your logic should be called only for the format created in previous steps.

  2. Choose + (Add) to add a filter condition.

  3. Choose + (Add) to add an entry.

  4. Fill out the dialog box as explained in the following table and then choose Save.

Field Explanation
Filter Parameter Select format
Comparator Select =
Value Enter the payment medium format to which you want to add custom reference fields.


  1. To get the accounting clerk’s e-mail from the supplier you must implement the following logic.

  2. Choose Save Draft in the bottom-right corner.

  3. Choose Publish in the bottom-right corner to activate your new logic.

Search CDS views

  1. To find more views, which can be used in your own logic, use application View Browser.

  2. Search for view by entering keywords or view you already know

  3. Open the view to display details. The definition shows a list of fields in view

  4. The annotation contains technical details of the view. ABAPCATALOG.SQLVIEWNAME contains the name of the view, which can be used in SE11 do display this CDS view.

  5. Cross-reference shows other views linked to this view by external references

  6. Here are CDS views most frequently used in this enhancement

    I_BUSINESSPARTNER Business Partner
    I_SUPPLIERTOBUSINESSPARTNER Supplier to Business Partner Relationship
    I_SUPPPLIER Supplier
    I_SUPPLIERCOMPANY Company code data of supplier
    I_JOURNALENTRY Journal Entry (Header)
    I_JOURNALENTRYITEM Journal Entry Item

Test your coding

  1. Fill test data into available fields

  2. Scroll down to fill up the field ZBUKR.

  3. You can save your test data as variant and use it later

  4. After entering test data click on button Test and scroll down to see results

  5. Here you can see that our logic works as expected.


Business Partner

Use application Maintain Business Partner to display business partner master data

Display tab Vendor: Correspondence in company code dataField 'Clerk’s Internet Address' contains the email address, which will be exported into payment file.

Create a payment run

Call up the application Manage Automatic Payments.

Create payment run and schedule payments.

Export payment file

Use application Manage Payment Media to export payment file:

Download the file and display the content:

This blog post guided you via the process of custom field setting. Would you like to share more processes description? Share your wishes in the comment section below.

Find out more details in App Documentation.
Read more about Payment Medium Formats and tools associated with them here.
Link to SAP S4HANA Cloud Customer Community (Finance)