https://www.linkedin.
com/in/mickaelquesnot/
Substitution Rule (User Exit) in FI - FB60 for Partner Bank Type in SAP S/4HANA
Applies to:
Substitution Rule via User Exit in FI Module. For more information visit ABAP Homepage /
https://community.sap.com/topics/abap
Summary
This guide provides the Step by Step procedure on how to implement Substitution Rule for Partner Bank Type in
FI Module during Manage Supplier Invoices app or Create Incoming Invoices (FB60) app. It also shows why
sometimes the value does not get substituted and the Solution.
Defining Substitution Rule
Based on some Conditions when a value needs to be filled in some field dynamically we go for Substitutions. SAP
provides Substitutions for FI module.
Execute GGB1 to define Substitution Rules.
Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/
Twitter @mistersharesap
1|Page
https://www.linkedin.com/in/mickaelquesnot/
Select Line Item and Create Substitution. (Line Item is selected because the partner bank type belongs to Line Item
i.e., BSEG and the field name of Partner Bank type is BVTYP) .
Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/
Twitter @mistersharesap
2|Page
https://www.linkedin.com/in/mickaelquesnot/
Give necessary Description for the Substitution and Create a Step as shown below.
Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/
Twitter @mistersharesap
3|Page
https://www.linkedin.com/in/mickaelquesnot/
Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/
Twitter @mistersharesap
4|Page
https://www.linkedin.com/in/mickaelquesnot/
Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/
Twitter @mistersharesap
5|Page
https://www.linkedin.com/in/mickaelquesnot/
Select Appropriate Field, where the Value needs to get substituted.
Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/
Twitter @mistersharesap
6|Page
https://www.linkedin.com/in/mickaelquesnot/
1. If it is not present, go to SM30. Select the table VWTYGB01. Click on Maintain. For example, say the
field PARTNER BANK DETAIL (BVTYP) needs to be substituted. This field will have the “Exclude” check
box checked. Hence this is not present in the variables that can be substituted.
9 S Refers to fields that can be substituted BSEG BVTYP
Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/
Twitter @mistersharesap
7|Page
https://www.linkedin.com/in/mickaelquesnot/
2. Uncheck the “Exclude” checkbox for the requisite field. Since this field has been excluded, this is not
showing up during the field search in substitution. Save it.
Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/
Twitter @mistersharesap
8|Page
https://www.linkedin.com/in/mickaelquesnot/
Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/
Twitter @mistersharesap
9|Page
https://www.linkedin.com/in/mickaelquesnot/
Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/
Twitter @mistersharesap
10 | P a g e
https://www.linkedin.com/in/mickaelquesnot/
3. Run the program RGUGBR00 via SE38 and execute it. The following showcases the selections that need
to be made for running the program and including the appropriate variables (in this case BVTYP).
Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/
Twitter @mistersharesap
11 | P a g e
https://www.linkedin.com/in/mickaelquesnot/
Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/
Twitter @mistersharesap
12 | P a g e
https://www.linkedin.com/in/mickaelquesnot/
4. The field BVTYP will get added to the substitution rules. Now this can also be used for substitution as
and when required.
This way we can add different fields which may not be available for substitution initially. All the fields that can be
used for substitution, from different tables, are provided in the table VWTYGB01.
Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/
Twitter @mistersharesap
13 | P a g e
https://www.linkedin.com/in/mickaelquesnot/
Once the Continue Button is clicked the following Screen appears.
Specify the type of Substitution. User Exit is chosen when coding needs to be done i.e., Value needs to be derived
based on some Logic.
Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/
Twitter @mistersharesap
14 | P a g e
https://www.linkedin.com/in/mickaelquesnot/
Specify the Prerequisites i.e., only when the prerequisites are met the Substitution will work else it will skip.
Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/
Twitter @mistersharesap
15 | P a g e
https://www.linkedin.com/in/mickaelquesnot/
Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/
Twitter @mistersharesap
16 | P a g e
https://www.linkedin.com/in/mickaelquesnot/
Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/
Twitter @mistersharesap
17 | P a g e
https://www.linkedin.com/in/mickaelquesnot/
Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/
Twitter @mistersharesap
18 | P a g e
https://www.linkedin.com/in/mickaelquesnot/
Specify the User Exit Form name in the below screen.
Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/
Twitter @mistersharesap
19 | P a g e
https://www.linkedin.com/in/mickaelquesnot/
Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/
Twitter @mistersharesap
20 | P a g e
https://www.linkedin.com/in/mickaelquesnot/
Defining User Exit for Substitution
Now the following section explains how to create the User Exit name.
The program ZRGGBS000 should be copied from RGGBS000.For more Information regarding this check the Article
(How to Use Substitution) in the Related Content Section.
Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/
Twitter @mistersharesap
21 | P a g e
https://www.linkedin.com/in/mickaelquesnot/
Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/
Twitter @mistersharesap
22 | P a g e
https://www.linkedin.com/in/mickaelquesnot/
Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/
Twitter @mistersharesap
23 | P a g e
https://www.linkedin.com/in/mickaelquesnot/
Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/
Twitter @mistersharesap
24 | P a g e
https://www.linkedin.com/in/mickaelquesnot/
Enter the Following code in the form GET_EXIT_TITLES.
exits-name = 'UFP04'.
exits-param = c_exit_param_field.
exits-title = text-201. " Partner bank type
APPEND exits.
Here UFP04 is the User Exit name (can give any Name).
In the above Report, the Following code also needs to be entered.
The Form name should be the User Exit name that was declared above.
Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/
Twitter @mistersharesap
25 | P a g e
https://www.linkedin.com/in/mickaelquesnot/
As the Value gets substituted to the field BSEG-BVTYP we should have the exporting field suffixed by 'E_' i.e.,
E_BVTYP as shown below.
* eject
*---------------------------------------------------------------------*
* FORM UFP04 *
*---------------------------------------------------------------------*
* Reads the Bank Details ID table BUT0BK for BP: Bank Details *
* BKVID. *
*---------------------------------------------------------------------*
FORM UFP04 USING E_BVTYP TYPE BSEG-BVTYP.
CLEAR E_BVTYP.
IF BSEG-LIFNR IS NOT INITIAL AND BSEG-BUKRS IS NOT INITIAL.
SELECT SINGLE BKVID FROM BUT0BK INTO E_BVTYP
WHERE PARTNER EQ BSEG-LIFNR
AND BKVID EQ '0002'.
ENDIF.
ENDFORM.
FI-SL: User exit form pool
Definition
The user exit form pool name is entered as a 8-character name. It defines in which form pool system can find
user exits. The name must be entered in every client. You can enter either the same form pool in every client,
Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/
Twitter @mistersharesap
26 | P a g e
https://www.linkedin.com/in/mickaelquesnot/
that means a form pool with user exits in the system, or you can define several form pools that you use
accordingly in the various clients.
Example
If the form pool ' ZRGGBS000' is used in all clients, enter this name in every client in the the table T80D.
Effects on Customizing
An example form pool is delivered with the system. You should copy this form pool, taking into account the user
naming convention. Change the relevant entry in table T80D so that the new form pool is used.
You can edit this form pool and include your own exit routines in the form pool.
Example
Copy RGGBS000 to ZRGGBS000 and change the relevant entry in T80D to ZRGGBS000. If you also want to use
user exits in client 004, you can
1. either enter the form pool ZRGGBS000 also in this client
2. or your create a new form pool and enter these in the table T80D.
Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/
Twitter @mistersharesap
27 | P a g e
https://www.linkedin.com/in/mickaelquesnot/
Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/
Twitter @mistersharesap
28 | P a g e
https://www.linkedin.com/in/mickaelquesnot/
Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/
Twitter @mistersharesap
29 | P a g e
https://www.linkedin.com/in/mickaelquesnot/
Next Settings should be done in OBBH for this Substitution as shown below:
Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/
Twitter @mistersharesap
30 | P a g e
https://www.linkedin.com/in/mickaelquesnot/
Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/
Twitter @mistersharesap
31 | P a g e
https://www.linkedin.com/in/mickaelquesnot/
Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/
Twitter @mistersharesap
32 | P a g e
https://www.linkedin.com/in/mickaelquesnot/
Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/
Twitter @mistersharesap
33 | P a g e
https://www.linkedin.com/in/mickaelquesnot/
Testing and Solution
Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/
Twitter @mistersharesap
34 | P a g e
https://www.linkedin.com/in/mickaelquesnot/
Now let us test this Substitution via FB60 APP.
Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/
Twitter @mistersharesap
35 | P a g e
https://www.linkedin.com/in/mickaelquesnot/
Mandatory Fields Vendor Number, Invoice Date, Reference and Currency needs to be entered.
Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/
Twitter @mistersharesap
36 | P a g e
https://www.linkedin.com/in/mickaelquesnot/
Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/
Twitter @mistersharesap
37 | P a g e
https://www.linkedin.com/in/mickaelquesnot/
Then Select the Payment Tab to see if the Value for Partner Bank Type gets substituted.
But you can notice that Partner Bank Type has not been derived in the below screen.
Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/
Twitter @mistersharesap
38 | P a g e
https://www.linkedin.com/in/mickaelquesnot/
The Reason is "Sometimes for the Substitution to work, all the necessary fields (not only Mandatory Fields, other
Fields as well) should be entered with Values".
Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/
Twitter @mistersharesap
39 | P a g e
https://www.linkedin.com/in/mickaelquesnot/
Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/
Twitter @mistersharesap
40 | P a g e
https://www.linkedin.com/in/mickaelquesnot/
In the Above Screen the Substitution was not called as the Amount field was Empty. In the below Screen the
Amount field is entered, so the Partner Bank type value is substituted automatically.
Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/
Twitter @mistersharesap
41 | P a g e
https://www.linkedin.com/in/mickaelquesnot/
Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/
Twitter @mistersharesap
42 | P a g e
https://www.linkedin.com/in/mickaelquesnot/
Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/
Twitter @mistersharesap
43 | P a g e
https://www.linkedin.com/in/mickaelquesnot/
Manage Supplier Invoices
With this app you can create and display a supplier invoice based on the received document. You can specify
the purchase order items to which your supplier invoice relates. These referenced items can also have
multiple account assignment. You can choose among several assignment options depending on the reference
document category. To identify the most relevant service entry sheet items, for example, you can search by
the service performer and the performance date. If you select the Simulate or Post function, the system
compares the quantity and amount data of each supplier invoice item with the data of the related purchase
order item. If goods-receipt-based invoice verification has been defined for a purchase order item, the
system compares the supplier invoice data with the related goods receipt data. If the deviation is outside
defined tolerances, the invoice is posted, but the invoice is automatically blocked for payment. If the system
determines the responsible person, an approval process is initiated. You can use the Supplier Invoices List app
to display supplier invoices. In the detail view, you can release or reverse a blocked supplier invoice.
Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/
Twitter @mistersharesap
44 | P a g e
https://www.linkedin.com/in/mickaelquesnot/
Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/
Twitter @mistersharesap
45 | P a g e
https://www.linkedin.com/in/mickaelquesnot/
Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/
Twitter @mistersharesap
46 | P a g e
https://www.linkedin.com/in/mickaelquesnot/
Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/
Twitter @mistersharesap
47 | P a g e