‎2006 Aug 19 12:51 PM
Hi,
Some problem in creating IR through the BAPI BAPI_INCOMINGINVOICE_create. I am able to see the IR number after executing the BAPI but unable to see the IR number in the table. The IR number is not getting updated in the database table even though we are doing the commit work after executing the BAPI. Could anyone help me out with this error.
Regards,
Ram
‎2006 Aug 19 1:21 PM
Hi ,
I have faced a similar problem with one of the material create BAPi's
I tried the commit work as you did , but did not work.
Then i wrapped the BAPI inside a 'Z' FM with same import / export parameters and did commit inside the Z FM. This something do with the logical unit of work (LUW ).
Try it...wont take long time.
Regards
Balaji
‎2006 Aug 19 2:00 PM
Hi,
use the transaction commit .
may be you need to use BAPI_INCOMINGINVOICE_SAVE
See the below link for your problem
Thanks
Sudheer
‎2006 Aug 20 10:32 PM
First of all I am assuming that you did not get any error in the BAPI return structure (even though you see document number populated).
Secondly, I guess you tested the BAPI with SE37 and did not get any error (functionally there are a number of BAPIs available to post an invoice and it is important to figure out the correct BAPI - e.g. PO, non-PO invoice, invoice as a GL entry only, etc.).
If that is not true (there is some error in posting), since during the BAPI call the next document number is obtained as a first step, you will see the document number but subsequently if for some reason it is not posted, you will see the result as you mentioned (no data in the database).
If you are using correct BAPI and have no errors, then in ABAP program make sure to call 'BAPI_TRANSACTION_COMMIT' after the BAPI call to post invoice.
For non-SAP external system, you need not have to call the commit BAPI but just closing the connection to SAP will help.