04-14-2014 3:31 AM
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
04-14-2014 1:13 PM
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
04-15-2014 1:15 AM
Hi Raymond,
Thank you for your kind advice !
Unfortunately, there are other locks which must be kept during the add-on processing ...
Tom
04-15-2014 7:20 AM
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