<?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 Database access by Multiple users in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-access-by-multiple-users/m-p/3733854#M898678</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a ztable and the user has to access the ztable to find the max of  ID to insert the next record. This ID increment was done in coding level. It was working fine when a user hit the DB. If multiple user access the same, it throws the error as duplicate records. How to solve this? Can any one give the soln for this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance,&lt;/P&gt;&lt;P&gt;Pon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Apr 2008 08:24:26 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-04-23T08:24:26Z</dc:date>
    <item>
      <title>Database access by Multiple users</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-access-by-multiple-users/m-p/3733854#M898678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a ztable and the user has to access the ztable to find the max of  ID to insert the next record. This ID increment was done in coding level. It was working fine when a user hit the DB. If multiple user access the same, it throws the error as duplicate records. How to solve this? Can any one give the soln for this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance,&lt;/P&gt;&lt;P&gt;Pon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Apr 2008 08:24:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-access-by-multiple-users/m-p/3733854#M898678</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-23T08:24:26Z</dc:date>
    </item>
    <item>
      <title>Re: Database access by Multiple users</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-access-by-multiple-users/m-p/3733855#M898679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use lock mechanism to prevent two users access the same table at a time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Apr 2008 08:33:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-access-by-multiple-users/m-p/3733855#M898679</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-23T08:33:29Z</dc:date>
    </item>
    <item>
      <title>Re: Database access by Multiple users</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-access-by-multiple-users/m-p/3733856#M898680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Murugesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;whenever you are updating the data into table through the report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you need to lock the table before inserting into the table and unloak after inserting the records into the Table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;locking.&lt;/P&gt;&lt;P&gt;FORM lock_spotter.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;  LOOP AT gt_spotter INTO gs_spotter.&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'ENQUEUE_EZSPOTTERS'&lt;/P&gt;&lt;P&gt;         EXPORTING&lt;/P&gt;&lt;P&gt;              mode_zspotters = 'E'&lt;/P&gt;&lt;P&gt;              aktnr          = gs_spotter-aktnr&lt;/P&gt;&lt;P&gt;              artnr          = gs_spotter-artnr&lt;/P&gt;&lt;P&gt;              mebme          = gs_spotter-mebme&lt;/P&gt;&lt;P&gt;              unique_key     = gs_spotter-unique_key&lt;/P&gt;&lt;P&gt;              x_aktnr        = ' '&lt;/P&gt;&lt;P&gt;              x_artnr        = ' '&lt;/P&gt;&lt;P&gt;              x_mebme        = ' '&lt;/P&gt;&lt;P&gt;              x_unique_key   = ' '&lt;/P&gt;&lt;P&gt;              _scope         = '2'&lt;/P&gt;&lt;P&gt;              _wait          = ' '&lt;/P&gt;&lt;P&gt;              _collect       = 'X'&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;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;  ENDLOOP.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'FLUSH_ENQUEUE'&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;  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;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;unlocking&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT gt_spotter INTO gs_spotter.&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'DEQUEUE_EZSPOTTERS'&lt;/P&gt;&lt;P&gt;         EXPORTING&lt;/P&gt;&lt;P&gt;              mode_zspotters = 'E'&lt;/P&gt;&lt;P&gt;              aktnr          = gs_spotter-aktnr&lt;/P&gt;&lt;P&gt;              artnr          = gs_spotter-artnr&lt;/P&gt;&lt;P&gt;              mebme          = gs_spotter-mebme&lt;/P&gt;&lt;P&gt;              unique_key     = gs_spotter-unique_key&lt;/P&gt;&lt;P&gt;              x_aktnr        = ' '&lt;/P&gt;&lt;P&gt;              x_artnr        = ' '&lt;/P&gt;&lt;P&gt;              x_mebme        = ' '&lt;/P&gt;&lt;P&gt;              x_unique_key   = ' '&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;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;  ENDLOOP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this will help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Madhavi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Apr 2008 09:15:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-access-by-multiple-users/m-p/3733856#M898680</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-23T09:15:09Z</dc:date>
    </item>
    <item>
      <title>Re: Database access by Multiple users</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-access-by-multiple-users/m-p/3733857#M898681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could use a custom number range to give you the next available id. That way multiple users can create records without issue.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Apr 2008 13:16:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-access-by-multiple-users/m-p/3733857#M898681</guid>
      <dc:creator>che_eky</dc:creator>
      <dc:date>2008-04-23T13:16:30Z</dc:date>
    </item>
  </channel>
</rss>

