Application Development and Automation 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: 
Read only

why i am getting the user already processing Purchase Order through BAPI

Former Member
0 Likes
9,761

Hi abapers

when i am creating two good reciepts for the same purchase order through BAPI, first good reciept cretaed sussfully adn second good reciept giving the error message "The use 'ramesh' already processing '4000000732'.

i want to know the SAP back ground reason why sap is displaying this message.

Regards

ramesh

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
5,772

There are couple ways to handle this, you can do more than one receipt for the purchase order at one time, just add another line item for the goods_movement_item table, this way you don't have to worry about the locking, or you can do the COMMIT WORK AND WAIT directly after the BAPI call, and then an explicit DEQUEUE, using the function module DEQUEUE_ALL. This will unlock after the COMMIT. The next time thru the loop, there should be no problems.

REgards,

RIch HEilman

Hi abapers

when i am creating two good reciepts for the same purchase order through BAPI, first good reciept cretaed sussfully adn second good reciept giving the error message "The use 'ramesh' already processing '4000000732'.

i want to know the SAP back ground reason why sap is displaying this message.

Regards

ramesh

9 REPLIES 9
Read only

Former Member
0 Likes
5,772

Hi,

1.

Usually if PO is created through BDC, then many times we forget to EXIT the transaction once we SAVE the PO. Hence the PO is still in change mode and no one else can open it.

2.

Since you are using BAPI, the reason would be that database tables are not updated, hence it would be giving that error. Do a COMMIT WORK AND WAIT after the BAPI call. Then create 2nd good receipt.

Best regards,

Prashant

Read only

Former Member
0 Likes
5,772

Ramesh,

The reason ur getting that issues is because Sap does update using CALL FUNCTION MODULE IN UPDATE TASK which happens in a separate work process. In the first pass of the loop the BAPI sends a request to update the GR but the update has still not happend and it takes few seconds before the records are created in the database. So in the seond pass of the loop it says that the person who is running the program is blocking the PO.

Try writing this command before calling the FM

SET UPDATE TASK LOCAL.

Cheers

VJ

Some points would be gr8 if this helps..

Read only

0 Likes
5,772

thanks for your replys

i tested in ABAP using SET UPDATE TASK LOCAL BAPI is working fine.

but we are calling this BAPI from JCO.

is there any remote enabled function module for SET UPDATE TASK LOCAL.

or any solution reply please

regards

ramesh

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
5,773

There are couple ways to handle this, you can do more than one receipt for the purchase order at one time, just add another line item for the goods_movement_item table, this way you don't have to worry about the locking, or you can do the COMMIT WORK AND WAIT directly after the BAPI call, and then an explicit DEQUEUE, using the function module DEQUEUE_ALL. This will unlock after the COMMIT. The next time thru the loop, there should be no problems.

REgards,

RIch HEilman

Read only

Former Member
0 Likes
5,772

Hi Ramesh,

Call BAPI_TRANSACTION_COMMIT after the 1st RFC call.

Best regards,

Prashant

Read only

0 Likes
5,772

thanks for you reply

i tried calling BAPI_TRANSACTION_COMMIT by passing wait = 'x'.

but still i am getting the samre problem from jco calling.

is there any other Remote enabled function module that can give solution to my problem.

regards

ramesh

Read only

0 Likes
5,772

Try passing an upper case "X".

wait = <b>'X'</b>.

REgards,

Rich Heilman

Read only

0 Likes
5,772

Even i passed to BAPI parameter wait = 'X' with caps.

Its giving the same error message.

Read only

0 Likes
5,772

u have to call like this

<b>call dequeue_all</b>

after the COMMIT work.

 if i_return[] is initial.
 commit work and wait.
 call function 'DEQUEUE_ALL'.

Regards

Prabhu