‎2008 Jun 23 10:39 PM
Hi,
I am doing a Mass Material group change project where the existing Material groups have to be changed to a new one in all the related tables.
And i would be doing a direct update programs.
So before doing this, in my program i would like to know if the table is Locked if not do a DB lock and then carry on with the table updates.
I see that i can find the SAP Lock objects for the table from DD025L table and then use it in my program i.e FM: ENQUEUE_"Lockobject".
But not all tables have LOck objects.
Is there any other way to find if any of the table is locked and use the Lock mechanism. (maybe a common way for all tables)
Regards,
Mid.
‎2008 Jun 24 5:52 AM
Hi Midhun,
Check the tcode SM12 which gives the list of all tables and the records(argument) which are locked........
this tcode uses the FM ENQUEUE_READ and v can also use it if v need to find the locked tables in our z-prog.......
Cheers,
Jose.
‎2008 Jun 24 12:59 PM
Thanks Jose,
Using ENQUEUE_READ we can read Lock entries, is there any common FM to Lock the table at Client level?
or should we use only the respective Lock object FM for the corresponsing table
Mid.
‎2008 Jun 24 1:09 PM
Hi,
I think there is no such generic std FM......n is better to use lock objects fms...........
lock across clients/lock for a client is determined by the table's mandt field of the table locked i.e if its a cross client table it is locked across the clients else only on dat client..
Cheers,
Jose.