<?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: Regarding Database MODIFY in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-database-modify/m-p/6472581#M1417524</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sandeep,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No Need for locks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; As MODIFY statement automatically sets a database lock until the next database commit or database rollback.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Possible cause for not updating the records could be.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;At least one line could not be processed as there is already a line with the same unique name secondary index in the database table.&lt;/STRONG&gt;  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;means duplicay of records, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For ex 96 records are inserted so these 96 records contains unique entries in there primary key fields, rest 4 records doesn't contain unique entries in primary key fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for ex in table MSEG- document number is a key field, so you can not put same material number twice,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly check your data which you are updating in your table, As key fields should have unique entries. This will definately solve your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Saurabh siwach&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Jan 2010 09:54:20 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-01-18T09:54:20Z</dc:date>
    <item>
      <title>Regarding Database MODIFY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-database-modify/m-p/6472578#M1417521</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 updating(or Insert)  database table in a user - Exit, using MODIFY statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On a particualr date, they have created 100 documents. But, in that 96 documents are inserted into the Custom data base table. But, 4 documents are not inserted. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, can you please tell me. what are the chances of a "MODIFY" statment can fail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the 2 users are inserting simultaneuously, is there any chance of fail in MODIFY?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not using any locks in my code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not using an Commit work here as this is user exit. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code :&lt;/P&gt;&lt;P&gt;MODIFY DBTAB from WA.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jan 2010 09:36:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-database-modify/m-p/6472578#M1417521</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-18T09:36:10Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Database MODIFY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-database-modify/m-p/6472579#M1417522</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Modify statement updates the existing entries and inserts new entries.&lt;/P&gt;&lt;P&gt;You can check the sy-subrc value after modify statement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jan 2010 09:50:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-database-modify/m-p/6472579#M1417522</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2010-01-18T09:50:19Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Database MODIFY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-database-modify/m-p/6472580#M1417523</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;1. You doing &lt;STRONG&gt;INSERT&lt;/STRONG&gt;. If exist record with same key field your new record will not insert.&lt;/P&gt;&lt;P&gt;2. You doing &lt;STRONG&gt;MODIFY&lt;/STRONG&gt;. If &lt;STRONG&gt;not&lt;/STRONG&gt; exist record - line could not be updated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jan 2010 09:52:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-database-modify/m-p/6472580#M1417523</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-18T09:52:31Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Database MODIFY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-database-modify/m-p/6472581#M1417524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sandeep,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No Need for locks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; As MODIFY statement automatically sets a database lock until the next database commit or database rollback.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Possible cause for not updating the records could be.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;At least one line could not be processed as there is already a line with the same unique name secondary index in the database table.&lt;/STRONG&gt;  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;means duplicay of records, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For ex 96 records are inserted so these 96 records contains unique entries in there primary key fields, rest 4 records doesn't contain unique entries in primary key fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for ex in table MSEG- document number is a key field, so you can not put same material number twice,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly check your data which you are updating in your table, As key fields should have unique entries. This will definately solve your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Saurabh siwach&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jan 2010 09:54:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-database-modify/m-p/6472581#M1417524</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-18T09:54:20Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Database MODIFY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-database-modify/m-p/6472582#M1417525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sourabh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I checked my entries. The document number is unique. So, there is no problem is Primary key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, if 2 users are simultaneously inserting into database, then because of these locks, is there any chance that, for the second user , the MODIFY can fail?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sandeep&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jan 2010 10:09:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-database-modify/m-p/6472582#M1417525</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-18T10:09:18Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Database MODIFY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-database-modify/m-p/6472583#M1417526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sandeep,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes If 2 users simeltaneously Modify records in standard table, Then Modify will fail for second user. SAP Suggests that there has to be a fraction of seconds difference between 2 modify on same standard table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use Dequeue Function module to unlock the entries, BUt That is not the right approach and not recommended by SAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Saurabh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jan 2010 05:24:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-database-modify/m-p/6472583#M1417526</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-19T05:24:38Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Database MODIFY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-database-modify/m-p/6472584#M1417527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sy-subrc Meaning for modify statement &lt;/P&gt;&lt;P&gt;0 At least one line was changed. &lt;/P&gt;&lt;P&gt;4 No lines were changed, since no suitable line was found for the insertion using the table key, or the specified index was greater than the current number of lines for the insertion using the table index.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jan 2010 05:39:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-database-modify/m-p/6472584#M1417527</guid>
      <dc:creator>anup_deshmukh4</dc:creator>
      <dc:date>2010-01-19T05:39:34Z</dc:date>
    </item>
  </channel>
</rss>

