SAP limits the number of fields that you can use for substitution. If you want to use a field that SAP does not make available for substitution, you have to modify table GB01. Sometimes you can use transaction SE16 to make the modification, but more often you have to create a Z-program. An example shows how to make a G/L account available for line-item substitution.
Key Concept
You can use substitution as a method to change the data in general postings according to a company’s requirements. It enables you to replace data derived by standard SAP with the data you need. You can use substitution in several places, including Controlling, G/L accounting, and cost of goods sold accounting. You can use substitution at different levels. Within G/L accounting you can use three levels: header level, item level, and the complete financial document. For each of these levels, SAP has selected specific fields that you can change using substitution.
SAP developed substitution to help you post the correct data in financial areas such as Cost Center Accounting (CCA) and Profit Center Accounting (PCA) by substituting one field for another. However, in some cases standard substitution functionality doesn’t allow you to change a field. I’m going to show you how to use the GB01 table to produce the results that you need.
First I’ll give you an example of a business situation in which you can use standard substitution functionality. Then I’ll show you another scenario involving G/L account number BSEG-HKONT in which you cannot. I’ll walk you through a method to make it available for substitution.
Let’s say that a company organized its PCA according to business lines. For example, when more than one business line, such as retail or wholesale, sells a product, the revenue must go from FI to the profit center belonging to the selling business line. In standard SAP, the revenue transfers to the profit center of the material master of that product, so you cannot distinguish between profit centers. You can solve this issue by substitution: Based on the sales area, which in this situation is a business line, you post the revenue to the correct profit center by replacing the default profit center from the material master with the profit center of the business line. Therefore, if the retail business line sells a product, it must be reported on the retail profit center. If wholesale sells it, it is reported on the wholesale profit center.
While in the above scenario the system allows you to use substitution to get the desired result, in the next example it does not allow you to change the field to see the value you want. When a company code buys materials from another company code you use intercompany billing. The delivering company code (the company code that delivers the products to the end customer) sends out an invoice in the form of an IDoc to the buying company code. This is the company code that sells to the end customer. The buying company transforms the IDoc into an incoming invoice.
Standard SAP functionality enables you to post the costs of the bought material to a fixed G/L account only. Let’s say the company wanted to post the costs to different accounts depending on the reason the goods were bought, which is part of the IDoc information. It could not do so.
How to Change the Settings Controlling Substitution
You can use the following method to make such a field available for substitution. Using the example of the G/L account number BSEG- HKONT, I’ll show you how to make it available for substitution in the financial posting item, and the end result of such a substitution. As the IDoc example would be too complicated to set up within the scope of this article, I’ll use a simple example of replacing one cost account with another, so that you post the costs on
the appropriate cost center.
I will explore this process in three parts: First, I’ll look at the SAP table controlling substitution, then I’ll examine the standard available fields when setting up substitution, and finally I’ll show you how to change the settings controlling substitution.
Five Fields Related to Substitution
The GB01 table controls which fields you can use for substitution (Figure 1). You cannot access table GB01 via the IMG customizing menu path. You only can use transaction SE16 to display or maintain the table. Because you only want to make the field BSEG- HKONT available for substitution, you restrict the display of table GB01 to the entries related to table BSEG. Each record of the GB01 table consists of five fields: BOOLCLASS, CLASSTYPE, BCLTAB, BCLFIELD, and BEXCLUDE.

