<?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: database table not updating with the changes in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-table-not-updating-with-the-changes/m-p/6608970#M1438592</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nitwick,&lt;/P&gt;&lt;P&gt;                  I have already used the append module and it is populating the internal table with the changed data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please suggest me how to pick one particular record from ztable so that we can modify the changed record in ztable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My scenario :&lt;/P&gt;&lt;P&gt;                          I had slpno (Gate Number) as key field. For single slpno, there may be multiple records in the ztable.&lt;/P&gt;&lt;P&gt;So, in tablecontrol iam fetching the records for one particular slpno. &lt;/P&gt;&lt;P&gt;Then, Iam changing one record from tablecontrol. After clicking SAVE button,  it should pick the appropriate slpno in the ztable and update the change I did in the tablecontrol.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for you views,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Murali Krishna T&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Feb 2010 13:56:29 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-02-03T13:56:29Z</dc:date>
    <item>
      <title>database table not updating with the changes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-table-not-updating-with-the-changes/m-p/6608966#M1438588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi friends,&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;P&gt;                Iam having a tablecontrol where iam gettting the data from the ztable for a particular key field.  When i change certain fields in the table control and when i click save, it should update the changes in the ztable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   module save output.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
   modify zslip_po1 from table x_po1_slip.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here slpno is the key field.  if I change a field for a particular slpno it should update the changes for that slpno value only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but it is not updating the changes. although iam setting the slpno field dynamically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please give me ideas.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks and regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Murali Krishna T&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Feb 2010 10:04:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-table-not-updating-with-the-changes/m-p/6608966#M1438588</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-03T10:04:13Z</dc:date>
    </item>
    <item>
      <title>Re: database table not updating with the changes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-table-not-updating-with-the-changes/m-p/6608967#M1438589</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;Just use &lt;/P&gt;&lt;P&gt;MODIFY ZTAB FROM ITAB " without using TABLE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AND ensure that the structure of internal table ITAB matches exactly with the database table&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Feb 2010 10:26:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-table-not-updating-with-the-changes/m-p/6608967#M1438589</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-03T10:26:45Z</dc:date>
    </item>
    <item>
      <title>Re: database table not updating with the changes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-table-not-updating-with-the-changes/m-p/6608968#M1438590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Radhika,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                 I think the response you have given works for inserting new records to the ztable. But this is not the case for my requirement. Iam having already some records. I need to change the data and update in the database ( ztable).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For this iam using a table control which gets the data from ztable.  Iam changing already existed data and When i save , it should update in the ztable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please provide your suggestions,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&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;Murali Krishna T&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Feb 2010 11:04:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-table-not-updating-with-the-changes/m-p/6608968#M1438590</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-03T11:04:21Z</dc:date>
    </item>
    <item>
      <title>Re: database table not updating with the changes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-table-not-updating-with-the-changes/m-p/6608969#M1438591</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;Have you tried debugging?&lt;/P&gt;&lt;P&gt;I think the problem is your changed data are not getting populated into the internal table. It seems to be retaining the data that you pulled initially from the database table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the PAI &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
LOOP AT itab.
MODULE perform_change.
ENDLOOP.

MODULE perform_change INPUT.
  "After the changed data has been captured into the work area
MODIFY itab FROM wa_tab INDEX tab_con-CURRENT_LINE.
ENDMODULE.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Feb 2010 11:24:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-table-not-updating-with-the-changes/m-p/6608969#M1438591</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-03T11:24:50Z</dc:date>
    </item>
    <item>
      <title>Re: database table not updating with the changes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-table-not-updating-with-the-changes/m-p/6608970#M1438592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nitwick,&lt;/P&gt;&lt;P&gt;                  I have already used the append module and it is populating the internal table with the changed data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please suggest me how to pick one particular record from ztable so that we can modify the changed record in ztable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My scenario :&lt;/P&gt;&lt;P&gt;                          I had slpno (Gate Number) as key field. For single slpno, there may be multiple records in the ztable.&lt;/P&gt;&lt;P&gt;So, in tablecontrol iam fetching the records for one particular slpno. &lt;/P&gt;&lt;P&gt;Then, Iam changing one record from tablecontrol. After clicking SAVE button,  it should pick the appropriate slpno in the ztable and update the change I did in the tablecontrol.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for you views,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Murali Krishna T&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Feb 2010 13:56:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-table-not-updating-with-the-changes/m-p/6608970#M1438592</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-03T13:56:29Z</dc:date>
    </item>
    <item>
      <title>Re: database table not updating with the changes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-table-not-updating-with-the-changes/m-p/6608971#M1438593</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;1. Have 2 Internal Tables, the first one must contain the original data(before change ) and the second one  contains the update data(after changed ie. table control data).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. loop the first table and read the data from the second table using index.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. inside the loop, compare the work area of both the internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   if both are same, then no change was made to that particular record, so no need for updation&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;   if both are not same, then some changes were made on that record, so need to update.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. use modify command to update that particular record from the work area.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i think in performance wise also this logic will be helpful, since we are updating only the changed record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;since this is addon table, so i hope the no of records will also less, so no need to worry about loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check with this, it may work out......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you,&lt;/P&gt;&lt;P&gt;SenthilPandi C&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: SenthilPandi ChandraSekaran on Feb 4, 2010 5:36 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Feb 2010 12:06:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-table-not-updating-with-the-changes/m-p/6608971#M1438593</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-04T12:06:00Z</dc:date>
    </item>
  </channel>
</rss>

