SAP Substitutions

Table of Contents

Substitution in SAP

 

What is the substitution

The substitution function can be used to substitute a value to some fields which is included in line item table BSEG or header table BKPF. And the substitutions are valid for both the manual entry of documents and the automatic created entry of documents (for example, payment program).

You can define a substitution via call points (0001 is for substitution in document header level; 0002 is for substitution in document line item level; 0003 is a substitution for a complete document).

The following example explain how to define a substitution by using constant value.

Example: substitute a constant value “XXXX” into BSEG-SGTXT (Text) field in company code 1000.

Creating Finance Substitution

Transaction code: OBBH

IMG Path : SPRO – Financial Accounting – Financial accounting global settings – Document – Document Header – Substitutions in Accounting Document

Create an entry in call point 2, then double click this entry.

Press Substitution button, enter the substitution name in substitution field, press enter, then the ‘TEXT’ is listed under node ‘line items’ in the left Substitutions area as follow:

Press step button, then tick the field into which you want to substitute a value(for this example is BSEG- SGTXT).

Press enter, then select the radio button of “Constant value” if you want to substitute a value into a field, or select the radio button of “EXIT” if you want to substitute a value by a User Exit.

http://wiki.scn.sap.com/wiki/download/attachments/226299663/1.4.jpg?version=2&modificationDate=1299145448000&api=v2

Press “Prerequisite” in the left side under ‘TEXT’ for defining when this substitution works. For this example define a substitution which work when company code = ‘1000’ and user name is EHPUSER478

http://wiki.scn.sap.com/wiki/download/attachments/226299663/1.611.png?version=1&modificationDate=1298624711000&api=v2

Enter the perquisite as shown below. User name field can be found in Structure Syst. Double click it. Now double click SYST-UNAME to enter it in perquisite screen. Select the operator =. Click the constant button and enter constant value EHPUSER478. Now click structure BKPF. Select field BKPF-BUKRS. Enter the company code’1000’ in the constant.

Press ‘Substitution’ in the left side under substitution ‘TEXT’’, define a constant value as “ZZZZ” in text field (BSEG-SGTXT), then save it

Activate this substitution in Tcode OBBH with value ‘1’ (‘0’ means Inactive; ‘1’ means Active; ‘2’ means Batch input processing):

 

Testing the substitution

Post an FI document in transaction F-02 and verify whether Text field is populated with ‘ZZZZ’

Please note if the substitution is not working, regenerate the substitution in the program# RGUGBR02. For this go to transaction code SE38. Enter the program# RGUGBR02 and execute.

Facebook
Twitter
LinkedIn

1 thought on “SAP Substitutions”

  1. Pingback: Course Material - AIERP1

Leave a Comment

Your email address will not be published. Required fields are marked *

error: Content is protected !!