09-30-2008 7:20 PM
hi,
I went thru the forum and found some info in one of the posts but still has my doubt.
I am trying to post GL line items using BAPI_ACC_DOCUMENT_POST. Where and how do we pass the posting key or debit credit indicator ? I dont find any relevant field in the BAPI for this. In one of the posts I read that i can do it in SHKZG but I dont find in any of the structures in the BAPI. Am I missing something ?
thks
09-30-2008 7:36 PM
You need to use the field ACCT_KEY in the ACCOUNTGL parameter.
Based on the entry providedin the ACCT_KEY system will look into the table T030B to get the Posting key combination.
Regards,
Naimesh Patel
10-01-2008 2:06 PM
Hi Nimesh,
Acct_key seems to be like a 3 chr field...is this the correct field...in my requirement i am reading lines from a flat file and if a particular column has 'D' it indicates its a debit and so I should set the posting key to 40. If it is C then I should set the posting key to 50. I hope I am clear..
thks
10-01-2008 2:13 PM
hi,
there is no separate field for posting key. It will be derived from the amount: if you enter a positive amount => it will be a debit entry, posting key 40 will be used. if you enter a negative amount => it will be a credit entry, posting key 50 will be used. Of course this is only true for G/L accounts, for vendor the posting keys 21/31 will be used, for customers 01/11 (29/39 and 09/19 in case of special G/L).
hope this helps
ec
10-01-2008 2:22 PM
Ok Eric, info is useful.
But just now I noticed one more field in the structure BAPIACGL09 which is used in BAPI_ACC_DOCUMENT_POST which is DE_CRE_IND. Can this be the one which I am looking for ??
thks
10-01-2008 2:51 PM
no, it showing to BSEG-TBTKZ (normal debit credit indicator is BSEG-SHKZG), this is from SAPHelp for the above field:
Determines whether the invoice or credit memo involves a subsequent debit or a subsequent credit.
Use
Subsequent debits or credits occur if further invoices or credit memos are received in respect of goods which have already been invoiced. It is only the invoiced value that changes as a result: the invoiced quantity is not affected.
10-01-2008 6:50 PM
Hi ,
Eric is right!! I have also used this bapi couple of times and there is no separate field for posting key it will be decided by the amount sign.Please go head and post without filling posting keys.
Thanks
Sudharshan
10-02-2008 4:32 PM
Hey all thanks....As Eric said, there is no seperate posting key..I just used + and - and it worked..thanks..
09-30-2008 7:46 PM
09-30-2008 8:04 PM
Hello,
If Im not mistaken I believe that using that FM you will be only able to post documents this the standard posting keys, which are 31 or 41 (not sure, but I believe). Check for any SAP notes on that FM!!
Hope this helps!
Gabriel P,.