2007 Aug 29 1:55 PM
2007 Aug 29 1:57 PM
Using lock objects.
http://help.sap.com/saphelp_nw04s/helpdata/en/a2/3547360f2ea61fe10000009b38f839/frameset.htm
Regards,
RIch Heilman
2007 Aug 29 1:57 PM
Using lock objects.
http://help.sap.com/saphelp_nw04s/helpdata/en/a2/3547360f2ea61fe10000009b38f839/frameset.htm
Regards,
RIch Heilman
2007 Aug 30 12:43 PM
Hi,
To create a lock go to SE11 in Lock object give the name of lock object you want to create. the first character of the lock name must be E this is the naming convention..Then give the tablename and craete it..
Once it is activated automatically two function Modules are generated ENQUEUE_<LOCK OBJECT NAME> and DEQEUE_<LOCK OBJECT NAME>. To lock the record of a table at any point in the program we use ENQUEUE_<LOCK OBJECT NAME> function module however to unlock we use DEQEUE_<LOCK OBJECT NAME>. function module. generally these function modules are called inside the LOOP statement where we lock the record from Work area if we feel should be locked by passing them to the parameters of ENQEUE_<LOCK OBJECT NAME> Function module and once we require them to unlock function module EQEUE_<LOCK OBJECT NAME> is called.
<b>Kindly reward points for helpfull answers</b>
Thanks and Regards
Tanweer
2007 Aug 30 1:20 PM
Hi,
Goto tcode SE11
choose "lock object" (the last option)
Give a name starts with 'E' follwed by ur table name.For Ex: EZTESTTAB.And
click on create.
give description .
click on Tables tab.
jus give name of the table on which u want to create the lock ...and lock mode.
There r differrent kind of locks:
Lock mode E: This sets a lock for changing data for single user. This lock can be accumulated.
Lock mode X: This mode is used like mode E for changing data. The only technical difference from mode E is that the respective lock does not allow accumulation.
Lock mode S: This mode ensures that data displayed in your program cannot be changed by other users during the entire display time. Here you do not want to change the data yourself (allows read only access for data).
then add or remove secondary tables if u r table have any ..
jus save and active.
after this the system will automaticall create two functiona modules named
ENQUEUE_<UR lockname> -for locking a table
DEQUEUE_<UR lockname> -for unlocking a table.
u can call these function modules directly in ur report to lock and unlock that table.
Reward if useful.
Thanks,
jyothi D