Variable field movements in FI
Sometimes we need to modify standard SAP transactions in FI for field movements . This blog is intended to provide a step by procedure of user exit creation for this field movement to occur instead of modifying standard SAP programs with an example scenario.
Example Business Scenario Company A has created a special purpose ledger (ZZHYP say) would like to populate 4 digit trading partner(VBUND) in the special purpose ledger .The field will only be used for reporting and is only needed in the Special Purpose Ledger. But the available data or the current values are present in 3 digits only. So Company A would like to change the entire 4 digit trading partner populated from FI to 3 digit trading partner in the special purpose ledger.
For this purpose, a standard sap modification has to be done, but SAP allows you to enhance FI/CO features without modifying the standard code which are often collectively referred to as “user exits,” SAP Enhancements are used to expand the standard functionality within SAP. Enhancements use function modules and are called from the standard SAP code. Each module in the system has a set of delivered enhancements that help companies expand the standard functionality where they need it. So here we create a Z program to insert our code for changes that has to be done and customize it. Hence when the data flows from FI to SPL, it will pass through the user exit that we have created to get the required result.
To accomplish this requirement, Company A will use the Variable Field Movement User Exit.
1. Copy the delivered template User Exit program RGIVU000_TEMPLATE into a “Z” program.
Follow menu path Tools->ABAP Workbench->Development->ABAP Editor (transaction code SE38).
2.You will be prompted for a development class and a transport. Create a transport request and assign the program to it.
3. At the initial ABAP Editor screen, enter your new “Z” program name, select the Source Code button and click on Change.
4.Enter the following code in the User Exit:
FORM E10_MVC USING FROM_FIELD TO_FIELD.
*get the 3 digit TP from custom table ZGTFIN_HYPER_TP
SELECT SINGLE zvbund_new FROM zgtfin_hyper_tp
WHERE vbund = from_field.
This implies data is selected from a ztable and passed to to_field which is the required output i.e. 4 digit trading partner .Here you can mention your own logic to populate the output data.
This logic inside the program is used to put the logic for populating the field say trading partner.
Since the 4 digit trading partner which is the required output is available in zgtfin_hyper_tp table, a select statement is used to get the 4 digit trading partner for the input 3 digit trading partner.
To_field represents the output.From_field represents the input.
You may require the help of an Abaper for coding.
5. Activate the program by clicking on the Activate button.
6. Change the configuration in the User Exit table to point to your new “Z” program.
7. Follow the IMG menu path:
Financial Accounting ->Special Purpose Ledger-> Basic Settings->User Exits
->Maintain Client Specific User Exits.
8.The entry to maintain is application area GIMV: Variable Field Movement. Enter your “Z” program.
9.Save the changes.
10. The final configuration step is to assign the User Exit in the variable field movement for your special ledger table.
In the IMG: Financial Accounting -> Special Purpose Ledger ->Basic Settings ->Master Data -> Maintain Field Movements.
Field movements control how the fields in a special ledger table are populated. They can be populated straight from other fields in a posting or through User Exits.
11.Assign the business unit field as a receiver and the G/L account as the sender. The Exit field should contain U10.
12. The User Exit number U01 calls User Exit E01_MVC form in the “Z” program.
13. Save the field movement.
14. You are ready to test your User Exit!Now you can set the breakpoint in the program and execute the transaction for FI to SPL say GCU1 if you want to debug the code.
Ø Standard SAP functionality can be enhanced without modification to the standard code.
Ø Upgrades do not erase the functionality and it does not have to be re-transported or re-entered into the system. The enhancements should be thoroughly tested when upgrading to ensure the system will still work as implemented.