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: 

posting key field in BAPI_ACC_DOCUMENT_POST

Former Member
0 Kudos
3,965

hi,

i have do a accounting posting for fb01.

so i am using BAPI_ACC_DOCUMENT_post for this.

i have to do a posting for a period which is having two vendor crdit entries and one g/l debit entry.

so in the BAPI,i have maintained 2 account payable entries and one g/l entry and one currencyamount entry.

but in the accountpayable there is no field for posting key whether its a credit or debit.

how to do that.

5 REPLIES 5

Former Member
0 Kudos
574

objtype and objkey are information about the 'external' document (origin document which leads to an follow up document in gl accounting).

objtype could be maintained in table TTYP. objkey is the reference number (e.g. document number of a sales order). normally objkey consists of reference document number and reference organizational unit (company code).

for bus_act, several entries are possible (depends on where the origin document is located). i guess 'RFBU' together with above mentioned information should do it.

i hope this helps you further.

arjun_thakur
Active Contributor
0 Kudos
574

hi,

plz refer to this thread:

i hope it helps

regards

arjun

Former Member
0 Kudos
574

i think it may be work on the NEWKO(Account or Matchcode for the Next Line Item)

exa: credit : 12345678

debit : 999999999

if your updating the data from legacy you can use below LSMW programmm

Object 0100 Financial documents

Method 0000

Program Name RFBIBL00

Program Type D Direct Input

Former Member
0 Kudos
574

Hi Mani,

The posting key depends upon the amount value what you are posting, if the amount is positive then it takes values as ( '01' and '40') if the amount value is negative it takes ('11' and '50').

There is no need to send the Posting Key value to the BAPI.

Regards

Kumar M

0 Kudos
574

Thank you. That's perfect. It worked for me.