Application Development 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: 

Fill "Segment" field when posting a document

Former Member
0 Kudos

I have to fill automatically the "Segment" field for each line when posting a document. For FB50/FB50L, I have added and enhancement in Include LFSKBF01, and it works, but, for FB01 transaction, I have not been able to find any badi/user exit that suits my requirements (I have already used the typical program that returns every user-exit/badi for a specified transaction).

I had thought in adding an enhancement in program SAPMF05A (the FB01 program), but, when I try to put some code in it, the system tells me "Statement not accessible.

Any help?

Thanks in advance

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Try with FI substitution (OBBH) for substitution field BSEG-SEGMENT.

4 REPLIES 4

Former Member
0 Kudos

Try with FI substitution (OBBH) for substitution field BSEG-SEGMENT.

0 Kudos

Thanks Vinod, but, when the transaction is shown, the field should contain a value that I would get from a Z table, if I use a substitution, until the user doesn't post the document, the program doesn't pass the substitution.

0 Kudos

If you consider transaction code FB01, how you expect to see the field value before user enter the Line item data ?

You should use the Substitution Exits to extract the data from Z table and populate in the required field. Value in the required field will be visible in the screen before posting the document. Search SCN to get more information on FI Substitution.

0 Kudos

I have to fill that field with data from a Z table before posting the document. That Z table contains the default segment for each company code, so I have to put the value by selecting from that table using the company code as parameter. I think that this process should be done when the system goes from the "header" screen to the following one (line item data).

I hope I have explained myself clearly, thanks again.