<?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: Update Command Issue in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-command-issue/m-p/3037970#M718799</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May be i may have maximum 300 to 400 records each time since this job will run every 30 minutes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so is it takes long time ? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Right now it is taking 180 seconds .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Seshu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 30 Oct 2007 15:23:46 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-30T15:23:46Z</dc:date>
    <item>
      <title>Update Command Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-command-issue/m-p/3037965#M718794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a scenarion to update only few fields to custom tables .&lt;/P&gt;&lt;P&gt;Here i should not use Modify command since other program runs every five minutes to update other fields in same table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some how the below program is not updating the data .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See the program and can you please tell me about performance if i use update within loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables : zwvbak.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : int_zwvbak     LIKE zwvbak     OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : begin of  wa_zwvbak ,&lt;/P&gt;&lt;P&gt;       vbeln like zwvbak-vbeln,&lt;/P&gt;&lt;P&gt;       BELNR like zwvbak-belnr,&lt;/P&gt;&lt;P&gt;       ZZINVDATE like zwvbak-ZZINVDATE,&lt;/P&gt;&lt;P&gt;       ZZINVTIME like zwvbak-ZZINVTIME,&lt;/P&gt;&lt;P&gt;       end of wa_zwvbak.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: f1 type i,&lt;/P&gt;&lt;P&gt;      f2 type i,&lt;/P&gt;&lt;P&gt;      f3 type i.&lt;/P&gt;&lt;P&gt;parameters p_vdatu like zwvbak-vdatu obligatory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  select * from zwvbak into corresponding fields of table int_zwvbak&lt;/P&gt;&lt;P&gt;                            where vdatu = p_vdatu.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  get run time field f1.&lt;/P&gt;&lt;P&gt;  loop at int_zwvbak.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    clear : wa_zwvbak.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; Accounting document number&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    MOVE '87999' TO wa_zwvbak-belnr.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;            Invoice date&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    move sy-datum to wa_zwvbak-zzinvdate.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;            Invoice Time&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    move sy-uzeit to wa_zwvbak-zzinvtime.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;            Sales order number&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;                                     .&lt;/P&gt;&lt;P&gt;    move int_zwvbak-vbeln to wa_zwvbak-vbeln.&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'&lt;/P&gt;&lt;P&gt;         EXPORTING&lt;/P&gt;&lt;P&gt;           INPUT         =  wa_zwvbak-vbeln&lt;/P&gt;&lt;P&gt;         IMPORTING&lt;/P&gt;&lt;P&gt;           OUTPUT        = wa_zwvbak-vbeln&lt;/P&gt;&lt;P&gt;  .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    UPDATE zwvbak SET: zzinvdate  = wa_zwvbak-zzinvdate&lt;/P&gt;&lt;P&gt;                       zzinvtime  = wa_zwvbak-zzinvtime&lt;/P&gt;&lt;P&gt;                       belnr = wa_zwvbak-belnr&lt;/P&gt;&lt;P&gt;                  WHERE vbeln    = wa_zwvbak-vbeln.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   commit work.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  update zwvbak from table int_zwvbak.&lt;/P&gt;&lt;P&gt;  commit work.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;  get run time field f2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  f3 = f2 - f1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;all inputs are welcome.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Seshu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2007 14:46:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-command-issue/m-p/3037965#M718794</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-30T14:46:04Z</dc:date>
    </item>
    <item>
      <title>Re: Update Command Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-command-issue/m-p/3037966#M718795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using UPDATE from Table will be a better option as it will hit the database only once.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can schedule this program in such a way that it doesn't collide with the Other program schedule.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Abhishek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2007 14:50:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-command-issue/m-p/3037966#M718795</guid>
      <dc:creator>former_member195698</dc:creator>
      <dc:date>2007-10-30T14:50:57Z</dc:date>
    </item>
    <item>
      <title>Re: Update Command Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-command-issue/m-p/3037967#M718796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It looks to me like you are updating individual lines within the table in the loop, but then updating it again, setting it back the way it was in the final UPDATE statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2007 15:07:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-command-issue/m-p/3037967#M718796</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-30T15:07:54Z</dc:date>
    </item>
    <item>
      <title>Re: Update Command Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-command-issue/m-p/3037968#M718797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Rob, I just kept some dummy code here.. anyhow when i use client specified it works fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please explain about update within loop,is it performance issue since i should not use update or modify outside of the loop .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have many programs to update same table based on some conditions,if all programs are on same time it would be issue if i use modify statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope you got my point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Seshu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2007 15:12:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-command-issue/m-p/3037968#M718797</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-30T15:12:57Z</dc:date>
    </item>
    <item>
      <title>Re: Update Command Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-command-issue/m-p/3037969#M718798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would use the table update so long as the amount of data is reasonably small. If it is large, you have to split it into a number of updates with a COMMIT in between. This is done in order to avoid dumping when the rollback area is filled.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2007 15:20:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-command-issue/m-p/3037969#M718798</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-30T15:20:35Z</dc:date>
    </item>
    <item>
      <title>Re: Update Command Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-command-issue/m-p/3037970#M718799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May be i may have maximum 300 to 400 records each time since this job will run every 30 minutes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so is it takes long time ? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Right now it is taking 180 seconds .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Seshu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2007 15:23:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-command-issue/m-p/3037970#M718799</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-30T15:23:46Z</dc:date>
    </item>
    <item>
      <title>Re: Update Command Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-command-issue/m-p/3037971#M718800</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is VBELN the first field in the primary key of your table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2007 15:26:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-command-issue/m-p/3037971#M718800</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-30T15:26:30Z</dc:date>
    </item>
    <item>
      <title>Re: Update Command Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-command-issue/m-p/3037972#M718801</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes VBELN is the Key field .&lt;/P&gt;&lt;P&gt;custom tables contains only one key field called VBELN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Seshu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2007 15:29:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-command-issue/m-p/3037972#M718801</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-30T15:29:43Z</dc:date>
    </item>
    <item>
      <title>Re: Update Command Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-command-issue/m-p/3037973#M718802</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The time does seem excessive, but I don't really know why.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One thing I would defineitely do would be to get rod of the colon (&lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt; in the UPDATE statement. If you mis-place a comma in it as well, you can end up updating the entire database incorrectly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2007 17:58:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-command-issue/m-p/3037973#M718802</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-30T17:58:59Z</dc:date>
    </item>
    <item>
      <title>Re: Update Command Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-command-issue/m-p/3037974#M718803</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Abhishek  and Rob.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is solved using update command within loop ,but little bit performance issue when you compare to modify command in out of loop.( 30 seconds extra).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your support.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Seshu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Nov 2007 18:35:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-command-issue/m-p/3037974#M718803</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-01T18:35:23Z</dc:date>
    </item>
  </channel>
</rss>

