Enhancement Implementation in Payment Formats in Contract Accounts Receivable and Payable (FI-CA)
In SAP, we are delivering solutions for processing credit transfer and direct debit requests to simplify your communication with banks using SAP S/4HANA via Payment Formats. With Payment Formats, you can flexibly adjust the content of payment media file as needed. You can find out further details related to Payment Formats in SAP here, focusing on Outgoing Formats sections. About Payment Formats in FI-CA, refer to the blog post Payment Formats in Contract Accounting in SAP S/4HANA to learn more.
In this blog post, you can learn about the newly developed BAdI and its functionality regarding enhancement implementation in Payment Formats in FI-CA.
Payment process in FI-CA
Please note that the payment process explained in the diagram is not valid in SAP S/4HANA Cloud yet due to the missing possibility to create a new payment format (tr. FQP3). It will be available in the near future releases.
Previously, the enhancement spot can be implemented by following implicit enhancement which is predefined by SAP in the source code. By following the implicit enhancement, customers have to compose their own solutions in ABAP language with specific requirements. However, from now, you can utilize new BAdI developed by SAP to create your own enhancement implementation without using implicit enhancement. Within the newly delivered BAdI, you are eligible to adjust the customer reference fields in order to define your own business logic.
About the BAdI
The new BAdI supports extensibility in Payment Formats with the help for data collection before reaching the format structured in DMEEX. By using this BAdI, you can easily modify the source of data according to the legal requirements defined by specific countries/regions or remarks from customers. The new BAdI is stored under ES_FKK_PAYM enhancement spot, which is triggered from the events. The events are being called in the report SAPFKPY3.
Within the BAdI, you can modify ZREF fields in FPAYHX structure and ZREF fields in paid item structure (FPAYP). For adjusting the payment item, the BAdI offers you 10 user Z REF fields range from ‘ZREF01’ to ‘ZREF10’, each consisting of maximum 132 characters. Therefore, you can implement the enhancement for payment formats by filling those customer reference fields in the Z namespace. Visit this blog post – How to export a custom field (e-mail) in the payment file to learn more about customer reference field and the process to export it into payment file.
On-Premise Enhancement Implementation
- In transaction SE18, enter ES_FKK_PAYM in Enhancement Spot, choose Display.
- Create new enhancement
- Right-click on the report named BADI_FKK_ADJUST_PAYM_DATA_C, choose Create BAdI Implementation then choose Create Enhancement Implementation.
- Fill in the name for your new enhancement in Enhancement Implementation field and a brief explanation in Short Text → Enter to create a new enhancement.
- After that, you will see Object Editing: Initial Screen pops up to inform that enhancement object is saved in customer namespace. Enter to continue creation.
- In the Create Object Directory Entry dialog box, save your entry locally in Local Object → Press Now your new enhancement is generated in the Enhancement spot.
3. Create BAdI implementation
- Double click on new enhancement generated. Complete all essential information:
BAdI Implementation: enter name for the BAdI
Description: briefly describe the BAdI
Implementing Class: define implementing class
- Enter to continue creation.
4. Modify the Enhancement Implementation
In order to modify the enhancement implementation, you need to compose your own code and define your own logic.
- To write your own code, double click on Implementing Class → Choose method IF_FKK_PAYM_DATA_C~FILL_CUSTOMER_REFERENCE_FIELD → Write your own implementation.
You can also refer to the sample code provided by SAP through Example classes. Example classes can be found under Enhancement spot ES_FKK_PAYM → BAdI Definition BADI_FKK_ADJUST_PAYM_DATA_C → Implementation Example Classes CL_FKK_PAYM_IMP_C_EX
5. Activate BAdI implementation
6. Change Filter Values
- Go to Filter Values. Switch to Edit Mode → Choose Combination then add the value.
- Change value filter
- Value 1: Enter the payment format name.
- Comparator 1: Specify condition as ”=” to apply payment format, which means that if the format matches the payment format name, the method will be executed.
- Filter: Format.
Now you have your new BAdI implementation created. To generate a payment medium format file, link the standard DMEEX tree to the newly created payment format and assign it to a payment method. Further details about the process can be obtained in blog post Payment Formats in Contract Accounting in SAP S/4HANA
Sample of using BAdI Implementation
Here is a concrete example to create a new payment format using BAdI implementation and how it influences payment media file.
- Create DMEEX Child Tree
- In transaction DMEEX, enter Tree Type and Format Tree then choose Copy to duplicate the original Format Tree.
- Enter a name for the DMEEX child tree → Copy as a Child → Copy
- Define node: You can choose either to redefine the existing node or create a new node.
- To modify the existing node, use redefine function.
- To create a new node: Right click → Create → Create Element. After that, add the source of the node to map Structure and Field Name.
2. Create payment format
- Call transaction FPQ3. Type format name → Copy.
Please be aware that payment format must have the same name as DMEEX tree.
- Copy payment format
Detailed steps are explained in the section On-Premise Enhancement Implementation above.
4. Assign new payment format to payment method
In transaction FQP1, link newly created payment format to payment method.
5. Post document with proper payment method (for example transaction FPE1)
6. Create payment run (transaction FPY1) to test the solution.
7. Check content of the file (report SAPFKPY3 – download the file)
Now you can see the email is exported into the payment file.
You can check the list of SAP notes below to learn more about enhancement spot and BAdI implementation for payment formats in FI-CA:
- About the prerequisite object, please refer to 3270922 – Payment Formats: Extensibility for customers enabled – Prerequisite objects.
- To implement your solution for payment formats in FI-CA, please refer to 3257490 – Payment Formats: Extensibility for customers enabled.
Do you have any further questions regarding our new BAdI implementation in Payment Formats in FI-CA? Do not hesitate to leave your comments in the section below.