<?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 Help about locking in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-about-locking/m-p/3765107#M905858</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can any body help me..I want locking. When I opened my report , no body can open at the same time.I am giving input 'AUFNR' and 'WERKS'.&lt;/P&gt;&lt;P&gt;eg. when I entered in my report with werks 1105 and aufnr 10001115 then no body can enter in report with the same plant and aufnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rakesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 02 May 2008 10:28:10 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-05-02T10:28:10Z</dc:date>
    <item>
      <title>Help about locking</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-about-locking/m-p/3765107#M905858</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can any body help me..I want locking. When I opened my report , no body can open at the same time.I am giving input 'AUFNR' and 'WERKS'.&lt;/P&gt;&lt;P&gt;eg. when I entered in my report with werks 1105 and aufnr 10001115 then no body can enter in report with the same plant and aufnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rakesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2008 10:28:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-about-locking/m-p/3765107#M905858</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-02T10:28:10Z</dc:date>
    </item>
    <item>
      <title>Re: Help about locking</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-about-locking/m-p/3765108#M905859</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Rakesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can lock the table using Lock objects. First create a lock object in SE11 and then call the below FM in your program under your condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Procedure for creating lock objects :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1)Go to se11 transaction.&lt;/P&gt;&lt;P&gt;2)Click on lock object radio button and give a lock object name starting with 'E'.For example 'ESAMPLE'.Click CREATE.&lt;/P&gt;&lt;P&gt;3)In the TABLE tab, you can give the table name for which you require a lock.In the LOCK PARAMETERS tab,you can give the table fields based on which the table should be locked.&lt;/P&gt;&lt;P&gt;4)Call a function module in your program ENQUEUE_lockobjectname to obtain a lock on the required table.In our example the FM will be ENQUEUE_ESAMPLE.&lt;/P&gt;&lt;P&gt;5)To release the lock on the table,call the function module DEQUEUE_lockobjectname.In our example the FM will be DEQUEUE_ESAMPLE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2008 10:40:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-about-locking/m-p/3765108#M905859</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-02T10:40:10Z</dc:date>
    </item>
    <item>
      <title>Re: Help about locking</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-about-locking/m-p/3765109#M905860</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;there may  not be direct solution .. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For this i have proposal ...  Create One Z table which will hold the User name and the AUFNR and WERKS , as soon as user  runs report you update the table and commit the work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assume that some other user is entered same values . You check the ztable for the same AUFNR and werks  before report executes ,  if present  then give the error 'USER(From z table entry) is already running with these values  else continue the report .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once report is excuted ,, Your last statement Should Delete the current record in table.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you are not allowed to create Z table you can use table .. INDX and export the values , it will present in the same unless you delete it &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;Badari&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2008 10:53:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-about-locking/m-p/3765109#M905860</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-02T10:53:37Z</dc:date>
    </item>
    <item>
      <title>Re: Help about locking</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-about-locking/m-p/3765110#M905861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rakesh,&lt;/P&gt;&lt;P&gt;I think u have to create one Ztable for this with keys werks and aufnr. In the START OF SELECTION event insert a record into ur Ztable with input AUFNR and WERKS. In the end of source code of ur program Delete the same record from Ztable. U have to put small piece of code in ur report also. Before inserting the record in to ztbale u have to check whether an entry exist in the table or not. If exist then give some message. Else Insert that entry and proceed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This logic will be safe if u dont have any error messages from START OF SELECTION event. If u are giving any error messages in or after start of selection then do ROLLBACK WORK just before error message so that the record u created will not be updated to data base otherwise u can never execute for the same record with out deleting it from database. So ur Ztable has records only during the execution of the report. Check below the skeleton of code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTIOn SCREEN&lt;/P&gt;&lt;P&gt;do ur validations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START OF SELECTION&lt;/P&gt;&lt;P&gt;SELECT SINGLE * from Ztab WHERE aufnr eq p_aufnr&lt;/P&gt;&lt;P&gt;and werks eq p_werks.&lt;/P&gt;&lt;P&gt;If sy-subrc IS initial.&lt;/P&gt;&lt;P&gt;MESSAGE i000 WITH 'User is already processing this plant and doc'.&lt;/P&gt;&lt;P&gt;EXIT.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;wa_ztab-aufnr = p_aufnr.&lt;/P&gt;&lt;P&gt;wa_ztab-werks = p_werks.&lt;/P&gt;&lt;P&gt;INSER wa_ztab INTO ztab.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;proceed with ur logic and finally&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DELETE ztab WHERE  aufnr = p_aufnr and werks = p_werks&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this is clear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vinod.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Vinod Kumar Vemuru on May 2, 2008 4:28 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2008 10:55:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-about-locking/m-p/3765110#M905861</guid>
      <dc:creator>vinod_vemuru2</dc:creator>
      <dc:date>2008-05-02T10:55:41Z</dc:date>
    </item>
  </channel>
</rss>

