12-04-2006 10:46 AM
Hi all,
I used BAPI_PO_CREATE to create purchase order and i passed the PO number to another bapi BAPI_INCOMINGINVOICE_CREATE to create invoice. But the second bapi throwing an error saying PO not exist even though the PO was successfully created...
Kindly guide me to solve the problem..
cheers
12-04-2006 10:49 AM
If all these are happening in the same program, then its a timing issue.
After BAPI_PO_CREATE, call BAPI_TRANSACTION_COMMIT and then finally call BAPI_INCOMINGINVOICE_CREATE after your create your Goods Issue as well.
Without Goods Issue, the invoice cannot be created.
If you still see the same error, introduce a time delay before call INVOICE BAPI using WAIT command.
Regards,
Ravi
Note - Please mark all the helpful answers
12-04-2006 11:53 AM
Hi Ravi,
I applied time delay before calling bapi invoice..and every thing is ok now..
Thank you very much..
cheers
03-01-2007 2:39 AM
Hi,
I am also trying to create invoice with reference to purchase order, can you please tell me which BAPI did u used for this? also provide me which fields and how I need to pass to bapi ? any test code?
thanks, let me know if u need further details ..thanks