‎2006 Oct 09 10:00 AM
Hi
I want to know that do we need to create a Lock Object for any SAP Object or we can directly write ENQUE_* for the object?
I mean when I try to create a Lock Object I am asked an Access Key.
Why is it so?
Thank You
‎2006 Oct 09 10:03 AM
Hi,
When you create a Lock Object in SE11 , automatically the ENQU* and DEQU* FM's gets created .
As for the Access key restriction contact your basis person for the same.
‎2006 Oct 09 10:04 AM
Refer this link:
http://help.sap.com/saphelp_47x200/helpdata/en/a2/3547360f2ea61fe10000009b38f839/frameset.htm
Regards,
Ravi
‎2006 Oct 09 10:06 AM
Hi,
if you want to use the Lock concept, the Lock object should be there, you can create the lock object starting with Z or Y. and the ENQUEUE and DEQUEUE function modules will be genareted.
or else, you can use the below way..
i_varkey TYPE rstable-varkey,
i_tabname TYPE rstable-tabname VALUE 'ZGLACC'.
CONCATENATE sy-mandt i_final-vbeln
INTO i_varkey.
CALL FUNCTION 'ENQUEUE_E_TABLEE'
EXPORTING
tabname = i_tabname
varkey = i_varkey.Regards
Sudheer
‎2007 Sep 16 9:26 AM
Hi Sudheer
Can you please tell the difference between the two methods specified by you.
1. Create Lock Object for the table from SE11 and use the Enqueue and Dequeue function modules of that lock object.
2. Do NOT create a Lock Object for the table and use the function modules ENQUEUE_E_TABLEE and DEQUEUE_E_TABLEE, passing the table name to them.
I opened the table in Edit Mode in SM30 and then tried using both these methods above.
The first method allowed me to update the table, even though the table was open in edit mode in SM30.
The second method did NOT allow me to update the table. It gave an error that the table is already locked.
Please shed some light on this.
Regards
Anshuman
‎2006 Oct 09 10:10 AM
Hi,
if you are trying to create lock object for SAP
tables you need access key.
when lockobject is created using se11
by default enqueue_<lock objectname>
dequeue_<lock objectname> are created
by SAP.
you can create at table level or row level lock.
check out whether ant standard lock objects are
already defined for your table in se11 and use
the same for your requirement.
Regards,
amole
‎2006 Oct 09 10:18 AM
Hi subhash,
1. I mean when I try to create a Lock Object I am asked an Access Key.
Thats bcos u are directly creating the
lock object with the name starting from
Z or Y.
<b>(INSTEAD use EZabc or EYabc
ie. E should be the first letter
Z/Y should be the second letter
then anything..)</b>
2.
want to know that do we need to create a Lock Object for any SAP Object or we can directly write ENQUE_* for the object?
Yes, we need to create.
Create a lock object,
will automatically create TWO FMs
for Dequeue/enqueue,
which we have to use in our abap code.
regards,
amit m.
‎2006 Oct 09 11:28 AM
hi,
first u have to create lock object using<b> SE11</b> tcode.
then it automatically create its <b>ENQUE</b> And <b>DEQUE</b> Function Module for this object and then u can use that in your Program.