BAdI for Interest Rate Calculation in Treasury Management

SAP Treasury Management

How to change the Interest Rate in Tx FINT?

To achieved this we need to implement  BAdI ZFI_INT_CUS01 using the method Int_Change_Items.

Let's say the requirement specified to change the Interest Rates based on the document type.
If BLART equal to 'MD', interest rate would be '10'. If it's 'DA', interest rate would be '6'.

We will be dealing with the following transaction, implementation and interface.
1) SE19 - BAdI
2) FI_INT_CUS01 - Definition
3) Method - IF_EX_FI_INT_CUS01~INT_CHANGE_ITEMS
4) Interface - INT_CHANGE_ITEMS

Here is the code snippet to change the interest rate.
*/------------------------------------------------------------------------
method IF_EX_FI_INT_CUS01~INT_CHANGE_ITEMS .
*/------------------------------------------------------------------------
*break-point.
Data: wa_Items Type intit_extf.

Loop at ct_items into wa_Items.

     if wa_Items-blart eq 'MD'.
        wa_Items-int_rate = '10'.
        Modify ct_items From wa_Items.

     elseif wa_Items-blart eq 'DA'.
        wa_Items-int_rate = '6'.
        Modify ct_items From wa_Items.

     endif.
Endloop.
      
endmethod.
*/===================================================


And here is the STEP-BY-STEP in creating BAdI.
Step 1. Execute Tx SE19 and provide the Implimentation name.
Here, I used ZFI_INT_CUS01_2 and click CREATE button.
 SAP ABAP BADI Interest Rate Calculation Treasury Management

Step 2. Input the Definition "FI_INT_CUS01" and click Ok.
 SAP ABAP BADI Interest Rate Calculation Treasury Management

Step 3. Provide the Implementation short text and double click on the Name of implementing class (ZCL_IM_FI_INT_CUS01_2). It will proceed to SE24 (Class builder).
 SAP ABAP BADI Interest Rate Calculation Treasury Management

Step 4. In the Class builder, just click the SAVE button and activate it.
 SAP ABAP BADI Interest Rate Calculation Treasury Management

Step 5. Click the OK button to activate and click the BACK button.
 SAP ABAP BADI Interest Rate Calculation Treasury Management

Step 6. In BAdI, click on the Interface tab and double click on the INT_CHANGE_ITEMS. It will proceed to the method IF_EX_FI_INT_CUS01~INT_CHANGE_ITEMS. Please refer to the code snippet  Click SAVE and ACTIVATE the method.
 SAP ABAP BADI Interest Rate Calculation Treasury Management

Step 7. Activate BAdI. To check if it works, just put break point inside the method.
 SAP ABAP BADI Interest Rate Calculation Treasury Management

That's it.


Happy Abaping!



Comments

  1. Hello can if this is the way also to add additional field in table INTIT_EXTF ? If no kindly asnwer if how to add field. thanks

    ReplyDelete
  2. Sounds nice. If you want and get updated with the best Treasury Management in Chicago, get a quote with Lakeside Bank Chicago. As the Lakeside Bank in Chicago provides topnotch services on Treasury Management. For more, call (312) 435-5100.

    ReplyDelete
  3. Badi's interest rate calculation system is commendable. It simplifies and streamlines the process, ensuring accuracy and transparency for users. Anime Watch Way Appreciating the efficiency and reliability it brings to financial calculations.

    ReplyDelete

Post a Comment

Popular posts from this blog

SAP ABAP: Capturing CHECK BOX event in FM REUSE_ALV_GRID_DISPLAY / Cell Editing

SAP ABAP: Smartforms/SAPscript formatting

SAP ABAP: Adding leading zero to char or string.