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

Lock editable alv

abybakk
Explorer
0 Likes
1,556

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

5 REPLIES 5
Read only

Former Member
0 Likes
1,152

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

Read only

Former Member
0 Likes
1,152

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.

Read only

former_member188827
Active Contributor
0 Likes
1,152

Create a lock object in SE11 and then use Enqueue FM to acquire lock.

Regards

Read only

0 Likes
1,152

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

Read only

0 Likes
1,152

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.