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

Question/problem posting key in account payable in BAPI_ACC_DOCUMENT_POST

Former Member
0 Likes
1,840

Hi all,

I have an ABAP code where I want to Post a Document using BAPI_ACC_DOCUMENT_POST (FB01) where there are G/L items, Customer items and Vendor items.

With the Vendor Items I want to use Posting Keys '29' and '39' but the BAPI Post the Document with Posting Keys '21' and '31', what I don't want.

I have been looking for where to input this in the BAPI Structure (AccountPayable BAPIACAP09) but I have found no where to put it in.

In G/L Posting there is field ACCT_KEY where I can do something like I want, but is G/L and not in AP.

Do you know how to do this? How to use the Posting Keys that I want instead of the Posting Keys that the BAPI use?

Thanks in advance, points waiting.

Jose Luis

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,029

What about the instruction key fields in BAPIACAP09 (fields INSTR1 through INSTR4)? Can those be used for your purpose? If you can't find a suitable existing field, you could implement the badi or user exit that the function module calls and pass your values in table extension1 or extension2.

- April King

Hi all,

I have an ABAP code where I want to Post a Document using BAPI_ACC_DOCUMENT_POST (FB01) where there are G/L items, Customer items and Vendor items.

With the Vendor Items I want to use Posting Keys '29' and '39' but the BAPI Post the Document with Posting Keys '21' and '31', what I don't want.

I have been looking for where to input this in the BAPI Structure (AccountPayable BAPIACAP09) but I have found no where to put it in.

In G/L Posting there is field ACCT_KEY where I can do something like I want, but is G/L and not in AP.

Do you know how to do this? How to use the Posting Keys that I want instead of the Posting Keys that the BAPI use?

Thanks in advance, points waiting.

Jose Luis

5 REPLIES 5
Read only

Former Member
0 Likes
1,029

Have you checked the field called business transaction on the header . If not please check if it helps. The documentation of BAPI has some more details on business transaction.

Read only

Former Member
0 Likes
1,030

What about the instruction key fields in BAPIACAP09 (fields INSTR1 through INSTR4)? Can those be used for your purpose? If you can't find a suitable existing field, you could implement the badi or user exit that the function module calls and pass your values in table extension1 or extension2.

- April King

Read only

Former Member
0 Likes
1,029

Reward points, if it is helpful..!

Read only

Former Member
0 Likes
1,029

set Special G/L Indicator i.e vendor-SP_GL_IND to 'X' if you need to post with 29 and 39 also check if the functional if these are special GL accounts.

Read only

Former Member
0 Likes
1,029

Thanks a lot.

At last I've decided to implement a copy badi like acc_document changing the key posting.

Thanks a lot to all.