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

Commit Problem with BAPI_SHIPMENT_CHANGE

Former Member
0 Likes
1,815

Hi, all, thank you very much for your help.

I'm trying with <b>BAPI_SHIPMENT_CHANGE</b>, to change a shipment's Planning_Status. The Planning_Status is successfully updated. But, the LOCK of the shipment is NOT automatically released after the bapi commit.

Following is my detailed processing:

1. Write an ABAP LIST.

2. Press a button on the ABAP LIST's Application tool bar to call the bapi.

      AT USER-COMMAND.
         CASE sy-ucomm.
             WHEN 'CALL_BAPI'.
                  CALL FUNCTION 'BAPI_SHIPMENT_CHANGE'
                  ......
                  CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
                  ......
         ENDCASE.

3. After the bapi, stay at the current ABAP LIST wihout leaving.

Although I commit the bapi explicitly, and the planned update succeeds, the processing shipment <b>stays being locked</b> by me, <b>unless I leave the ABAP LIST</b>. And just when I leave the current screen, the lock is released.

I'm wondering, hasn't the BAPI_TRANSACTION_COMMIT committed successfully? Or, do I miss some steps?

1 ACCEPTED SOLUTION
Read only

chaouki_akir
Contributor
0 Likes
1,285

Hello,

i have questions :

1/ what transaction is telling you that the processing shipment is locked by you ?

2/ In your program do you have any other function with name '%enqueue%' ?

7 REPLIES 7
Read only

chaouki_akir
Contributor
0 Likes
1,286

Hello,

i have questions :

1/ what transaction is telling you that the processing shipment is locked by you ?

2/ In your program do you have any other function with name '%enqueue%' ?

Read only

0 Likes
1,285

Hi, chaouki,

Thanks for your reply.

1). Transaction 'VT02N' tells me the shipment is being locked by myself, if I haven't leave the ABAP LIST.

2). There is NO extra 'ENQUE' processing in my program. Only BAPI_SHIPMENT_CHANGE and BAPI_TRANSACTION_COMMIT.

Read only

0 Likes
1,285

Hello,

1/Do you know what is the use of ENQUEUE/DEQUEUE function module ?

2/My point of vue is : the VT02N is trying to lock the Shipment entry (created by the BAPI) by calling an ENQUEUE function module. By debbuging the VT02N transaction, you can know the name of the ENQUEUE function module.

Read only

0 Likes
1,285

I agree with you on the lock.

I'm wondering, why BAPI_TRANSACTION_COMMIT doesn't release the lock? Why Leaving_Screen releases the lock?

Read only

0 Likes
1,285

<b>Could anyone please help?</b>

Read only

0 Likes
1,285

Hello,

your problem have already been encountered in this forum.

==> So, what you have done is correct. And to unlock the entry, you just have to call function 'DEQUEUE_ALL' (as explained in thread ).

Read only

0 Likes
1,285

chaouki, thank you very much.