Substitution in SAP FI is done to insert/infuse values into existing set of value(s) in fields. There are many cases where functional consultant don’t want to clutter up things using User-exits and SAP Enhancements. This is one of the best tool/method provided for keeping all the things/coding tidy as far as simple Substitutions are concerned. For complex Substitution, of-course User-exit (within the Substitution) needs to be written down as per requirements.
In this step-by-step document, we will traverse through a simple Substitution case involving Customer User-Exit showing the flexibility of SAP Substitution.
Our Example Case: Substitute ‘Additional asset description’ field (ANLA-TXA50) value with 15 digit code maintained in Key word for G/L accounts in G/L account master.
1. Execute Tcode GGB1 and define the Substitution. Insert step in it.
Here you can define the prerequisite based upon your requirements. In our case lets say we want it in all cases so we left it as blank.
In Substitution step, define the Substitution based on Exits. We have to define our custom Exit in EXIT-Formpool provided by SAP or we can copy the standard and create our own Module Pool for the same. In our case, we have copied FAGGBS0 to ZFAGGBS0 and defined the same in view V_T80D with Application Area as GBLS (Val/sub:Exits for substitution) and Ex.prog. as ZFAGGBS0.
2. In the Module pool, define the exit name in the header in FORM GET_EXIT_TITLES.
and down below in code, we define our code based on our logic as follows:
3. In our last step, we have to activate this Substitution using the TCode OACS (FI-AA View maint. substitutions).
This is the ideal case where we have taken the field which is ‘Active’ for Substitution.
There are times when we need to use the substitutions for particular fields but they are unavailable in Tcode GGB1. This requires a small effort to include the requisite field for Substitution.
1. Check if the field that needs to be substituted is already present in Tcode GGB1 or not.
2. If it is not present, go to SM30 -> table VWTYGB01. Click Maintain.
3. Uncheck the “Exclude” checkbox for the requisite field.
4. Run the program RGUGBR00 via SE38 and click execute.
5. The field will get added to the Substitution Rules.
Hope this helps you in applying Substitution successfully in SAP.