<?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 lock object in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object/m-p/3858145#M927339</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i have created a database table, now i have created a program&lt;/P&gt;&lt;P&gt;with this code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'ENQUEUE_EZLOCK3'&lt;/P&gt;&lt;P&gt; EXPORTING&lt;/P&gt;&lt;P&gt;   MODE_ZINT_TAB5       = 'E'&lt;/P&gt;&lt;P&gt;   A                    = 'manu'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  X_A                  = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   _SCOPE               = '2'&lt;/P&gt;&lt;P&gt;   _WAIT                = ' '&lt;/P&gt;&lt;P&gt;   _COLLECT             = ' '&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FOREIGN_LOCK         = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  SYSTEM_FAILURE       = 2&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  OTHERS               = 3&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the record with A field manu shud have been locked&lt;/P&gt;&lt;P&gt;but during debugging(stopping after execution of this FM)&lt;/P&gt;&lt;P&gt;i edited this record from se11.&lt;/P&gt;&lt;P&gt;it allowed me to do&lt;/P&gt;&lt;P&gt;but it shud not have allowed as the program i am executing has a lock on that entry&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 May 2008 08:31:51 GMT</pubDate>
    <dc:creator>manubhutani</dc:creator>
    <dc:date>2008-05-19T08:31:51Z</dc:date>
    <item>
      <title>lock object</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object/m-p/3858145#M927339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i have created a database table, now i have created a program&lt;/P&gt;&lt;P&gt;with this code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'ENQUEUE_EZLOCK3'&lt;/P&gt;&lt;P&gt; EXPORTING&lt;/P&gt;&lt;P&gt;   MODE_ZINT_TAB5       = 'E'&lt;/P&gt;&lt;P&gt;   A                    = 'manu'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  X_A                  = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   _SCOPE               = '2'&lt;/P&gt;&lt;P&gt;   _WAIT                = ' '&lt;/P&gt;&lt;P&gt;   _COLLECT             = ' '&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FOREIGN_LOCK         = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  SYSTEM_FAILURE       = 2&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  OTHERS               = 3&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the record with A field manu shud have been locked&lt;/P&gt;&lt;P&gt;but during debugging(stopping after execution of this FM)&lt;/P&gt;&lt;P&gt;i edited this record from se11.&lt;/P&gt;&lt;P&gt;it allowed me to do&lt;/P&gt;&lt;P&gt;but it shud not have allowed as the program i am executing has a lock on that entry&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 May 2008 08:31:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object/m-p/3858145#M927339</guid>
      <dc:creator>manubhutani</dc:creator>
      <dc:date>2008-05-19T08:31:51Z</dc:date>
    </item>
    <item>
      <title>Re: lock object</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object/m-p/3858146#M927340</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;try givin manu in caps 'MANU'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and also check the example function module&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE enqueue INPUT.&lt;/P&gt;&lt;P&gt;  CASE ok_code.&lt;/P&gt;&lt;P&gt;    WHEN 'ENQUEUE'.&lt;/P&gt;&lt;P&gt;      CALL FUNCTION 'ENQUEUE_EDEMOFLHT'&lt;/P&gt;&lt;P&gt;           EXPORTING&lt;/P&gt;&lt;P&gt;                mode_sflight   = 'X'&lt;/P&gt;&lt;P&gt;                carrid         = sflight-carrid&lt;/P&gt;&lt;P&gt;                connid         = sflight-connid&lt;/P&gt;&lt;P&gt;                fldate         = sflight-fldate&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;&lt;/P&gt;&lt;P&gt;      CASE sy-subrc.&lt;/P&gt;&lt;P&gt;        WHEN 0.&lt;/P&gt;&lt;P&gt;          MESSAGE i888 WITH 'Enqueue successful'(001).&lt;/P&gt;&lt;P&gt;        WHEN 1.&lt;/P&gt;&lt;P&gt;          text = sy-msgv1.&lt;/P&gt;&lt;P&gt;          MESSAGE e888 WITH 'Record already'(002) 'locked by'(003)&lt;/P&gt;&lt;P&gt;                                                   text.&lt;/P&gt;&lt;P&gt;          CALL TRANSACTION 'SM12'.&lt;/P&gt;&lt;P&gt;        WHEN 2 OR 3.&lt;/P&gt;&lt;P&gt;          MESSAGE e888 WITH 'Error in enqueue!'(004)&lt;/P&gt;&lt;P&gt;                            'SY-SUBRC:' sy-subrc.&lt;/P&gt;&lt;P&gt;      ENDCASE.&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;prasanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 May 2008 08:39:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object/m-p/3858146#M927340</guid>
      <dc:creator>prasanth_kasturi</dc:creator>
      <dc:date>2008-05-19T08:39:21Z</dc:date>
    </item>
    <item>
      <title>Re: lock object</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object/m-p/3858147#M927341</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;its still not working&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 May 2008 08:45:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object/m-p/3858147#M927341</guid>
      <dc:creator>manubhutani</dc:creator>
      <dc:date>2008-05-19T08:45:59Z</dc:date>
    </item>
    <item>
      <title>Re: lock object</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object/m-p/3858148#M927342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i think the only problemwith ur code cud b wronmg position of breakpoint..&lt;/P&gt;&lt;P&gt;put breakpoint just after this function module and before dequeue..&lt;/P&gt;&lt;P&gt;then the object will get locked..&lt;/P&gt;&lt;P&gt;the example ion which i worked is shown below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; CALL FUNCTION 'ENQUEUE_EZ98442EMPL'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        MODE_Z98442EMPL       = 'E'&lt;/P&gt;&lt;P&gt;        MANDT                 = SY-MANDT&lt;/P&gt;&lt;P&gt;        EMPID                 = EMPID&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       X_EMPID               = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       _SCOPE                = '2'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       _WAIT                 = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       _COLLECT              = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&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;               .&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;     ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please reward if u find this useful..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks and regards&lt;/P&gt;&lt;P&gt;palak&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 May 2008 12:06:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object/m-p/3858148#M927342</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-19T12:06:57Z</dc:date>
    </item>
    <item>
      <title>Re: lock object</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object/m-p/3858149#M927343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Manu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem might be due to the client field(MANDT) which you have not included in the lock object, it is mandatory to be included in the table as well in the lock object. Try to add it to the table and lock object, check it again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Muthu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 May 2008 12:34:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object/m-p/3858149#M927343</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-19T12:34:49Z</dc:date>
    </item>
    <item>
      <title>Re: lock object</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object/m-p/3858150#M927344</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi manu&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Minimum fields required to maintain in the FM are: MODE, MANDT and fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the below code which may help youu2026&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;To lock the table records VEPO.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      CALL FUNCTION 'ENQUEUE_EZ_VEPOZZMDV01'&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;P&gt;          mode_vepo = lc_e&lt;/P&gt;&lt;P&gt;          mandt     = sy-mandt&lt;/P&gt;&lt;P&gt;          venum     = gwa_vepo-venum&lt;/P&gt;&lt;P&gt;          vepos     = gwa_vepo-vepos.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Updating the database table VEPO for the field ZZMDV01 based on the fields&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;VENUM and VEPOS and updating with the screen filed value MDV01 (Production Line).&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      UPDATE vepo SET zzmdv01 = gv_mdv01&lt;/P&gt;&lt;P&gt;        WHERE venum = gwa_vepo-venum&lt;/P&gt;&lt;P&gt;          AND vepos = gwa_vepo-vepos.&lt;/P&gt;&lt;P&gt;      IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;        COMMIT WORK.&lt;/P&gt;&lt;P&gt;      ENDIF.                            " IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;To unlock the table records VEPO.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      CALL FUNCTION 'DEQUEUE_EZ_VEPOZZMDV01'&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;P&gt;          mode_vepo = lc_e&lt;/P&gt;&lt;P&gt;          mandt     = sy-mandt&lt;/P&gt;&lt;P&gt;          venum     = gwa_vepo-venum&lt;/P&gt;&lt;P&gt;          vepos     = gwa_vepo-vepos.&lt;/P&gt;&lt;P&gt;    ENDLOOP.                            " LOOP AT gi_vepo INTO gwa_vepo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So try to check the table records after the ENQUEUE Function module and try to maintain the Client field MANDT in the FM.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2008 10:09:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object/m-p/3858150#M927344</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-20T10:09:49Z</dc:date>
    </item>
    <item>
      <title>Re: lock object</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object/m-p/3858151#M927345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Query is you r able edit the entries in se11,after calling the Lock FM.Which it should..(Data base Lock is different as it will be taken care by the system)&lt;/P&gt;&lt;P&gt;1)Call another session execute the same program and test it by editing the same field  the lock would have been enabled.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Objective of the lock FM is to restrict users using paralleling the same program,and trying to edit the same record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mukundan.R&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 May 2008 06:30:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object/m-p/3858151#M927345</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-22T06:30:56Z</dc:date>
    </item>
  </channel>
</rss>

