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: 

How to delete lock entries generated by the function module "BAPI_OBJCL_CHANGE"

Former Member
0 Kudos

Hi experts,

I'm now trying to make an add-on program

which updates material master information by the background job.

To update the "Classification" view of material master,

the program calls the function module "BAPI_OBJCL_CHANGE".

If the "RETURN" information is valid,

then the program calls "BAPI_TRANSACTION_COMMIT" (with the "wait" parameter 'X').

Contrary to my intention,

lock entries generated by the function module "BAPI_OBJCL_CHANGE" remains after "BAPI_TRANSACTION_COMMIT".

As a result, the material updated remains locked until the add-on processing ends.

To shoot this trouble, I read some SCN discussions below:

<<>>

⇒ As I wrote above, I checked the parameter for "BAPI_TRANSACTION_COMMIT".

<<>>

⇒ I cannot call the function module "BAPI_OBJCL_CHANGE" with "IN UPDATE TASK" option

because of "BAPI_OBJCL_CHANGE" attributes.

("BAPI_OBJCL_CHANGE" is not a "Update Module".)

How can I delete lock entries generated by the function module "BAPI_OBJCL_CHANGE" ?

Thanks in advance.

Tom

3 REPLIES 3

raymond_giuseppi
Active Contributor
0 Kudos

I quess/hope you want to remove locks in you caller program and not locks required by the update task processing to insure database consistencies...

Did you use the WAIT option in the commit FM, else if there are no other locks in your called program a call of FM DEQUEUE_ALL could solve your problem.

Regards,

Raymond

0 Kudos

Hi Raymond,

Thank you for your kind advice !

Unfortunately, there are other locks which must be kept during the add-on processing ...

Tom

0 Kudos

But the BAPI_TRANSACTION_COMMIT / COMMIT WORK will release many locks ?

You could wrap the BAPI and the COMMIT in a RFC enabled customer FM, and exectute it in DESTINATION NONE.

Regards,

Raymond