Skip to Content
0
Former Member
Jul 07, 2009 at 05:48 AM

lock a ztable using function module or memory id

53 Views

hello experts,

i am facing a problem in ALV grid output (editable) - when user editing and saving data into the ztable - other user should not able to save the data and error msg to be displayed.

i am using the function modules for locking the whole table - enqueue_eztable and dequeue_eztable. i can see the table as locked in sm12, but i can also do the updating and save data.

is there anyother function module to work with?

another way i am doing is -

DATA: text4 TYPE c,
        text5 TYPE c.
  IMPORT text4 TO text5 FROM MEMORY ID 'Y222'.
  IF sy-subrc = 0.
    IF text5 = 'X'.
      MESSAGE e000(z1) WITH 'SOME USER IS ACCESSING THE PROGRAM'.
    ENDIF.
  ELSE.
    EXPORT text4 = 'X' TO MEMORY ID 'Y222'.
    PERFORM update_dbase.
    FREE MEMORY ID 'Y222'.
  ENDIF.

this method also not working.

plz help me, how to avoid other user accessing the data when another user is working on it?

thanks.