<?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: data in table control in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-in-table-control/m-p/4268862#M1018602</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;For Example: &lt;/P&gt;&lt;P&gt;1.In change mode-&amp;gt; Few records are edited and few records are added.&lt;/P&gt;&lt;P&gt;2.Save (PAI)&lt;/P&gt;&lt;P&gt;Just code &lt;/P&gt;&lt;P&gt;SET HANDLER gr_event_handler-&amp;gt;handle_data_changed&lt;/P&gt;&lt;P&gt;                                           FOR obj_alv.&lt;/P&gt;&lt;P&gt;        SET HANDLER gr_event_handler-&amp;gt;handle_data_changed_finished&lt;/P&gt;&lt;P&gt;                                           FOR obj_alv.&lt;/P&gt;&lt;P&gt;3.Then all record are populate in the internal table.&lt;/P&gt;&lt;P&gt;4.Then check what are primary field are already exit in Data base table, move that records in one internal table.&lt;/P&gt;&lt;P&gt;-&amp;gt;UPDATE U'R_database_table FROM TABLE internal_tab1_modify.&lt;/P&gt;&lt;P&gt;5.then get all the record that not exist in database table into another internal table.&lt;/P&gt;&lt;P&gt;-&amp;gt;insert U'R_database_table  FROM TABLE internal_tab1_insert.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;sendil.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 Jul 2008 12:00:12 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-07-29T12:00:12Z</dc:date>
    <item>
      <title>data in table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-in-table-control/m-p/4268860#M1018600</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' ve created a table control in modulepool screen. I want to &lt;/P&gt;&lt;P&gt;retrieve data  into tablecontrol from a custom table and i want save the data in&lt;/P&gt;&lt;P&gt;custom table if i enter new data in table control.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me in this regard.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jul 2008 08:17:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-in-table-control/m-p/4268860#M1018600</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-29T08:17:45Z</dc:date>
    </item>
    <item>
      <title>Re: data in table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-in-table-control/m-p/4268861#M1018601</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi...&lt;/P&gt;&lt;P&gt;Say your table control name is TC,&lt;/P&gt;&lt;P&gt;And declare one intrenal table with required fields in that table control.... say it ITAB.&lt;/P&gt;&lt;P&gt;Also declare one more internal table like your custom table... &lt;/P&gt;&lt;P&gt;Declare work areas for both...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  In the PBO event of that screen....&lt;/P&gt;&lt;P&gt;&amp;gt; MODULE fill_itab&lt;/P&gt;&lt;P&gt;&amp;gt; LOOP AT   ITAB&lt;/P&gt;&lt;P&gt;&amp;gt;       WITH CONTROL TC&lt;/P&gt;&lt;P&gt;&amp;gt;       CURSOR TC-CURRENT_LINE.&lt;/P&gt;&lt;P&gt;&amp;gt; ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Write Code like following...in that MODULE..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; Select *  from &amp;lt;db table&amp;gt; into corresponding fields of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To modify custom table....&lt;/P&gt;&lt;P&gt;Arrange one push button like MODIFY in your screen....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now make some changes in your table control....&lt;/P&gt;&lt;P&gt;and click on MODIFY....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In PAI event for MODIFY button you hav to write code like following..,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; loop at jtab into wa_jtab.&lt;/P&gt;&lt;P&gt;&amp;gt; read table itab into wa_itab with key f1 = wa_jtab-f1.&lt;/P&gt;&lt;P&gt;&amp;gt; if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&amp;gt; wa_jtab-f1 = wa_itab-f1.&lt;/P&gt;&lt;P&gt;&amp;gt; modify &amp;lt;database table&amp;gt; from wa_jtab.&lt;/P&gt;&lt;P&gt;&amp;gt; endif.&lt;/P&gt;&lt;P&gt;&amp;gt; endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try like this...,&lt;/P&gt;&lt;P&gt;All the best,&lt;/P&gt;&lt;P&gt;Get back again if any logic required...!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naveen.I&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jul 2008 08:44:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-in-table-control/m-p/4268861#M1018601</guid>
      <dc:creator>naveen_inuganti2</dc:creator>
      <dc:date>2008-07-29T08:44:32Z</dc:date>
    </item>
    <item>
      <title>Re: data in table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-in-table-control/m-p/4268862#M1018602</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;For Example: &lt;/P&gt;&lt;P&gt;1.In change mode-&amp;gt; Few records are edited and few records are added.&lt;/P&gt;&lt;P&gt;2.Save (PAI)&lt;/P&gt;&lt;P&gt;Just code &lt;/P&gt;&lt;P&gt;SET HANDLER gr_event_handler-&amp;gt;handle_data_changed&lt;/P&gt;&lt;P&gt;                                           FOR obj_alv.&lt;/P&gt;&lt;P&gt;        SET HANDLER gr_event_handler-&amp;gt;handle_data_changed_finished&lt;/P&gt;&lt;P&gt;                                           FOR obj_alv.&lt;/P&gt;&lt;P&gt;3.Then all record are populate in the internal table.&lt;/P&gt;&lt;P&gt;4.Then check what are primary field are already exit in Data base table, move that records in one internal table.&lt;/P&gt;&lt;P&gt;-&amp;gt;UPDATE U'R_database_table FROM TABLE internal_tab1_modify.&lt;/P&gt;&lt;P&gt;5.then get all the record that not exist in database table into another internal table.&lt;/P&gt;&lt;P&gt;-&amp;gt;insert U'R_database_table  FROM TABLE internal_tab1_insert.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;sendil.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jul 2008 12:00:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-in-table-control/m-p/4268862#M1018602</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-29T12:00:12Z</dc:date>
    </item>
  </channel>
</rss>

