2010 Jul 15 8:17 AM
Hi Experts,
In an inbound idoc i have multiple line items. Am creating an line item for the purchase order if its not existing using BAPI_PO_CHANGE. Commiting the creation of line item using BAPI_TRANSACTION_COMMIT.When only one line item is passed in the idoc, the application is getting posted success fully.
When the idoc with two line items are sent the idoc with error" user ..... already processing the purchasing document XXX" is shown. But the line items are getting created in the ekpo table.
I have not used any other transaction with related to this purchase order. Tried using function DEQUEUE_ALL. But no use.What might be the problem.
Regards
Sridevi S
2010 Jul 15 8:26 AM
Hi,
Check whether BAPI BAPI_PO_CHANGE is called multiple times for same PO. Also use WAIT='X' while calling BAPI_TRANSACTION_COMMIT.
Regards
Vinod
2010 Jul 15 8:26 AM
Hi,
Check whether BAPI BAPI_PO_CHANGE is called multiple times for same PO. Also use WAIT='X' while calling BAPI_TRANSACTION_COMMIT.
Regards
Vinod
2010 Jul 15 8:33 AM
Hi Vinod,
yes BAPI_PO_CHANGE will be called multiple time for the same purchase order. Purchase order will be the same but the line item will be different so inorder to create if the line item is not existing am using BAPI_PO_CHANGE. So it will be called multiple times for the same purchase order.
2010 Jul 15 8:38 AM
Hi
Surely It wiil create Problem as the same PO is being used again and again but for different line item .
Just make suure that the processing shold be synchronous ,Just before commiting the changes in the data base just write
Wait upto 10 sec and den commit .
Regards
Swapnil
2010 Jul 15 8:42 AM
Hi,
Why don't you write the logic to store details of all line items which are to be created for the purchase order, and then call the BAPI by passing all the line item details? Hope you are getting all the line item details in one IDOC.
Regards
Vinod
2010 Jul 15 9:59 AM
Hi Vinodh,
Thank you . I solved the problem by calling the function once.
Regards
Sridevi S