2009 Mar 08 7:56 AM
Hi all,
I have a report with a selection screen having one parameter in which the user can put a table name(Custom table) and some other paremeters.Based on these parameters I need to delete records from table put on the selection screen.Before deeting I need to lock the table. As beforehand I dont know the table name how can I create lock object dynamically lock my table ?
Please suggest some idea...
2009 Mar 08 12:15 PM
Firstly, put your table name into table DD25L-ROOTTAB. You'll get DD25L-VIEWNAME as a lock object.
Secondly, put VIEWNAME to table DD27S-VIEWNAME to extract all lock parameter.
This solution will applicable for table which has already created lock object.
In case you want to create lock object dynamically without manually create also, generate BDC for this matter is one idea.
Cheers,
Thanagit
2009 Mar 08 8:08 AM
2009 Mar 08 12:09 PM
But how to create the lock object dynamically? It is not possible to create lock object in SE11....
2009 Mar 08 12:15 PM
Firstly, put your table name into table DD25L-ROOTTAB. You'll get DD25L-VIEWNAME as a lock object.
Secondly, put VIEWNAME to table DD27S-VIEWNAME to extract all lock parameter.
This solution will applicable for table which has already created lock object.
In case you want to create lock object dynamically without manually create also, generate BDC for this matter is one idea.
Cheers,
Thanagit
2009 Mar 09 1:19 PM
Hi,
while u enter the table name on the selection screen run a bdc in the background creating Lock Object in SE11, Provide the table name to the BDC and create a lock object for that table..
now, pass the lock object created to the FM ENQUEUE_E_TABLE ...
the table is locked dynamically..
try this out
thanks
ravi
Edited by: Ravi Aswani on Mar 9, 2009 2:19 PM
2009 Mar 10 9:50 AM
have a look
[table|http://help.sap.com/saphelp_nwpi71/helpdata/en/af/22ab01dd0b11d1952000a0c929b3c3/content.htm]
Regards
Shashi
2009 Mar 10 11:46 AM
Hi,
check below link
http://help.sap.com/erp2005_ehp_03/helpdata/EN/7b/f9813712f7434be10000009b38f8cf/frameset.htm
Regards,
Madhu
2009 Apr 05 9:59 AM
Hi bose,
check this link..........
http://help.sap.com/saphelp_nw70/helpdata/en/cf/21eef3446011d189700000e8322d00/content.htm
With Regard's
Shaik.
2009 Apr 10 2:07 PM
HI,
you dont need to create lock object for locking table entries. you can also lock table dynamically by using this FM VIEW_ENQUEUE.
Edited by: peranandam chinnathambi on Apr 10, 2009 3:07 PM
2009 Apr 11 12:07 AM
The solution Thanagit proposes, retrieving the already existing lock object from DD tables is the only one which has sense.
There's no point in generating the lock object dynamically and then using it, since no other program (which could be using the same records to be deleted) will lock the table anyway...
2009 Apr 13 5:43 AM
Hi,
go through this link----
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eebf446011d189700000e8322d00/frameset.htm
regards,
Prashant