Friday, April 7, 2017

Substitutions in FICO

Substitutions in FI-SL can be accessed via transaction Code: GGB1 

Let's take simplest of scenario to understand how substitution works from a technical point of view. 
Objective: Substitute value of field BSEG-SGTXT in transaction FB01.

Follow the customizing menu or enter transaction code GGB1
Customizing Menu



First and foremost step is to understand what is the call-up point. Where do we add substitution in the menu shown on the left navigation panel.

In our case we need to substitute line item field (BSEG-SGTXT) of FI document so we will select 'Financial Accounting' -> Line Item for creation of substitution (this is our call-up point).


Create 'Substitution' using the Application toolbar. Enter desired name and then click on 'Step'.

If Substitution already exists (ZUS00, in our case) then click on 'Step' (Application toolbar). 

Step creation will prompt you to Select field for substitution.

Select field BSEG_SGTXT
Transaction: GGB1




















When you expand 'Step 001', you will see:

  • Pre-requisite: These are meant for adding conditions for substitutions. The substitution will occur only when defined pre-requisites are met. 
  • Substitution: For adding substitution we have 3 methods, explained in the next section.

Method 1: Constant Value

The simplest of all 3 methods. This method will update the value of field SGTXT with a constant value.


Give the name for Step


Enter 'Substitution Demo' in the space given for constant value.
Save changes.

Go to FB01 -> Enter line item details -> Field Text (SGTXT) is updated with constant value ‘Substitution Demo’ automatically as shown below:







Method 2: Field - Field Assignment

Now we will substitute the contents of field BKPF-XBLNR to the field BSEG-SGTXT



Enter the field name for substitution, BKPF-XBLNR



Go to transaction code FB01.

Enter text 'Substitution' in the reference field (BKPF-XBLNR) 


























Hit Enter for the line item, you will see that the field 'TEXT'(BSEG-SGTXT) is automatically updated with the 'Reference' field value.























Method 3: Exit


























To use this method, we need to create a copy of report RGGBS000 (say, ZGGBS000) and configure the copied report in customizing table T80D.

Note: A copy of program RGGBS000 might already be present in the system. So before you create one again, go to table T80D and check if you already have a copy of RGGBS000 in the system. If yes, use that copy program for further steps and skip adding entry in customizing table T80D.

Now, open the copied report ZGGBS000 and add entry for exit U999 in the form 'GET_EXIT_TITLES' as follows:
FORM get_exit_titles TABLES etab.
...
exits-name   =  'U999'.
exits-param   = C_exit_param_none.
exits-title       =  'Substitution'.
APPEND exits.
...
ENDFORM.

Add form U999 in the user exit. 

FORM U999.
bseg-sgtxt = 'SUBSTITUTION'.
ENDFORM.

Go to FB01 -> Enter details -> Hit enter for line item.
Here you'll see field Text (SGTXT) is updated with constant value ‘SUBSTITUTION’


Voila! You are good to go now and explore on your own...

P.S. For calling substitution in FB01, the created substitution must be configured in transaction OBBH.

No comments:

Post a Comment