Figure 1
Table GB01 controls the fields available for substitution. The BEXCLUDE field, together with all the other fields, determines whether you can substitute a field.
Here’s a brief explanation of the purpose of these fields:
- BOOLCLASS determines the level of substitution. The level determines what the system checks before making a substitution: For example, for line item substitution the system checks the data of each individual line item; for header substitution the system only checks the data of the financial document header. In Figure 1 you only see entries with value 009. This value determines the relevance of this entry for line item substitution. Value 008 represents the document header.
- CLASSTYPE determines whether you can use the table entry for substitution, usage within rules — Boolean statements used in substitution and validation to check prerequisites — or both. Value S means for substitution only, value B means Boolean statement, and value A means both. Since in my example I want to substitute the G/L account, I can select only value S.
- BCLTAB contains the name of the table holding the field to be substituted. Because of the distinction I made in SE16, BSEG is always the table name. Table BSEG contains the line items of a financial document. Because I want to substitute the G/L account in a line item of a posting, I restricted the selection to this table.
- BCLFIELD contains the technical name of the field to be made available for substitution.
- BEXCLUDE indicates whether a field is available for substitution or not. A blank value defines the field as available; value X determines that you cannot use the field for substitution.
As you can see in Figure 1 the first entry for the BSEG table contains value * in column BCLFIELD, and a blank value in column BEXCLUDE. If this were the only entry from BSEG, you could use substitution for all fields of BSEG. However, you cannot use substitution for BSEG fields with an entry X in BEXCLUDE. For each table that you want to use within substitution you must have a similar entry with the wildcard * in the column BCLFIELD and a blank in the column BEXCLUDE.
Figure 1 shows that you can use only field BSEG-ABPER for substitution; you cannot use other fields because they have an X in the BEXCLUDE column. In Figure 2 you can see the standard available entry for the field BSEG- HKONT, meaning that you cannot use this field for substitution.

Figure 2
Entry in table GB01 for the field BSEG-HKONT
Standard Available Fields for Setting Up Substitution
In my example, I set up substitution using transaction OBBH, or you can access it via IMG menu path Financial Accounting>Financial Accounting Global Setting>Document>Line Item>Define Substitution in Accounting Documents. You can see the standard available fields for substitution in Figure 3, which shows that you cannot use field BSEG-HKONT. The fields appear in alphabetical order, so if HKONT were available for substitution it would be listed between GRANT_ NBR and HZUON.

Figure 3
Setting up substitution for line items as provided by standard SAP
On top of the pop-up screen you can see the class type 009, which is the value used for the entry in table GB01 (Figure 2).
Note
When you use substitution, you must make sure that you don’t create inconsistent data. For example, don’t replace the profit center allocated to a specific cost center with another profit center. Inconsistent data makes it impossible to reconcile the data, for example, between PCA and CCA.
Note
There may be good reasons why you cannot use specific fields for substitution in the standard settings of SAP. Although I haven’t had any problems changing the settings, you always should test the modifications you make carefully. You also should check the results, especially within Controlling and PCA.
Changing the Settings
To make BSEG-HKONT available for substitution, you must take out the X in the BEXCLUDE column in the entry in table GB01. Because you cannot access table GB01 via Customizing, you need a program to change it. You can use transaction SE16 to make the changes in the table. However, if you can use SE16 to change table GB01, then you can use it to change all tables. As this is not a desired situation, SAP usually disables the possibility to modify tables via SE16. If this is the case with your system, you have to create a Z-program that enables changing table GB01. See Figure 4 for the coding of such a program, in this case called ZGB01. This report allows you to add or modify entries in table GB01.
Once you have saved the modification of table GB01, you can use BSEG- HKONT in substitution, as shown in Figure 5.

Figure 5
Set up substitution for line items after you change GB01
Now that you have made BSEG- HKONT available, you can set up the complete substitution. The example in Figure 6 shows the substitution I defined within company code BSEG-BUKRS 1000. In case a line item of a journal entry contains both G/L account number 400000 (i.e., BSEG- HKONT = 400000) and the cost center 1000 (i.e., BSEG-KOSTL = 1000), then you should make the posting on G/L account 403000.

Figure 6
Example of a substitution of a G/L account number
In Figure 7 you see an example of a journal entry for company code 1000, using G/L account 400000 along with cost center 1000. In this case you can make the posting using transaction FB50.

Figure 7
Create a posting with transaction FB50
Before you save the posting, click on the Simulate button to ensure the system creates the posting. In Figure 8 you can see that indeed account number 403000 substitutes account number 400000, which is the substitution that should take place.

Figure 8
Simulate the posting with transaction FB50
Whenever you make a change in table GB01 you should test any substitution carefully using the newly available field. You should check all the financial documents that the system generates automatically when you save a journal entry.
Kees van Westerop
Kees van Westerop has been working as an SAP consultant for more than 25 years. He has an MBA degree in mathematics and a degree in finance. Kees has been concentrating on the financial modules, especially in general ledger accounting, cost center accounting, and consolidation. He also has a great deal of experience with rollouts of kernel systems and integrating finance and logistics.
You may contact the author at keesvanwesterop@hotmail.com.
If you have comments about this article or publication, or would like to submit an article idea, please contact the editor.