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: 

User already processing the purchasing document "XXX"

former_member671009
Participant
0 Kudos
1,666

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos
347

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

5 REPLIES 5

Former Member
0 Kudos
348

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

0 Kudos
347

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.

0 Kudos
347

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

0 Kudos
347

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

0 Kudos
347

Hi Vinodh,

Thank you . I solved the problem by calling the function once.

Regards

Sridevi S