‎2008 Feb 29 10:20 AM
Hi,
i have made three custom tcodes:
1. Form create
2. Form change
3. Display.
(Like standard SAP).
I want to implement the functionality that if somebody has opened say formno 20 in change mode.
Nobody shud open form 20 again.
It shud show a message 'Form 20 is currently edited by --- user'
Points will b awarded.
regards,
Nishant
‎2008 Feb 29 10:28 AM
Hi Nishant,
To lock objects, SAP provides some Function Modules starting with ENQUEUE. Example, to lock Table LTAP SAP provides FM ENQUEUE_ELLTAPE.
Similarly, to unlock we have FM starting with DEQUEUE. Example, to unlock table LTAP we use FM DEQUEUE_ELLTAPE.
So, search the FM that meets your requirement.
check this link for more info:
http://help.sap.com/saphelp_nw04/helpdata/en/a2/3547360f2ea61fe10000009b38f839/frameset.htm
Reward me if useful,
Harimanjesh AN
‎2008 Feb 29 10:29 AM
In your program when you go into Edit mode for a form, call the FM
ENQUEUE_ESINDX with RELID = 'ZZ' and your form name. If the FM returns SUBRC greater than 0, then throw the message .
Hope this helps.
Thanks,
Balaji
‎2008 Feb 29 10:37 AM
Hi Nishant,
SAP provies LOCK OBJECTS to lock the database table and always provides exclusive access for editing and updating the Database.
All Locking Function Modules starts with ENQUEUE. Example to lock table LTAP, we can use FM ENQUEUE_ELLTAPE.
Similarly all unlocking function modules starts with DEQUEUE. To unlock table LTAP we can use function module DEQUEUE_ELLTAPE.
check this link for more info:
http://help.sap.com/saphelp_nw04/helpdata/en/a2/3547360f2ea61fe10000009b38f839/frameset.htm
Reward me if useful....
Harimanjesh AN