‎2007 Mar 07 6:15 AM
Hi SDN,
I am updating a strandard Database table through BAPI.I can lock the object (an database entry ) through BAPI.But if i lock the object ,i am not able to update the database table. The BAPI gives an error message as 'Status is set as locked.so can't update'.Is it possible to lock the object and then update and then unlock the object through BAPI?
‎2007 Mar 07 6:31 AM
I suppose you are talking about using ENQUEUE / DEQUEUE function calls when you say locking and unlocking. If you are using these functions to lock the particular table, then you should not get a problem while updating.
CALL ENQUEUE function
Update the table
CALL DEQUEUE function
‎2007 Mar 07 6:35 AM
And don't forget to do a BAPI_TRANSACTION_COMMIT function call after the function is called.
If it is a BAPI without explicit COMMIT in it, and when you test it using SE37, no changes will be saved, while calling such a BAPI you should do a COMMIT yourself by calling the above function.