<?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: Lock object not working. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object-not-working/m-p/6598655#M1437004</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;It will be like trial and error method to check where the lock is getting unlocked. &lt;/P&gt;&lt;P&gt;Try putting breakpoint at update statement in your first program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;UPDATE zcrossref FROM wa_zcrossref.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, execute your second program. and check if you are able to lock the same object now. if no then go one more step further in 1st program, then again check if you are able to lock that object in 2nd program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just check this way. So, that you will get idea at what point lock is getting released.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Archana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Feb 2010 07:27:31 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-02-11T07:27:31Z</dc:date>
    <item>
      <title>Lock object not working.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object-not-working/m-p/6598647#M1436996</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;I am trying to create a lock object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Having following doubts:&lt;/P&gt;&lt;P&gt;1) In one program, ENQUEUE function for that lock object But DEQUEUE function is not called. So the record on which the ENQUEUE function is called will remain locked for ever or only till the program ends?&lt;/P&gt;&lt;P&gt;2) 1 program ZXYZ has ENQUEUE function on one record...But it has not DEQUEUE function in it....... second program ZXYZ1 is trying to edit that record....what should happen??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;According to me, that second program should not be able to edit it until the table has given record to DEQUEUE function. Correct me if I am wrong.&lt;/P&gt;&lt;P&gt;But in these programs, Second program is able to edit the record locked by the first program. This is true if Lock Mode of the Lock object is Read Lock/Write Lock /Exclusive, Not cumulative.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know your valuable inputs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pooja&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Feb 2010 05:32:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object-not-working/m-p/6598647#M1436996</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-11T05:32:48Z</dc:date>
    </item>
    <item>
      <title>Re: Lock object not working.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object-not-working/m-p/6598648#M1436997</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;That depends on the type of lock object whether you create excluusive or shared lock object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it is shared lock then they will be able to edit simultaniously.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try changing the different type of locks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Jyo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Feb 2010 05:39:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object-not-working/m-p/6598648#M1436997</guid>
      <dc:creator>jyotheswar_p2</dc:creator>
      <dc:date>2010-02-11T05:39:11Z</dc:date>
    </item>
    <item>
      <title>Re: Lock object not working.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object-not-working/m-p/6598649#M1436998</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jyotheswar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried using all types of locks but Second program is able to edit the record.&lt;/P&gt;&lt;P&gt;I am not getting whats wrongu2026.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pooja&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Feb 2010 05:47:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object-not-working/m-p/6598649#M1436998</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-11T05:47:04Z</dc:date>
    </item>
    <item>
      <title>Re: Lock object not working.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object-not-working/m-p/6598650#M1436999</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you have to modify both programs..&lt;/P&gt;&lt;P&gt;first call enqueue function and check sy-subrc.&lt;/P&gt;&lt;P&gt;if its 0 you can carry on with edit otherwise give a message that object is locked and exit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Feb 2010 05:54:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object-not-working/m-p/6598650#M1436999</guid>
      <dc:creator>former_member188827</dc:creator>
      <dc:date>2010-02-11T05:54:00Z</dc:date>
    </item>
    <item>
      <title>Re: Lock object not working.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object-not-working/m-p/6598651#M1437000</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;Try to put the break point just after the en queue function  and one program reach at this point and then in other session run the second program  and check the enque function for same entry and see whether it is allowing you change the same record by checking sy-subrc. &lt;/P&gt;&lt;P&gt;also check in SM12 transaction for locked entries.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Feb 2010 05:54:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object-not-working/m-p/6598651#M1437000</guid>
      <dc:creator>nirajgadre</dc:creator>
      <dc:date>2010-02-11T05:54:06Z</dc:date>
    </item>
    <item>
      <title>Re: Lock object not working.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object-not-working/m-p/6598652#M1437001</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;PRE&gt;&lt;CODE&gt;1) In one program, ENQUEUE function for that lock object But DEQUEUE function is not called. So the record on which the ENQUEUE function is called will remain locked for ever or only till the program ends?
2) 1 program ZXYZ has ENQUEUE function on one record...But it has not DEQUEUE function in it....... second program ZXYZ1 is trying to edit that record....what should happen??&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If anywhere in the code Commit is used, then it will automatically DEQUEUE the lock obects. Even if you have not exclusively used DEQUEUE in you program, commit statement will do that job here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Archana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Feb 2010 05:54:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object-not-working/m-p/6598652#M1437001</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-11T05:54:24Z</dc:date>
    </item>
    <item>
      <title>Re: Lock object not working.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object-not-working/m-p/6598653#M1437002</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pooja,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have also faced the same problem.&lt;/P&gt;&lt;P&gt;But when we tried updating the table with differnent ways at the same time we didnt get any database issues.So we didnt make use of the lock object.It is still wowking fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Jyo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Feb 2010 05:55:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object-not-working/m-p/6598653#M1437002</guid>
      <dc:creator>jyotheswar_p2</dc:creator>
      <dc:date>2010-02-11T05:55:18Z</dc:date>
    </item>
    <item>
      <title>Re: Lock object not working.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object-not-working/m-p/6598654#M1437003</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;Thanks for all your replies.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please find below both the programs. SY-SUBRC is zero in both the programs.&lt;/P&gt;&lt;P&gt;Let me know if anything is wrong in the code. Commit work is not used anywhere in the program explicitly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*First Program: *&lt;/P&gt;&lt;P&gt;REPORT  ztestxyz.&lt;/P&gt;&lt;P&gt;TABLES: zcrossref.&lt;/P&gt;&lt;P&gt;DATA: wa_zcrossref TYPE zcrossref.&lt;/P&gt;&lt;P&gt;wa_zcrossref-business_unit = 'TOPS'.&lt;/P&gt;&lt;P&gt;wa_zcrossref-conversion_type = 'KS'.&lt;/P&gt;&lt;P&gt;wa_zcrossref-legacy_code = '0314'.&lt;/P&gt;&lt;P&gt;wa_zcrossref-sap_code = '0314'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'ENQUEUE_EZTEST'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    mode_zcrossref    = 'E'&lt;/P&gt;&lt;P&gt;    client            = sy-mandt&lt;/P&gt;&lt;P&gt;    business_unit     = wa_zcrossref-business_unit&lt;/P&gt;&lt;P&gt;    conversion_type   = wa_zcrossref-conversion_type&lt;/P&gt;&lt;P&gt;    legacy_code       = wa_zcrossref-legacy_code&lt;/P&gt;&lt;P&gt;    x_business_unit   = ' '&lt;/P&gt;&lt;P&gt;    x_conversion_type = ' '&lt;/P&gt;&lt;P&gt;    x_legacy_code     = ' '&lt;/P&gt;&lt;P&gt;    _scope            = '2'&lt;/P&gt;&lt;P&gt;    _wait             = ' '&lt;/P&gt;&lt;P&gt;    _collect          = ' '&lt;/P&gt;&lt;P&gt;  EXCEPTIONS&lt;/P&gt;&lt;P&gt;    foreign_lock      = 1&lt;/P&gt;&lt;P&gt;    system_failure    = 2&lt;/P&gt;&lt;P&gt;    OTHERS            = 3.&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;  MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;  WRITE: 'Sucessful.' .&lt;/P&gt;&lt;P&gt;  UPDATE zcrossref FROM wa_zcrossref.&lt;/P&gt;&lt;P&gt;  WAIT UP TO 20 SECONDS.&lt;/P&gt;&lt;P&gt;ENDIF..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Second program:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;REPORT  ztestxyz1.&lt;/P&gt;&lt;P&gt;*DATA: wa_loan TYPE zloandeposit.&lt;/P&gt;&lt;P&gt;*wa_loan-xblnr = 'FWD3939'.&lt;/P&gt;&lt;P&gt;*wa_loan-doctyp = 'AB'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*MODIFY zloandeposit FROM wa_loan.&lt;/P&gt;&lt;P&gt;Data: wa_zcrossref type zcrossref.&lt;/P&gt;&lt;P&gt;wa_zcrossref-business_unit = 'TOPS'.&lt;/P&gt;&lt;P&gt;wa_zcrossref-conversion_type = 'KS'.&lt;/P&gt;&lt;P&gt;wa_zcrossref-legacy_code = '0314'.&lt;/P&gt;&lt;P&gt;wa_zcrossref-sap_code = 'XYZ2'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UPDATE zcrossref FROM wa_zcrossref.&lt;/P&gt;&lt;P&gt;IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;  WRITE: 'Succesful.!!'.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;  MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;ENDIF.&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;Pooja&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Feb 2010 07:20:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object-not-working/m-p/6598654#M1437003</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-11T07:20:54Z</dc:date>
    </item>
    <item>
      <title>Re: Lock object not working.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object-not-working/m-p/6598655#M1437004</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;It will be like trial and error method to check where the lock is getting unlocked. &lt;/P&gt;&lt;P&gt;Try putting breakpoint at update statement in your first program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;UPDATE zcrossref FROM wa_zcrossref.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, execute your second program. and check if you are able to lock the same object now. if no then go one more step further in 1st program, then again check if you are able to lock that object in 2nd program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just check this way. So, that you will get idea at what point lock is getting released.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Archana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Feb 2010 07:27:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object-not-working/m-p/6598655#M1437004</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-11T07:27:31Z</dc:date>
    </item>
    <item>
      <title>Re: Lock object not working.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object-not-working/m-p/6598656#M1437005</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pooja,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In second program also check for the lock object and update only when Lock is successful. You can also pass WAIT ='X' in case you want program to wait for sometime to acquire lock in case table is already locked.&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;Regards,&lt;/P&gt;&lt;P&gt;Mohaiyuddin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Feb 2010 07:41:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object-not-working/m-p/6598656#M1437005</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-11T07:41:01Z</dc:date>
    </item>
    <item>
      <title>Re: Lock object not working.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object-not-working/m-p/6598657#M1437006</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;Did you find the solution to your problem? I also have the same problem. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Joyie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Apr 2010 06:17:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object-not-working/m-p/6598657#M1437006</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-12T06:17:53Z</dc:date>
    </item>
  </channel>
</rss>

