05-07-2008 3:33 PM
Hi All,
I am using a MIRO to post a vendor invoice. I am creating this Invoice with reference to a PO. I input data in the G/L acccount tab mentioning the GL account associated with the PO and also the amount. I save the document and invoice is created. When I open this invoice in FB03 I see that there are 2 entries as follows in the ALV
Posting Key G/L Account Amount
31 12345 12.0-
40 3456 12.0
This is an expected result.
But when I use the BAPI_INCOMINGINVOICE_CREATE and pass data to the ITEMDATA table and GLACCOUNT table and create the invoice. When I open with FB03, I see the following entries
Posting Key G/L Account Amount
31 12345 12.0-
86 7589 12.0
This is wrong as the invoice has taken the GL Account associated with the material and also taken posting key as 86.
Kindly let me know how to achieve the same behaviour with a BAPI or is there a BAPI which I can use.
Thanks....
Preetham S
05-07-2008 9:51 PM
Hi,
have a look at the following link:
http://sapass.metro.client.jp/Bapi/BUS2081.htm
i guess BAPI_INCOMINGINVOICE_CREATE is used to post the invoice
whereas BAPI_INCOMINGINVOICE_PARK is used to park/save the invoice.
Best regards.