<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Delete user form table - 	need good advice in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-user-form-table-need-good-advice/m-p/6043830#M1351265</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tables 6 Z tables with user as foreign key ,for every table i create lock object &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question what is the best way to handle the delete scenario with the locking concept.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. in case i want to delete all user data from all the table but just 1 and 2 are with data on the user do i need to lock all the tables ?(sounds not good idea) &lt;/P&gt;&lt;P&gt;2. Do read before delete and then use enque and dequeue in case sy-subrc = 0 after selection .&lt;/P&gt;&lt;P&gt;I am not sure with the performance aspects since the tables can have more then 100000 users&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Other  idea ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Chris Teb on Aug 9, 2009 2:46 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 09 Aug 2009 09:34:56 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-08-09T09:34:56Z</dc:date>
    <item>
      <title>Delete user form table - 	need good advice</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-user-form-table-need-good-advice/m-p/6043830#M1351265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tables 6 Z tables with user as foreign key ,for every table i create lock object &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question what is the best way to handle the delete scenario with the locking concept.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. in case i want to delete all user data from all the table but just 1 and 2 are with data on the user do i need to lock all the tables ?(sounds not good idea) &lt;/P&gt;&lt;P&gt;2. Do read before delete and then use enque and dequeue in case sy-subrc = 0 after selection .&lt;/P&gt;&lt;P&gt;I am not sure with the performance aspects since the tables can have more then 100000 users&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Other  idea ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Chris Teb on Aug 9, 2009 2:46 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Aug 2009 09:34:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-user-form-table-need-good-advice/m-p/6043830#M1351265</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-09T09:34:56Z</dc:date>
    </item>
    <item>
      <title>Re: Delete user form table - 	need good advice</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-user-form-table-need-good-advice/m-p/6043831#M1351266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. SAP lock concept is at the transaction level, not the table level. I mean, for example: if you only have one transaction to update all 6 tables, and one table is the superior table of the 5 others, then you just need to enqueue the superior table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.You can lock generically (for example all records) in one enqueue command.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Aug 2009 17:55:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-user-form-table-need-good-advice/m-p/6043831#M1351266</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2009-08-09T17:55:02Z</dc:date>
    </item>
    <item>
      <title>Re: Delete user form table - 	need good advice</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-user-form-table-need-good-advice/m-p/6043832#M1351267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Sandra ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What does it mean ,_SAP lock concept is at the transaction level, not the table level_&lt;/P&gt;&lt;P&gt;the tables are update on runtime with some ws ,&lt;/P&gt;&lt;P&gt;in case one of my method (the delete user are invoked )  i don't need to lock all the table just one ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can u give some example ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Aug 2009 18:08:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-user-form-table-need-good-advice/m-p/6043832#M1351267</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-09T18:08:00Z</dc:date>
    </item>
    <item>
      <title>Re: Delete user form table - 	need good advice</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-user-form-table-need-good-advice/m-p/6043833#M1351268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's difficult to answer more precisely without information on your tables, the various ways how they can be updated, etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With an example, say, a transaction for updating materials. There are many database tables for materials, but you may only use one lock object with the material number (another user can't change the material at the same time).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you create a new transaction for updating one table of the material, you must not use another lock object than for the 1st transaction, otherwise 2 users would be able to access a same data of a material through the 2 transactions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now please give us more information on your tables, the various ways how they can be updated, etc.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Aug 2009 19:09:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-user-form-table-need-good-advice/m-p/6043833#M1351268</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2009-08-09T19:09:50Z</dc:date>
    </item>
    <item>
      <title>Re: Delete user form table - 	need good advice</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-user-form-table-need-good-advice/m-p/6043834#M1351269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Sandra,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is a part from the table i had.&lt;/P&gt;&lt;P&gt;X = key&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table 1&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;mandt
