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: 

not getting the right posting key..

Former Member
0 Kudos

hey,

i am posting accounts payable data using the bapi BAPI_ACC_DOCUMENT_POST.

my logic arrives at two values

blart = 'KG'.

newbs1 = '21'.

now how do i pass this to the bapi, which structure , which field, so that i get the posting key as 21 in the GL acct line item ??

i am always getting 31 and 40 as the posting keys... now i need 21 and 50..

thnks

5 REPLIES 5

Former Member
0 Kudos

Hi,

As I know about this BAPI we dont have any field to pass values for posting keys,only the amount sign decides the posting key which is taken care by the bapi.

Thanks

Sudharshan

0 Kudos

Yes Sudarshan, thats true. But I need to somehow tell SAP that its a vendor credit memo !! When i try to set the doc_type as 'KG' it means so, but then the posting key is not set as 21 but set as 31 !!

what cud be wrong ??

0 Kudos

hey Sudarshan, I traced the BAPI and found out that it is the amount being positive or negative along with the doc type that determines what the posting shud be..so when i set the doc type say as KG and pass a +ve value, posting key 21 is set , for -ve value posting key 50 is set. i was abt to achieve the result by changing the signs for the currency amt..worked..

Former Member
0 Kudos

resolved myself..

Former Member
0 Kudos

resolved myself..