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

Locking issue after BDC recording tcode COPAWA

former_member210804
Active Participant
0 Likes
2,354

Hi experts, Currently, I wrote a function module which process in sequence as packing HU, change the HU header and Assigning HU to process the order. For packing HU, used standard bapi BAPI_HU_PACK, for change HU header, used standard bapi BAPI_HU_CHANGE_HEADER. For assigning HU, called BDC using call transaction 'COPAWA'. Before calling BDC, used DEQUEUE_ALL function module to unlock the HU. But after processing, I m getting HU lock issue. Please look at the screenshot below.

5 REPLIES 5
Read only

RaymondGiuseppi
Active Contributor
1,725

DEQUEUE_ALL (which should only be used when breaking transaction as during an exit function key process) only release lock of your current luw/session, not those kept by the update task. Did you use the option WAIT in the COMMIT of the BAPI call?

Read only

former_member210804
Active Participant
0 Likes
1,725

Hi Raymond,

Used WAIT = 'X' in commit . But still, the same issue is occurring. Please suggest what is wrong with it.

Thanks,

Narasimha.

Read only

0 Likes
1,725

How about using COMMIT WORK AND WAIT statement? I find it sometimes that it works while the FM BAPI_TRANSACTION_COMMIT doesn't.

Read only

0 Likes
1,725

amiruddin.ayaz BAPI_TRANSACTION_COMMIT is very simple code, if you pass parameter WAIT = 'X', it does immediately a COMMIT WORK AND WAIT, so that's impossible that "COMMIT WORK works while BAPI_TRANSACTION_COMMIT [with WAIT = 'X'] doesn't" (or you experienced some issues related to the "BAPI buffer" cleared by BAPI_TRANSACTION_COMMIT, which is not related to the "commit work").

Read only

Former Member
0 Likes
1,725

This wouldn't be related to 'Exception condition "OS_COMMIT_WORK_FORBIDDEN" triggered' by any chance ? Are you still trying to use Commit Work in the wrong place ??