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.
cancel
Showing results for 
Search instead for 
Did you mean: 
TrangNguyen
Advisor
Advisor
2,938

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 BAdIs and the functionalities regarding enhancement implementation in Payment Formats in FI-CA.

 Payment process in FI-CA

Business Case


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 use the new BAdIs developed by SAP to create your own enhancement implementation without using implicit enhancement. Within the newly delivered BAdIs, you are eligible to adjust the customer reference fields in order to define your own business logic. Meanwhile, you can also use your custom payment formats and implement it with standard procedure. 

About the BAdIs

The BAdIs supports extensibility in Payment Formats with the help for data collection before reaching the format structured in DMEEX. You can modify the source of data according to the legal requirements defined by specific countries/regions or remarks from customers.
In the enhancement spot ES_FKK_PAYM you can use the following two BAdIs for different purposes:

  • BADI_FKK_ADJUST_PAYM_DATA_C with method FILL_CUSTOMER_REFERENCE_FIELD allows you to fill the specific customer-defined fields.
  • BADI_FKK_ADJUST_PAYM_CUST with method SET_ORIGINAL_FORMAT allows you to reuse SAP delivered payment format implementation to fill “User-Defined Fields".

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. 

Implementation of BADI_FKK_ADJUST_PAYM_DATA_C

By implementing this BAdI, you can fill the specific fields based on your business requirements.

    1. In transaction SE18, enter ES_FKK_PAYM in Enhancement Spot, choose Display.
    2. Creating a new enhancement by right-clicking BADI_FKK_ADJUST_PAYM_DATA_C, choose Create BAdI Implementationthen selectCreate Enhancement Implementation.
    3. 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.
    4. 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.
    5. 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.
    6. 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.
    7. 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
    8. Activate BAdI implementation.
    9. Change Filter Values.
    • Go to Filter Values. Switch to Edit Mode → Choose Combination then add the value.
    • Change value filter
        1. Value 1: Enter the payment format name.
        2. 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.
        3. Filter: Format.
        4. Enter

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 

Implementation of BADI_FKK_ADJUST_PAYM_CUST

This BAdI is only available in SAP S/4HANA Private Cloud Edition and SAP S/4HANA (On Premise).

If you want to create your own payment medium format or reuse the existing payment medium format but change partially based on your legal/ business requirements, complete this BAdI implementation. 

  1. In transaction SE18, enter ES_FKK_PAYM in Enhancement Spot, choose Display.
  2. Creating a new enhancement by right-clicking the BADI_FKK_ADJUST_PAYM_CUST, chooseCreate BAdI Implementation.
  3. Complete the necessary information: 
    • BAdI Implementation: enter name for the BAdI 
    • Description: briefly describe the BAdI 
    • Implementing Class: define implementing class 
  4. Enter to continue the creation. Then you see the window as follow:111.png
    You can either choose the Empty Class or Copy Sample Class to edit your own class. 
  5. Set the Filter Value for the payment medium format.
    • Select Filter Values and click the Value on the screen area.
      112.png
    • Enter the values. See the example below.
      113.png
  6. Reuse the original format:
    • Select the Implementing Class 
    • In the screen area, double click the Method IF_FKK_PAYM_CUST~SET_ORIGINAL_FORMAT and select yes to create the implementation. 
      114.png
    • You are navigated to the source code, implement this BAdI with the original payment medium format.
      115.png
    • Activate. 

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.

    1. 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



3. Create a new enhancement implementation.

Detailed steps are explained in the section Implementation of BADI_FKK_ADJUST_PAYM_DATA_C 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.

SAP Note


You can check the list of SAP notes below to learn more about enhancement spot and BAdI implementation for payment formats in FI-CA:

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.

 

 

 

 

 

 

 

 

 

 

 

 

 

1 Comment