0% found this document useful (0 votes)
41 views5 pages

How To Use Substitution Method in SAP FI

The document explains the Substitution Method in SAP FI, which is used to validate or pass values during data entry. It outlines the steps to create a substitution method, including setting up substitution settings, creating an exit in the RGGBS000 program, and implementing the logic to pass values at runtime. Finally, it emphasizes the importance of checking the exit program configuration before execution.

Uploaded by

msafwat0777
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views5 pages

How To Use Substitution Method in SAP FI

The document explains the Substitution Method in SAP FI, which is used to validate or pass values during data entry. It outlines the steps to create a substitution method, including setting up substitution settings, creating an exit in the RGGBS000 program, and implementing the logic to pass values at runtime. Finally, it emphasizes the importance of checking the exit program configuration before execution.

Uploaded by

msafwat0777
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

How to use Substitution Method in SAP FI?

Substitution method used in SAP FI

Substitution method is used in SAP just like VOFM routine used in SAP SD. This helps us to validate or
pass some values to SAP at the time of data entry in SAP system.

It's very simple to create a substitution method in SAP system. We just need to follow following steps.

1. Execute t.code 'OBBH' to setup substitution settings. This will ask to maintain following entries in as
shown in screen shot.

Maintain 'Company code' for which it's going to be used. Then maintain 'Validation/Substitution callup
point' as per requirement.

After this enter this substitution and double click on it to create a new one.
After this create a step for Exit or field assignment as per requirement.

We can select a single or multiple fields for substitution.


After this pass the Exit Name.

Note: Before we pass the Exit Name, we need to create the Exit in RGGBS000 program. This is given in
later part of this blog.
Now we need to make sure that our exit should work for a specific condition only. For this 'Prerequisite'
section is provided. Pass your fields name from the 'Table fields' tab and its value as shown below.

Now maintain the routine U903 in program RGGBS000.


Open the program RGGBS000 in ABAP Editor. Go Inside routine 'GET_EXIT_TITLES'. Create and
enhancement and add the following code.

exits-name = 'U903'.

exits-param = c_exit_param_field. "c_exit_param_none . "

exits-title = 'Shipment Cost Material Derivation'.

APPEND exits.

* end of insertion

REFRESH etab.

LOOP AT exits.

etab = exits.

APPEND etab.

ENDLOOP.
This will add your exit name in Exit internal table 'ETAB'. After this call your subroutine as shown below.
Here I am using my exit to pass material and profit center at run time.

FORM U903 USING bseg-matnr.

DATA: l_matnr TYPE matnr,

l_werks TYPE werks_d,

l_vbeln TYPE vbeln,

l_PRCTR TYPE PRCTR.

CLEAR: l_PRCTR,l_matnr,l_vbeln,l_werks.

*Get Delivery

SELECT SINGLE vbeln FROM vttp INTO l_vbeln

WHERE tknum = BKPF-XBLNR.

IF sy-subrc eq 0.

*Get the Material from LIPS

SELECT SINGLE matnr werks

INTO (l_matnr, l_werks )

FROM lips

WHERE vbeln = l_vbeln.

IF sy-subrc eq 0.

BSEG-matnr = l_matnr.

*Get Profit Centre

SELECT SINGLE PRCTR INTO l_prctr

FROM marc

WHERE matnr = l_matnr

AND werks = l_werks.

IF sy-subrc eq 0.

BSEG-PRCTR = l_PRCTR.
ENDIF.

ENDIF.

ENDIF.

ENDFORM.

Now Save and activate your program. Now your exit U903 is ready to use.

before executing your program just check whether your Exit program is configured in your config or not.

Execute the T.code 'GCX2'. it will display your exit program for the respective application area.

Now we can test and our exit will work at run time and pass the material and profit centre value using
substitution method U903.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy