<?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 in custom table from internal table.... in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-in-custom-table-from-internal-table/m-p/3980005#M950580</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;  Do like this.Select * from zcust  into table it_cust for all entriesl in ur internal table(ITAB(.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at IT_CUST.&lt;/P&gt;&lt;P&gt;read table itab with key  field1 = IT_CUST-field1.&lt;/P&gt;&lt;P&gt;if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;it_del_cust = it_cust.&lt;/P&gt;&lt;P&gt;append it_del_cust.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;Endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Modify zcust from table itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Delete zcust from table it_del_cust.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vigneswaran S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 Jun 2008 19:52:06 GMT</pubDate>
    <dc:creator>former_member491305</dc:creator>
    <dc:date>2008-06-23T19:52:06Z</dc:date>
    <item>
      <title>Update in custom table from internal table....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-in-custom-table-from-internal-table/m-p/3980004#M950579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have custom table with following entries:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ZCUST:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A---01&lt;/P&gt;&lt;P&gt;B---02&lt;/P&gt;&lt;P&gt;C---03&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now internal table in code fetches following data:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;D---04&lt;/P&gt;&lt;P&gt;B---02&lt;/P&gt;&lt;P&gt;E---05&lt;/P&gt;&lt;P&gt;B---01&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So finally based on values of internal table, the custom table should have following&lt;/P&gt;&lt;P&gt;entries in end:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;B---02&lt;/P&gt;&lt;P&gt;B---01&lt;/P&gt;&lt;P&gt;D---04&lt;/P&gt;&lt;P&gt;E---05&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if the values in custom table match with internal table then theys stay or &lt;/P&gt;&lt;P&gt;if they are not in internal table then it gets deleted (Like in this case its A and C)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rajesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jun 2008 19:42:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-in-custom-table-from-internal-table/m-p/3980004#M950579</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-23T19:42:45Z</dc:date>
    </item>
    <item>
      <title>Re: Update in custom table from internal table....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-in-custom-table-from-internal-table/m-p/3980005#M950580</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;  Do like this.Select * from zcust  into table it_cust for all entriesl in ur internal table(ITAB(.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at IT_CUST.&lt;/P&gt;&lt;P&gt;read table itab with key  field1 = IT_CUST-field1.&lt;/P&gt;&lt;P&gt;if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;it_del_cust = it_cust.&lt;/P&gt;&lt;P&gt;append it_del_cust.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;Endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Modify zcust from table itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Delete zcust from table it_del_cust.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vigneswaran S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jun 2008 19:52:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-in-custom-table-from-internal-table/m-p/3980005#M950580</guid>
      <dc:creator>former_member491305</dc:creator>
      <dc:date>2008-06-23T19:52:06Z</dc:date>
    </item>
    <item>
      <title>Re: Update in custom table from internal table....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-in-custom-table-from-internal-table/m-p/3980006#M950581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. Select all records from databse tale and store them into an internal table say i_tab1. It should contains &lt;/P&gt;&lt;P&gt;A---01&lt;/P&gt;&lt;P&gt;B---02&lt;/P&gt;&lt;P&gt;C---03&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Now loop on the main table i_tab2 that contains&lt;/P&gt;&lt;P&gt;D---04&lt;/P&gt;&lt;P&gt;B---02&lt;/P&gt;&lt;P&gt;E---05&lt;/P&gt;&lt;P&gt;B---01&lt;/P&gt;&lt;P&gt;and read i_tab1, if record matches then store them in table i_tab3.And if not matches then store them in another table i_tab4. So after loop processing these tables should contain&lt;/P&gt;&lt;P&gt;i_tab3:&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------" /&gt;&lt;P&gt;B---02&lt;/P&gt;&lt;P&gt;B---01&lt;/P&gt;&lt;P&gt;i_tab4:&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------" /&gt;&lt;P&gt;D---04&lt;/P&gt;&lt;P&gt;E---05&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Merge these table etries into a single table&lt;/P&gt;&lt;P&gt; i_final = i_tab3 + i_tab4&lt;/P&gt;&lt;P&gt;i_final:&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------" /&gt;&lt;P&gt;B---02&lt;/P&gt;&lt;P&gt;B---01&lt;/P&gt;&lt;P&gt;D---04&lt;/P&gt;&lt;P&gt;E---05&lt;/P&gt;&lt;P&gt;4. Delete all records from database table ZCUST&lt;/P&gt;&lt;P&gt;5. Update all records from int. table i_final  to table ZCUST&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;joy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Joyjit Ghosh on Jun 23, 2008 10:07 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jun 2008 20:05:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-in-custom-table-from-internal-table/m-p/3980006#M950581</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-23T20:05:47Z</dc:date>
    </item>
  </channel>
</rss>

