<?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: problems with locking the table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-locking-the-table/m-p/3132741#M744291</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;better use abap command wait :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; WAIT UP TO time SECONDS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Dec 2007 08:59:21 GMT</pubDate>
    <dc:creator>andreas_mann3</dc:creator>
    <dc:date>2007-12-06T08:59:21Z</dc:date>
    <item>
      <title>problems with locking the table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-locking-the-table/m-p/3132740#M744290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please look into the following code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; DATA : lw_time TYPE t,&lt;/P&gt;&lt;P&gt;               lw_wait_time TYPE t VALUE '001000',&lt;/P&gt;&lt;P&gt;               lw_date TYPE d,&lt;/P&gt;&lt;P&gt;               lw_uname LIKE sy-msgv1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        CLEAR: lw_time, lw_date.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get cumulative total for condition record&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Lock the table first; unlock takes places in USEREXIT_SAVE_DOCUMENT:&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        CALL FUNCTION 'ENQUEUE_EZ_QUANT'&lt;/P&gt;&lt;P&gt;          EXPORTING&lt;/P&gt;&lt;P&gt;            mode_zsd_quotas_quant       = 'E'&lt;/P&gt;&lt;P&gt;            mandt                       = sy-mandt&lt;/P&gt;&lt;P&gt;            knumh                       = xkomv-knumh&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        X_KNUMH                     = ' '&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;/UL&gt;&lt;P&gt;            _wait                       = 'X'&lt;/P&gt;&lt;UL&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;        IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Try to set the lock on the record for next 10 minutes.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;If still you don't then raise the error message.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          GET TIME.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;To add 10 minutes to the existing time, we can use the following&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;function module 'DIMP_ADD_TIME'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          CALL FUNCTION 'DIMP_ADD_TIME'&lt;/P&gt;&lt;P&gt;            EXPORTING&lt;/P&gt;&lt;P&gt;              iv_starttime = sy-uzeit&lt;/P&gt;&lt;P&gt;              iv_startdate = sy-datum&lt;/P&gt;&lt;P&gt;              iv_addtime   = lw_wait_time&lt;/P&gt;&lt;P&gt;            IMPORTING&lt;/P&gt;&lt;P&gt;              ev_endtime   = lw_time&lt;/P&gt;&lt;P&gt;              ev_enddate   = lw_date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          WHILE sy-uzeit LT lw_time.&lt;/P&gt;&lt;P&gt;            CALL FUNCTION 'ENQUEUE_EZ_QUANT'&lt;/P&gt;&lt;P&gt;             EXPORTING&lt;/P&gt;&lt;P&gt;               mode_zsd_quotas_quant       = 'E'&lt;/P&gt;&lt;P&gt;               mandt                       = sy-mandt&lt;/P&gt;&lt;P&gt;               knumh                       = xkomv-knumh&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;              X_KNUMH                     = ' '&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;/UL&gt;&lt;P&gt;               _wait                       = 'X'&lt;/P&gt;&lt;UL&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;            IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;              CLEAR lw_time.&lt;/P&gt;&lt;P&gt;              EXIT.&lt;/P&gt;&lt;P&gt;            ENDIF.&lt;/P&gt;&lt;P&gt;          ENDWHILE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          IF sy-uzeit &amp;gt;= lw_time AND sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;            MOVE sy-msgv1 TO lw_uname.&lt;/P&gt;&lt;P&gt;            MESSAGE e064(zsdsls) WITH&lt;/P&gt;&lt;P&gt;             'User' lw_uname 'is locking the table ZSD_quant.&lt;/P&gt;&lt;P&gt;          ENDIF.&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;the problem here is  i am not getting the error message when i run the transacton VA02 and wait for 10minutes .  But when i  run VA02 ,debug and reach the error message i am getting the  message exactly after 10 minutes. please help me what could be the problem&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Dec 2007 08:36:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-locking-the-table/m-p/3132740#M744290</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-06T08:36:30Z</dc:date>
    </item>
    <item>
      <title>Re: problems with locking the table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-locking-the-table/m-p/3132741#M744291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;better use abap command wait :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; WAIT UP TO time SECONDS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Dec 2007 08:59:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-locking-the-table/m-p/3132741#M744291</guid>
      <dc:creator>andreas_mann3</dc:creator>
      <dc:date>2007-12-06T08:59:21Z</dc:date>
    </item>
  </channel>
</rss>

