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

Purchase order modification

david_escofettrenado
Participant
0 Likes
728

Hi,

We are using this functionaly:

We change purchase requistiion quantity with BAPI BAPI_REQUISITION_CHANGE.

If modification is correct we are doing a BAPI_TRANSACTION_COMMIT with WAIT and also we modify purchase order quantity with BAPI BAPI_PO_CHANGE.

If purchase order modification is correct we are doing a BAPI_TRANSACTION_COMMIT with WAIT.

Sometimes occurs that if a change is done with BAPI_REQUISITION_CHANGE correctly and we are doing the correspondant changes to purchase order BAPI_PO_CHANGE, this bapi give error ME 006 (User alredy processing requisition).

How it is possible if we have done a commit and wait?

How can we solve this problem?

Best regards¡¡¡

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
624

Hi,

The object is still locked when you try to change with BAPI_PO_CHANGE and thats the reason you are getting the error message.

Before calling BAPI_PO_CHANGE, check whether the object is unlocked, you can do that with deque function .

3 REPLIES 3
Read only

Former Member
0 Likes
625

Hi,

The object is still locked when you try to change with BAPI_PO_CHANGE and thats the reason you are getting the error message.

Before calling BAPI_PO_CHANGE, check whether the object is unlocked, you can do that with deque function .

Read only

Former Member
0 Likes
624

HI,

Try using FM : ENQUE_SLEEP for wait process.

Actually sometimes, due to some database constraints, process takes time to save document.

SO better to give 5 seconds delay for that.

CALL FUNCTION 'ENQUE_SLEEP'

EXPORTING

SECONDS = '5'

EXCEPTIONS

SYSTEM_FAILURE = 1

OTHERS = 2.

Regds,

Anil

Read only

0 Likes
624

Hello,

Please try WAIT UP TO 10 SECONDS.

Cheers,

Balaji