2008 Oct 31 3:39 PM
Hi,
I want to lock the custom table to do the updation from program,
I have created the lock objects for that table and i am using the enqueue and dequeue function modules in the program.
Now how i can test this locking happeing or not?
Moderator message: "urgently" not permitted
The following is the code i am using in th program
CALL FUNCTION 'ENQUEUE_EZFAMEX_IBCP'
EXPORTING
mode_zfamex_ibcp = 'E'
client = sy-mandt
land1 = p_land1
x_land1 = 'X'
_SCOPE = '2'
_WAIT = ' '
_COLLECT = ' '
EXCEPTIONS
foreign_lock = 1
system_failure = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Regards
Krishna
Hi,
I want to lock the custom table to do the updation from program,
I have created the lock objects for that table and i am using the enqueue and dequeue function modules in the program.
Now how i can test this locking happeing or not?
Moderator message: "urgently" not permitted
The following is the code i am using in th program
CALL FUNCTION 'ENQUEUE_EZFAMEX_IBCP'
EXPORTING
mode_zfamex_ibcp = 'E'
client = sy-mandt
land1 = p_land1
x_land1 = 'X'
_SCOPE = '2'
_WAIT = ' '
_COLLECT = ' '
EXCEPTIONS
foreign_lock = 1
system_failure = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Regards
Krishna
2008 Oct 31 3:41 PM
Hi,
Try to access the entries from the table that you have locked.
Find in SM12 whether the entries are locked then you can conform.
Cheers!!
VEnk@
2008 Oct 31 3:47 PM
Hi,
I found 'no lock entries found' in SM12.
what i did i put a break-point at the function module and i have checked in SM12.
Thanks
Krishna
2008 Oct 31 4:05 PM
Hi,
After using the function module ENQUEUE_E_TABLE.
Try to print whether the table is locked or not where you can conform.
call function 'ENQUEUE_E_TABLE'
exporting
tabname = '<tablename>'
varkey = varkey
exceptions
foreign_lock = 1
system_failure = 2
others = 3
.
If sy-subrc = 0.
write: 'successfully locked the table'.
else.
write: 'not locked'.
endif.
Cheers!!
VEnk@
2008 Oct 31 5:17 PM
Hi,
Thanks for you imeediate reply,
But i did not see the Tabname parameter in my FM exporting parameters
I am only getting keyfield parameter in my exporting.
Regards
Krishna
2008 Oct 31 5:31 PM
Hi Krishan,
There is a difference you have to notice here if you use the FM CALL FUNCTION 'ENQUEUE_EZFAMEX_IBCP' " here you have to create the lock object and then call the function module.
According to the FM (call function 'ENQUEUE_E_TABLE')i have used there is no need to create any lock object separately, directly you can lock the table itself with out creating lock object.
Hope you got my answer. Therefore call FM call function 'ENQUEUE_E_TABLE' and give your table in TABNAME it will automatically lock your table.
Cheers!!
VEnk@
2008 Nov 01 2:11 PM
hi
Try to access the entries from the table that you have locked.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |