<?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 Re: Issue in locking Table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-in-locking-table/m-p/4664309#M1097286</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;Lock the table before updating it and check the locking with sy-subrc and if it is not locked then use do loop to lock the table.&lt;/P&gt;&lt;P&gt;See the dummy code ,hope it will help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do n times.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Lock the table&lt;/P&gt;&lt;P&gt;*Check sy-subrc if it is 0 exit the loop else &lt;/P&gt;&lt;P&gt;try again.&lt;/P&gt;&lt;P&gt;if locking is suceessfull.&lt;/P&gt;&lt;P&gt;set a flag.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;Enddo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If flag is not set give the message table is not locked.&lt;/P&gt;&lt;P&gt;else if it is locked then proceed with updation&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Neha shukla&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Oct 2008 17:38:03 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-10-21T17:38:03Z</dc:date>
    <item>
      <title>Issue in locking Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-in-locking-table/m-p/4664306#M1097283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to update a  ZTABLE with UNIQUE serial number while creating shipment and Delivery.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have used ENQUEUE_E_TABLE to lock the table before updating table in both the ZProgram which will update the serial numbers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is even though i locked the table , i am facing problem with creation of duplicate number serial numbers while shipment and delivery happens at the same time.We have tested this with multiuser environment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since both shipment and delivery updating in UPDATE TASK i coudnt use COMMIT WORK in the programs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if there are any tricks how to lock the table and also for using COMMIT WORK inside UPDATE TASK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Give some example program for locking tables especialy used in update task.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;kandakumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Oct 2008 16:29:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-in-locking-table/m-p/4664306#M1097283</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-21T16:29:47Z</dc:date>
    </item>
    <item>
      <title>Re: Issue in locking Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-in-locking-table/m-p/4664307#M1097284</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;U should lock the table before updating it in UPDATE TASK process, in order to stop the saving if the lock is still active.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Oct 2008 16:40:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-in-locking-table/m-p/4664307#M1097284</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-21T16:40:45Z</dc:date>
    </item>
    <item>
      <title>Re: Issue in locking Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-in-locking-table/m-p/4664308#M1097285</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;are you checking for locks before updating the table. SAP locks using lock object is not a physical lock, so unless you check for that and check sy-subrc after check, it will still allow you to update the record&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Oct 2008 16:42:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-in-locking-table/m-p/4664308#M1097285</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-21T16:42:07Z</dc:date>
    </item>
    <item>
      <title>Re: Issue in locking Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-in-locking-table/m-p/4664309#M1097286</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;Lock the table before updating it and check the locking with sy-subrc and if it is not locked then use do loop to lock the table.&lt;/P&gt;&lt;P&gt;See the dummy code ,hope it will help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do n times.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Lock the table&lt;/P&gt;&lt;P&gt;*Check sy-subrc if it is 0 exit the loop else &lt;/P&gt;&lt;P&gt;try again.&lt;/P&gt;&lt;P&gt;if locking is suceessfull.&lt;/P&gt;&lt;P&gt;set a flag.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;Enddo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If flag is not set give the message table is not locked.&lt;/P&gt;&lt;P&gt;else if it is locked then proceed with updation&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Neha shukla&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Oct 2008 17:38:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-in-locking-table/m-p/4664309#M1097286</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-21T17:38:03Z</dc:date>
    </item>
    <item>
      <title>Re: Issue in locking Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-in-locking-table/m-p/4664310#M1097287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;ENQUEUE_E_TABLE  is used to lock the table when ever the Zprogram has run.&lt;/P&gt;&lt;P&gt;when u r editing the table and running the program will give an error .and change the logic part in ur code .. and unlock the table after completion of updation.&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;Bharani&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Oct 2008 17:44:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-in-locking-table/m-p/4664310#M1097287</guid>
      <dc:creator>BH2408</dc:creator>
      <dc:date>2008-10-21T17:44:58Z</dc:date>
    </item>
  </channel>
</rss>

