<?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 table maintenance lock in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-maintenance-lock/m-p/3294842#M788437</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i implemented a program to update/maintain a local table. The program calls SM31. The table has maintenance screen which is created by table maintenance generator. When two users want to update simultaneously, one of them locks the other. I want to add a control on one of the key fields to prevent this. If one user enters with key value A and the other enters with key value B then the system must let them both. Is that possible and how?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thx in advance,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ali&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 Jan 2008 11:34:52 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-01-02T11:34:52Z</dc:date>
    <item>
      <title>table maintenance lock</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-maintenance-lock/m-p/3294842#M788437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i implemented a program to update/maintain a local table. The program calls SM31. The table has maintenance screen which is created by table maintenance generator. When two users want to update simultaneously, one of them locks the other. I want to add a control on one of the key fields to prevent this. If one user enters with key value A and the other enters with key value B then the system must let them both. Is that possible and how?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thx in advance,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ali&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jan 2008 11:34:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-maintenance-lock/m-p/3294842#M788437</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-02T11:34:52Z</dc:date>
    </item>
    <item>
      <title>Re: table maintenance lock</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-maintenance-lock/m-p/3294843#M788438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please use transaction SE54 for the table in question and choose Events from the menu. Then i think you can choose Event number 14 (Lock / Unlock event) and write your custom code to execute a certain way when a lock scenario gets triggered.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jan 2008 16:50:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-maintenance-lock/m-p/3294843#M788438</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-02T16:50:41Z</dc:date>
    </item>
    <item>
      <title>Re: table maintenance lock</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-maintenance-lock/m-p/3294844#M788439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nareesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thx for the answer. the problem with implementing the event is that lock object (E_TABLEE) has only file name as parameter but i need to check another key field to lock/unlock the table. i think first i have to save the value somewhere and check this everytime the program is called. what do u think?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ali&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Ali Abbasgil on Jan 3, 2008 10:31 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jan 2008 09:24:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-maintenance-lock/m-p/3294844#M788439</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-03T09:24:34Z</dc:date>
    </item>
    <item>
      <title>Re: table maintenance lock</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-maintenance-lock/m-p/3294845#M788440</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you want to validate before saving, my suggestion is you can use events &lt;/P&gt;&lt;P&gt;Event 01 BEFORE_SAVE_DATA and &lt;/P&gt;&lt;P&gt;Event 02 AFTER_SAVE_DATA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In EVENT 01 BEFORE_SAVE_DATA the code can be something like this. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*-definitions in function pool&lt;/P&gt;&lt;P&gt;DATA: wa_ztable LIKE ztable, "custom table&lt;/P&gt;&lt;P&gt;      v_error_flag,&lt;/P&gt;&lt;P&gt;      f_index LIKE sy-tabix.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM before_save_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CLEAR v_error_flag.&lt;/P&gt;&lt;P&gt;  LOOP AT total.&lt;/P&gt;&lt;P&gt;    wa_ztable = total.&lt;/P&gt;&lt;P&gt;    IF &amp;lt;action&amp;gt; = neuer_eintrag OR&lt;/P&gt;&lt;P&gt;    &amp;lt;action&amp;gt; = aendern.&lt;/P&gt;&lt;P&gt;      READ TABLE extract WITH KEY total.&lt;/P&gt;&lt;P&gt;      IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;        f_index = sy-tabix.&lt;/P&gt;&lt;P&gt;      ELSE.&lt;/P&gt;&lt;P&gt;        CLEAR f_index.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      IF wa_ztable-field1 IS INITIAL OR&lt;/P&gt;&lt;P&gt;         wa_ztable-field2 IS INITIAL.&lt;/P&gt;&lt;P&gt;        MESSAGE i398(00) WITH 'Fields must not be blank.'&lt;/P&gt;&lt;P&gt;          'Data will not be saved'.&lt;/P&gt;&lt;P&gt;        v_error_flag = 'X'.&lt;/P&gt;&lt;P&gt;        EXIT.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      total = wa_ztable.&lt;/P&gt;&lt;P&gt;      MODIFY total.&lt;/P&gt;&lt;P&gt;      CHECK f_index GT 0.&lt;/P&gt;&lt;P&gt;      extract = wa_ztable.     &lt;/P&gt;&lt;P&gt;      MODIFY extract INDEX f_index.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF v_error_flag &amp;lt;&amp;gt; 'X'.&lt;/P&gt;&lt;P&gt;    sy-subrc = 0.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;    sy-subrc = 4.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jan 2008 15:57:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-maintenance-lock/m-p/3294845#M788440</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-03T15:57:29Z</dc:date>
    </item>
    <item>
      <title>Re: table maintenance lock</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-maintenance-lock/m-p/3294846#M788441</link>
      <description>&lt;P&gt;Hello;&lt;/P&gt;&lt;P&gt;i implemented a program to update/maintain a local table. The program calls SM31. The table has maintenance screen which is created by table maintenance generator. When two users want to update simultaneously, one of them locks the other. I want to add a control on one of the key fields to prevent this. If one user enters with key value A and the other enters with key value B then the system must let them both. Is that possible and how?&lt;/P&gt;&lt;P&gt;Thx in advance,&lt;/P&gt;&lt;P&gt;Ali&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Hi Ali,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I am also in same situation can u please tell how ur problem gets solved.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Thanks&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Chethan&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Feb 2008 09:29:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-maintenance-lock/m-p/3294846#M788441</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-04T09:29:02Z</dc:date>
    </item>
  </channel>
</rss>

