‎2009 Oct 06 3:35 AM
Hi everyone ..
i am new here .
i want to asking about table locking
i have a problem, the problem like this
if user a acces table_a, table_a will locked by user a, so the other user only can view table_a and can't modified the table_a
i want to table_a not locked by a, so the other user can modified table_a in same time with user a.
i hope someone can help me to solve this problem
regards
novhard kordinov
‎2009 Oct 06 4:04 AM
You mean to say u want to disable locking on table_a so that user a as well as other users also maybe able to access it.
This would cause databse inconsistency and hence not recommended.
Correct me if i understood your question wrongly
‎2009 Oct 06 4:04 AM
You mean to say u want to disable locking on table_a so that user a as well as other users also maybe able to access it.
This would cause databse inconsistency and hence not recommended.
Correct me if i understood your question wrongly
‎2009 Oct 06 4:09 AM
let me know how will the table be changed?
Tr? sm30? program ?
‎2009 Oct 06 4:16 AM
@kartik tarla
yaps, you understand my question,
it will make inconsitency
i want to change my question
like this
if a acces table_a at the first time , table_a will display in change view,
so table_a will be locked by user a,
so the other user only can display view in table_a,
i want to make if a acces table_a at first time, table_a will display in display view,
so table_a not locked by user a, but if a want to modified the record in table_a,
the record will be locked by user a, so the other user only can view the record
i hope some one can help me to solve the problem
@j@y
by program
thanks for the responses
‎2009 Oct 06 4:29 AM
u can use these fms 'ENQUEUE_E_TABLE' and DEQUEUE_E_TABLE to lock and unlock table,
Only when user a is modifying a record then lock the table and then unlock right after it.
‎2009 Oct 06 4:38 AM
@Kartik Tarla
thanks for response me ..
mmm, how if i want to do record locking not table locking??
‎2009 Oct 06 4:45 AM
The above Fms that i have provided have a parameter varkey which is the concatenated key fields
If u provide this varkey then this fm will perform record level locking based on the key fields,
only teh record matching with the key that u provided will be ;locked
Edited by: Kartik Tarla on Oct 6, 2009 9:15 AM
‎2009 Oct 06 8:31 AM
Hi Novhard,
You can use custom lock objects (see SE11). If you create one object (it should start with 'EZ' or 'EY' for specific ones) lets say EZ_MY_TABLE, it will create to FM :
- ENQUEUE_EZ_MY_TABLE that will lock some entries of your table :
CALL FUNCTION 'ENQUEUE_EZ_LOCK_MATABLE'
EXPORTING
MODE_MY_TABLE = 'E'
MANDT = SY-MANDT
KEYFIELD1 = 'VALUE1'
KEYFIELD2 = 'VALUE2'.
- DEQUEUE_EZ_MY_TABLE that will unlock your entries
CALL FUNCTION 'DEQUEUE_EZ_LOCK_MATABLE'
EXPORTING
MODE_MY_TABLE = 'E'
MANDT = SY-MANDT
KEYFIELD1 = 'VALUE1'
KEYFIELD2 = 'VALUE2'.
Hope it will help you...
Best regards,
Samuel
‎2009 Oct 06 4:57 AM
@Kartik Tarla,
i like to discuss with you ..
i am newbie using SAP and ABAP programming
if i am running program
in example ZHRSJ
that program will show table Equipment, at first time view, will be display in change view
and if somebody run ZHRSJ too
the other will be view table in display view, coz table Equipment already locked by me
i want to make that program will show the table at the first time in display view when i running it
can you help me, how to do that ..
thank you very much for all your responses for me
regards
novhard kordinov
Edited by: novhard on Oct 6, 2009 6:00 AM
‎2009 Oct 06 6:26 AM
‎2009 Oct 06 10:51 AM
@ Kartik Tarla
i dont know,..
if we want to do like i mention before ..
is it the solution using table control??
‎2009 Oct 06 6:45 AM
‎2009 Oct 06 9:25 AM
thanks for all responses ,..
i am very newbie in SAP and ABAP programming
this is my first time, i have to remake a funciton in SAP
just confuse what i must to do,
still study the code,
later i will asking again ...
thanks all ..
regards
novhard kordinov