ā2014 Feb 28 11:16 AM
Hello
How to lock an editable alv grid when a first user is processing this alv
and unlock it when the first leave this alv
i am using cl_gui_alv_grid.
Thank you
ā2014 Feb 28 11:24 AM
Hi Bakkali,
I guess you are trying to save the values entered/chnaged in ALV to Database table. If this is the case Instead of trying to lock the ALV use Lock Objects (Enque & Deque) functions for the table being updated in the back ground.
Thanks
Rajnesh
ā2014 Feb 28 11:24 AM
At selection screen event, try to set a lock. If already locked, display a message and then make the editable fields read only .Else, let the user continue.
ā2014 Feb 28 11:52 AM
Create a lock object in SE11 and then use Enqueue FM to acquire lock.
Regards
ā2014 Feb 28 12:08 PM
Thank you for your replies,
In fact i have to save the entered values in my alv grid and update a document via ME47 transaction.
I dont know if i have to lock the transaction ME47 or lock the entiere alv.
For the both solutions, i dont know how to do that
What the better solution for you?
i prefer to lock the editable alv to avoid two users working on it in the same time but the alv must always be available for display for any user
ā2014 Apr 29 9:51 AM
Hi Bakkali,
As per your requirement you can use OO ABAP concept "Singleton" By this you can easily check if any other user is currently editing ALV object or not then you can set ALV treat as EDITABLE or LOCK.