Вы находитесь на странице: 1из 6

Welcome, GuestLogin Register Gettin g Started Newsletters Store Solutions SAP Services & Support About SCN Downloads

Guest Login Register Gettin g Started Newsletters Store Solutions SAP Services & Support About SCN Downloads

SolutionsGuest Login Register Gettin g Started Newsletters Store SAP Services & Support About SCN Downloads Industries

SAP Services & SupportRegister Gettin g Started Newsletters Store Solutions About SCN Downloads Industries Training & Education

About SCNNewsletters Store Solutions SAP Services & Support Downloads Industries Training & Education Partnership

DownloadsStore Solutions SAP Services & Support About SCN Industries Training & Education Partnership Developer

IndustriesSolutions SAP Services & Support About SCN Downloads Training & Education Partnership Developer Center Lines

Training & EducationSAP Services & Support About SCN Downloads Industries Partnership Developer Center Lines of Business University

PartnershipAbout SCN Downloads Industries Training & Education Developer Center Lines of Business University Alliances

Lines of BusinessTraining & Education Partnership Developer Center University Alliances Events & Webinars Innovation How to

University AlliancesEducation Partnership Developer Center Lines of Business Events & Webinars Innovation How to define a

Events & WebinarsDeveloper Center Lines of Business University Alliances Innovation How to define a substitution in FI with

InnovationLines of Business University Alliances Events & Webinars How to define a substitution in FI with

Added by Gladys Xing, last edited by Gladys Xing on Aug 15, 2011

1.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).

2.How to define a substitution?

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 ) in Tcode OBBH, and via the prerequisite, you can know when the substitution works. For example, if call up point = '0002', and prerequisite is user name = 'XXXX', substitute 'AAAA' into BSEG-SGTXT field. then the 'AAAA' will be substituted into SGTXT field when FI document is posted by user "XXXX" For the detail please refer to IMS activities.

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

Example: substitute a constant value “AAAA” into BSEG-SGTXT( Text) field in company code Z013 by user I028612.

(1) In Tcode OBBH, create a entry in call point 2, then double click this entry.

a entry in call point 2, then double click this entry. (2) Press Substitution button, enter

(2) Press Substitution button, enter the substitution name in substitution field, press enter, then the 'TEST' is listed under node 'line items' in the left Substitutions area as follow:

items' in the left Substitutions area as follow: (3) Press step button or (CTRL+SHIFT+F5). then tick

(3) Press step button or (CTRL+SHIFT+F5). then tick the field into which you want to substitute a value( for this example is BSEG- SGTXT).

10/18/12

SAP Community Network Wiki - ERP Financials - How to define a substitution in FI with an example.

- How to define a substitution in FI with an example. (4) Press enter, then select

(4) 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.

if you want to substitute a value by a User Exit. (5) Press enter, the following

(5) Press enter, the following screen is displayed.

Exit. (5) Press enter, the following screen is displayed. (6) Press "Prerequisite" in the left side

(6) Press "Prerequisite" in the left side under 'TEST' for defining when this substitution works

'TEST' for defining when this substitution works For this example I define a substitution will work

For this example I define a substitution will work when user name = I028612' and company code = 'Z013').

A:Double click the Structure SYST( because user name field is in this table):

Structure SYST( because user name field is in this table):

10/18/12

SAP Community Network Wiki - ERP Financials - How to define a substitution in FI with an example.

B:The find the SYST-UNAME field, and double click it:

B:The find the SYST-UNAME field, and double click it: C:Press ' = ' in the status

C:Press ' = ' in the status part (there are others like ' <> ' , ' And ' , ' Or ' ext.):

<> ' , ' And ' , ' Or ' ext.): D:Press constant button, then enter

D:Press constant button, then enter the value of SYST-UNAME. For this example, user ID = 'I028612':

SYST-UNAME. For this example, user ID = 'I028612': E:Then the one prerequisite is defined as follow

E:Then the one prerequisite is defined as follow successfully:

the one prerequisite is defined as follow successfully: F:Press the go back button(the arrow button in

F:Press the go back button(the arrow button in below screen):

10/18/12

SAP Community Network Wiki - ERP Financials - How to define a substitution in FI with an example.

- How to define a substitution in FI with an example. G:Then you can continually define

G:Then you can continually define other prerequisite, in this case using the same steps describled above from A to E to define BKPF-BUKRS = 'Z013' as well, after this definition, the whole prerequisite for this example is defined completely as below:

for this example is defined completely as below: (7) Press 'Substitution' in the left side under

(7) Press 'Substitution' in the left side under substitution 'TEST', define a constant value as "AAAA" in text field(BSEG-SGTXT), then save it:

as "AAAA" in text field(BSEG-SGTXT), then save it: (8) Activate this substitution in Tcode OBBH with

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

means Active; '2' means Batch input processing): (9) Go to Tcode FB01 to create a line

(9) Go to Tcode FB01 to create a line item in company code Z013 by this user to check whether the substitution works.

Z013 by this user to check whether the substitution works.

10/18/12

SAP Community Network Wiki - ERP Financials - How to define a substitution in FI with an example.

Before press Enter: Text field is black.

FI with an example. Before press Enter: Text field is black. After press enter-> substitution works,

After press enter-> substitution works, Text field is substituted as "AAAA".

works, Text field is substituted as "AAAA". You can also use the same way to define

You can also use the same way to define a substitution in call point 1 and call point 3.

Addition, you can define your own substituion exit in the program that you defined in Tcode GCX2->application area GBLS from Tcode SE38, then select Exit in step (4) and assign this exit to EXIT field as below:

in step (4) and assign this exit to EXIT field as below: In case you define

In case you define a substitution correctly, but it still doesn't work, please try to regenerate the program by using report RGUGBR02 in Tcode SE38.

Moreover, from my experience to view, I think this function is more flexible, because we can realize the substitution NOT ONLY via SAP standard substitution function, BUT ALSO via writing source codes in an EXIT according to customer own specific business requirements if SAP standard substitution function can not fulfill customers' requirements.

But please pay attention to that the substitution can not be defined for any field, Especially for some important fields. For example: PRCTR, it can make some inconsistency between FI and CO-PCA if substitution is defined for PRCTR. There is explanation in note 42615.

And in NEW G/L, the PRCTR in vendor /customer lines are populated from the offsetting account, But if PRCTR is substituted to the vendor /customer line items in the entry view, it can lead to inconsistency between entry view and New G/L view.

For example:

you post the following document, in the entry view the following document is created:

 

PRCTR by substitution

PRCTR

31 vendor

1000

PRCTR3

/40 expense 1

400

PRCTR1

 

40 expense 2

600

PRCTR2

But in the NEW G/L view, the following document is created:

10/18/12

SAP Community Network Wiki - ERP Financials - How to define a substitution in FI with an example.

 

PRCTR by document splitting

 

PRCTR

31

vendor

1000

PRCTR1

400

/40 expense 1

400

PRCTR1

31

vendor

1000

PRCTR2

600

40 expense 2

600

PRCTR2

The result is in the entry view "there is PRCTR3 in PRCTR field", but in the new G/L view is "there are PRCTR1 and PRCTR2 in PRCTR field", that is inconsistency.

Addition, there is another limitation that the substitution works for "complete document" and posting a document, but NOT for parked document ( like park document in FBV1).