Hi Experts,
I am using the BAPI_ACC_DOCUMENT_POST to post account receivable
This is how i pass data to the Structures
*Header
wa_documentheader-bus_act = 'RFBU'.
wa_documentheader-doc_type = 'DR'.
wa_documentheader.obj_type = 'BKPFF'.
...
***Parameter for transfering cutomer line items.
wa_accountreceivable-itemno_acc = '1' "eg
wa_accountreceivable-customer = '123456'
....
append wa_accountreceivable to lt_accountreseivable
** Correspondinding entry in GL Account
wa_accountgl-item_acc = '2'.
wa_accountgl_gl_account = '374040'
I also Transfer Parameters to the structure Currencyamount correctly
Wenn I run the Program a document with two item lines is created which I can see with FB03
I am posting without a tax line.
My Problem is with the Posting Key
The customer item line is posted with Posting key 11 (Credit Memo) . I am expecting
posting key 15 (Incoming payment)
G/L account lien item is posted correctly with posting key 40
Could any body please help how to influence the posting key? My understating is that the system takes care of it.
Thanks a lot.
King