<?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 Update issue in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-issue/m-p/1928639#M384983</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;I need to make an update statement for a table PA2006.&lt;/P&gt;&lt;P&gt;for which I have picked the records which r required to be updated . &lt;/P&gt;&lt;P&gt;Then in the loop I am trying to update the table , &lt;/P&gt;&lt;P&gt;but it changes the records except the last one .&lt;/P&gt;&lt;P&gt;Am not able to find the error . &lt;/P&gt;&lt;P&gt;I am enclosing my piece of code , &lt;/P&gt;&lt;P&gt;just varify if anyting seems to be missing..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;code &lt;/P&gt;&lt;P&gt;  LOOP AT it_2006_upd INTO wa_2006_upd.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF wa_2006_upd-ktart = '35'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      CONCATENATE sy-datum+6(2) '.'&lt;/P&gt;&lt;P&gt;                  sy-datum+4(2) '.'&lt;/P&gt;&lt;P&gt;                  sy-datum+0(4)&lt;/P&gt;&lt;P&gt;                  INTO g_tdlangu.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      UPDATE pa2006 SET sprps = 'X' flag4 = 'F' tdlangu = sy-datum&lt;/P&gt;&lt;P&gt;      WHERE pernr = wa_2006_upd-pernr and&lt;/P&gt;&lt;P&gt;            subty = wa_2006_upd-subty and&lt;/P&gt;&lt;P&gt;            seqnr = wa_2006_upd-seqnr and&lt;/P&gt;&lt;P&gt;            begda = wa_2006_upd-begda and&lt;/P&gt;&lt;P&gt;            endda = wa_2006_upd-endda and&lt;/P&gt;&lt;P&gt;            quonr = wa_2006_upd-quonr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    clear wa_2006_upd.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 12 Feb 2007 11:33:33 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-02-12T11:33:33Z</dc:date>
    <item>
      <title>Update issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-issue/m-p/1928639#M384983</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;I need to make an update statement for a table PA2006.&lt;/P&gt;&lt;P&gt;for which I have picked the records which r required to be updated . &lt;/P&gt;&lt;P&gt;Then in the loop I am trying to update the table , &lt;/P&gt;&lt;P&gt;but it changes the records except the last one .&lt;/P&gt;&lt;P&gt;Am not able to find the error . &lt;/P&gt;&lt;P&gt;I am enclosing my piece of code , &lt;/P&gt;&lt;P&gt;just varify if anyting seems to be missing..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;code &lt;/P&gt;&lt;P&gt;  LOOP AT it_2006_upd INTO wa_2006_upd.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF wa_2006_upd-ktart = '35'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      CONCATENATE sy-datum+6(2) '.'&lt;/P&gt;&lt;P&gt;                  sy-datum+4(2) '.'&lt;/P&gt;&lt;P&gt;                  sy-datum+0(4)&lt;/P&gt;&lt;P&gt;                  INTO g_tdlangu.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      UPDATE pa2006 SET sprps = 'X' flag4 = 'F' tdlangu = sy-datum&lt;/P&gt;&lt;P&gt;      WHERE pernr = wa_2006_upd-pernr and&lt;/P&gt;&lt;P&gt;            subty = wa_2006_upd-subty and&lt;/P&gt;&lt;P&gt;            seqnr = wa_2006_upd-seqnr and&lt;/P&gt;&lt;P&gt;            begda = wa_2006_upd-begda and&lt;/P&gt;&lt;P&gt;            endda = wa_2006_upd-endda and&lt;/P&gt;&lt;P&gt;            quonr = wa_2006_upd-quonr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    clear wa_2006_upd.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Feb 2007 11:33:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-issue/m-p/1928639#M384983</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-12T11:33:33Z</dc:date>
    </item>
    <item>
      <title>Re: Update issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-issue/m-p/1928640#M384984</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check the return code also put a commit work and wait in. If you are running it in debug mode, this will trigger the commits for you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Feb 2007 11:37:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-issue/m-p/1928640#M384984</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-12T11:37:26Z</dc:date>
    </item>
    <item>
      <title>Re: Update issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-issue/m-p/1928641#M384985</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;U can also do as&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT it_2006_upd INTO wa_2006_upd.

IF wa_2006_upd-ktart = '35'

CONCATENATE sy-datum+6(2) '.'
sy-datum+4(2) '.'
sy-datum+0(4)
INTO wa_2006_upd-tdlangu.
wa_2006_upd-sprps = 'X'.
wa_2006_upd-flag4  = 'F'.

UPDATE pa2006 FROM wa_2006_upd.
ENDIF.
clear wa_2006_upd.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Feb 2007 11:40:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-issue/m-p/1928641#M384985</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-12T11:40:07Z</dc:date>
    </item>
  </channel>
</rss>

