Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI_INCOMINGINVOICE_CREATE to create invoice from the PO number

Former Member
0 Kudos

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

3 REPLIES 3

Former Member
0 Kudos

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

0 Kudos

Hi Ravi,

I applied time delay before calling bapi invoice..and every thing is ok now..

Thank you very much..

cheers

0 Kudos

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