Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

FB01 BDC substitution problem

Former Member
0 Likes
1,416

Hi,

I wrote a batch program to transfer GL data from text file to SAP. It uses FB01.

Everything works fine except for some GL accounts that do not need cost center input. When such account inserted my program has an error

saying that there is no field 'COBL-KOSTL' in the form.

To fix the problem my program has to access substitution rule and either insert or not incert line: PERFORM bdc_field USING 'COBL-KOSTL' itab-kostl. "Cost center

Question: how to access substitution rules from ABAP program? Or may be I have to access basic set generated by substitution? Or may be any other way?

Thank you,

Vitaly

9 REPLIES 9
Read only

Former Member
0 Likes
1,102

Hi Vitaly ,

You can access to substitution rules but the problem you have is something with the customizing i think . Some accounts don't need cost centers. You have to change your screen sequence sometimes depending on the accounts.

Hope this helps ,

Regards .

Message was edited by:

Caglar Ozkor

Read only

0 Likes
1,102

This is the point. Some accounts don't need cost centers and those accounts could be fount when I manually run transaction GS02 and specify basic set name.

I have substitution ID (ZSUBFI) and basic set name (ZSUB_BANKGL_1001).

In table GB922, under substitution ID ZSUBFI there is set of constants for certain fields in BSEG table.

Shall I search BSEG table for those values and consider it the rule to find out GL accounts (HKONT) that do not need cost center?

Thank you,

Vitaly

Read only

0 Likes
1,102

No, they are not criteria for selection.

Btw, why don't u directly read the substituted HKONT from the set name (ZSUB_BANKGL_1001).

In GS922 look for HKONT against BSEG. If there is a form exit they are using then it would be placed against the field 'ProcessingForm' and I believe that is the case here too.

Regards

Nishant

Read only

0 Likes
1,102

How to read set? When I tried to open it as table it failed. I searched the forum and found nothing.

Thank you.

Read only

Former Member
0 Likes
1,102

Hi,

These tables might help you.

GB03 Validation/Substitution User

GB03T Validation/Substitution Application Area T

GB31 Validation/Substitution Callup Points

GB31T Validation/Substitution Callup Point Text

GB907 Rule: Usage of Rules in Substitutions

GB92 Substitutions

GB921 Substitution Conditions

GB921T Substitution: Text Table for Substitution

GB922 Substitution Constants

GB925 Usage of Substitutions

GB92T Texts for Substitutions

I have not checked the details of which table to use exactly but I am sure it would help you in some sense.

Regards

Nishant

Read only

Former Member
0 Likes
1,102

Hi,

it is not best idea to write BDC on FB01 as you need to check lot many parameter such as cost center assignment, profit center ass. posting keys etc.

Why don't you use BAPI for this.

If it is going to be daily or routine activity I think BAPI is the way to go with.

Regards,

Atish

Read only

Former Member
0 Likes
1,102

What are you substituting. I don't think you're supposed to substitute anything with financial implications (like cost centers).

Rob

Read only

Former Member
0 Likes
1,102

Can you clarify the problem? Are you getting a message indicating there is no field 'COBL-KOSTL' on the coding block screen in FB01?... if this is the case, it's configuration you need to understand as it would indicate that your BDC code is trying to feed in a cost centre to an account but the field is not available on the popup (typically because th GL account is something like a balance sheet account that does not affect CO).

Usually I have found that looking at the account group on the GL account master is frequently the way to determine what is going to appear in the coding block - but chat to the functional team / users first as they can explain the local rules.

Jonathan

Read only

0 Likes
1,102

Hi Jonathan,

yes they have substitution rules that generate a list of GL accounts that should not receive Cost Center information. This list is in basic set named ZSUB_BANKGL_1001. My original question was how to access basic set from abap program. Or how to access substitutional rules from abap program.

Thank you.