user     X
cdate
ctime&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;table 2&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;mandt
user X
application id  X
application type 
cdate
...&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;table 3&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;mandt
user  X
application id  X
application type X 
application name&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cdate&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;table 4&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;mandt
user  X
application id  X
application type X 
application name  X
application version
....&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and so on ...&lt;/P&gt;&lt;P&gt;table are relate with foreign key &lt;/P&gt;&lt;P&gt;for all of this table i create lock object and since i new to this topic (just read on the help and F1) &lt;/P&gt;&lt;P&gt;i want to consult with u on the solution .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for instance  i want to delete user application version from table 4 ,i lock  table 4 and delete the value. &lt;/P&gt;&lt;P&gt;&lt;U&gt;but what i should do if i want to delete the specific user from all of the tables ?&lt;/U&gt;&lt;/P&gt;&lt;P&gt;how to handle this situation  ? the simple way is to lock one table at a time but i am not sure that this is the best thing to do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Aug 2009 21:38:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-user-form-table-need-good-advice/m-p/6043834#M1351269</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-09T21:38:31Z</dc:date>
    </item>
    <item>
      <title>Re: Delete user form table - 	need good advice</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-user-form-table-need-good-advice/m-p/6043835#M1351270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using a lock object makes sense only if a user can be deleted from the 6 tables at the same time it is deleted from 1 table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Even if this situation may happen, your database (RDBMS) should handle this situation because it locks the deleted record(s) so there would be a conflict. A SAP lock object is at a higher level: it keeps users from starting to maintain an object if another user has already started to maintain it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Aug 2009 22:03:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-user-form-table-need-good-advice/m-p/6043835#M1351270</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2009-08-09T22:03:23Z</dc:date>
    </item>
    <item>
      <title>Re: Delete user form table - 	need good advice</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-user-form-table-need-good-advice/m-p/6043836#M1351271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Sandra,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So what is the bottom line ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if i want to delete user from all of the table i need to lock each table ?&lt;/P&gt;&lt;P&gt;and if i want to delete user entry from one table i use just one lock&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Aug 2009 08:51:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-user-form-table-need-good-advice/m-p/6043836#M1351271</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-10T08:51:33Z</dc:date>
    </item>
    <item>
      <title>Re: Delete user form table - 	need good advice</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-user-form-table-need-good-advice/m-p/6043837#M1351272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sorry to not be clear enough. I hope this message is more helpful :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you use web services, it is probably better that you work in stateless mode (*) (in short, it means that the context is deleted after the execution of a web service), it means that &lt;STRONG&gt;using lock objects here makes no sense&lt;/STRONG&gt;. Perhaps locks should be handled by the external application. Moreover, your RDBMS will lock the records ensuring one of two concurrent deletions would fail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(*) maybe web services always work in stateless mode, I don't know &amp;lt;-- added by: Sandra Rossi on Aug 10, 2009 11:19 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Aug 2009 09:19:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-user-form-table-need-good-advice/m-p/6043837#M1351272</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2009-08-10T09:19:06Z</dc:date>
    </item>
    <item>
      <title>Re: Delete user form table - 	need good advice</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-user-form-table-need-good-advice/m-p/6043838#M1351273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Sandra &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;one thing that i forget to mention (important one ,sorry &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;  )  is that i have maintance view &lt;/P&gt;&lt;P&gt;for all the table so the admin can update some records manually .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Aug 2009 09:28:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-user-form-table-need-good-advice/m-p/6043838#M1351273</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-10T09:28:18Z</dc:date>
    </item>
    <item>
      <title>Re: Delete user form table - 	need good advice</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-user-form-table-need-good-advice/m-p/6043839#M1351274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In your web service, you may check E_TABLEE lock object (the one used by SM30), repeat for each table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Aug 2009 10:13:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-user-form-table-need-good-advice/m-p/6043839#M1351274</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2009-08-10T10:13:41Z</dc:date>
    </item>
    <item>
      <title>Re: Delete user form table - 	need good advice</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-user-form-table-need-good-advice/m-p/6043840#M1351275</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Sandra,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can u please provide some high level pseudo code ( or process ) how to handle this situation &lt;/P&gt;&lt;P&gt;i want to verify that understand your concept before i going the implementation .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you !!!!&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;p.s.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually i think that i need to see if i can lock in the maintenance view every time one record&lt;/P&gt;&lt;P&gt;one line and not all the table .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Chris Teb on Aug 10, 2009 12:42 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Aug 2009 10:37:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-user-form-table-need-good-advice/m-p/6043840#M1351275</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-10T10:37:41Z</dc:date>
    </item>
    <item>
      <title>Re: Delete user form table - 	need good advice</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-user-form-table-need-good-advice/m-p/6043841#M1351276</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But SM30 locks the whole table! How could you know which record he maintains? Anyway, the admin will maintain this table rarely, won't he?&lt;/P&gt;&lt;P&gt;If you want to lock one record, you must create your own "sm30" (simple is to copy the dedicated function group and adapt lock algorithm).&lt;/P&gt;&lt;P&gt;But maybe it is simpler to not manage locks at all, don't you think? (as the admin should rarely update these tables... and in your application, is it important to prevent 2 updates at the same moment? the last will win that's all)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to see a snippet, check sap library example : &lt;A href="http://help.sap.com/saphelp_nw2004s/helpdata/en/af/22ab01dd0b11d1952000a0c929b3c3/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw2004s/helpdata/en/af/22ab01dd0b11d1952000a0c929b3c3/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Aug 2009 11:04:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-user-form-table-need-good-advice/m-p/6043841#M1351276</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2009-08-10T11:04:56Z</dc:date>
    </item>
  </channel>
</rss>

