IFRS Technical Requirement
- RECN is the main transaction which is used to create leasing contracts in the SAP system. SAP has provided an standard BADI to meet if any custom requirements. BADI_RECN_CONTRACT is the name of the BADI.
- In this BADI there is a method named SUBSTITUE which is called only two time one when contract is started and second when contract is saved. This BADI have the complete data of contract available
- To access the data in this BADI you need to pass the io_object in FM API_RE_CN_GET_DETAIL you will get all the data of various tabs from the buffer. Depending on the requirement you can make change in the data.
- Once you have made the changes in the data then you need to update that data in contract which can be done by calling another FM API_RE_CN_CHANGE and filling it structure for which the Data need to be changed. Remember to pass the Indicator fields for update in structure.
- Leasing solution SAP has also provide an integration from the RECN IFRS/leasing Contract Transaction to create the Asset. SAP creates an asset with basic information, if you wish to add any information or make anything default SAP BADI BADI_RECE_ASSET_ACCOUNTING.
- There is another BADI BADI_RECA_BUSINESS_DATE, this BADI is useful in the case of IFRS/Leasing Contract due date calculation. You can add a custom logic to change the dates of payment which are calculated from the Condition Tab(Frequency).
- For the Finance Interface SAP has Provided the BADI BADI_RE_EX_FI (SE18 Enhancement Shot) , BADI_REEX_FI_BAPI(Method BAPIDOC_MODIFY) This is very user BADI it is kind of Interface between the Finance posting and RE or IFRS module. You get both the data in this BADI RE/IFRS related and Finance data filled in the table of BADI. In this BADI you can make change as your wish If you are using multiple Business Area in single contract you have to make changes in this BADI to post the data in different Business Area, you can push your cost centers etc in nut shell all data related to Finance can be changed in this place.
- Internal Table IT_RE_ITEM might play an Important role when it comes to logic for FI Integration.
- In IT_RE_ITEM there is a field OBJNRCALC which can be used to select the Object in the contract Database Table VIBDCNSUBJECT will have the costcenters for the line item.
- There is table CT_BAPI_ITEMS_GL which has the GL data which is getting posted, in this table Field ITEMNO_ACC = IT_RE_ITEM-REFITEMNO, this provides you the major link between the Contract and the finance data you are trying to post.
- CT_BAPI_ITEM_AP is the table for AP document details such Vendor code Buiness Area Etc, it have the link with contract with key field ITEMNO_ACC = IT_RE_ITEM-REFITEMNO.
- In case of Valuation posting as well this BADI is called. In that case there is a field VALOBJ_ID in the table CT_BAPI_ITEMS_GL . Which will be helpful in selecting the data from the contract. Below Logic is helpful:-
from VIBDOBJASS as A
inner join VICERULE as b on
a~objnrtrg = b~objnr
inner join VIBDCNSUBJECT as c on
c~objnr = b~objnr
into table it_tab
where objnrsrc = CT_BAPI_ITEMS_GL- VALOBJ_ID
- Last in the list is Foreign Currency. SAP has Provided a BADI BAPI_RECA_CURRENCY_TRANSLATION You have two method in this BADI.
- TRANSLATE_CURRENCY_BY_OBJNR :- This Method work on the contract Condition tab rate calculation. When we implement this method in Condition tab simulation button the new Exchange rate and Amount which are passed from BADI are displayed. Like wise posting will be also done.
- There is a instance IO_OBJECT which is mostly filled when we come into this BADI this is a detail of Contract. The Same Method works when you are doing the Vendor posting RERAPP but in that case the IO_OBJECT will be blank. Then what to do J, you have other option to get the contract details in this case you need to call class CF_RECA_BUS_OBJECT=>FIND_BY_OBJNR Exporting ID_OBJNR and Importing LO_OBJECT. (LO_OBJECT TYPE REF TO IF_RECA_BUS_OBJECT)
- From the above step you will get the contract details now you have to call the FM : API_RE_CN_GET_DETAIL it will give you the complete details of the contract(from Buffer as well).
- In IFRS case Calculation Rules are need to be entered long the Tax code in the Contract and system takes the exchange rate type from that Config (M or CBR). The mapping between the Calculation Rule and Exchange Rate type in maintained in the table TIVCACTRULE.
- Once you got the Type of Exchange rate you wish to use then You can call the BAPI BAPI_EXCHRATE_GETCURRENTTRATES to get the exchange rate based on the you wish to calculate.
- After which you need to update CD_RATE (Exchange Rate) and CD_AMOUNT with the amount. FM CONVERT_TO_LOCAL_CURRENCY will be helpful in translating the amount by passing the ID_AMOUNT and CD_RATE(currency from to etc.
- TRANSLATE_CURRENCY_BY_PSTNG :- This Method will work on the Valuation calculation of the contract. But there is small issue with this method unlike the above method it don’t show the rate and amount in simulation(When you click to calculator button in Valuation tab. But when the actual posting is done the Finance entries will get posted perfectly. Technically the Logic remains same as of above.