<?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: insert statements while using tablecontrols. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-statements-while-using-tablecontrols/m-p/5245198#M1211983</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;You will be displaying data into table control using an internal table so use this internal table to insert/update/delete your ztable from table control.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use these statements:-&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
INSERT Y00MOVIES FROM TABLE MOVIE_TAB. "insert new records
&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE&gt;
UPDATE Y00MOVIES FROM TABLE MOVIE_TAB. "update existing records
&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE&gt;
MODIFY Y00MOVIES FROM TABLE MOVIE_TAB.
"insert if no record found
"else update
&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE&gt;
DELETE Y00MOVIES FROM TABLE MOVIE_TAB. "delete existing records
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Y00MOVIES&lt;/STRONG&gt; is a ztable and &lt;STRONG&gt;MOVIE_TAB&lt;/STRONG&gt; is the internal table which is used to display data in table control on module pool screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this solves your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Tarun Gambhir&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 16 Feb 2009 07:39:24 GMT</pubDate>
    <dc:creator>I355602</dc:creator>
    <dc:date>2009-02-16T07:39:24Z</dc:date>
    <item>
      <title>insert statements while using tablecontrols.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-statements-while-using-tablecontrols/m-p/5245195#M1211980</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 am doing modulepool programming using table controls.&lt;/P&gt;&lt;P&gt;can anybody suggest me how to write insert and dalete statements in my program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&amp;amp;Regards,&lt;/P&gt;&lt;P&gt;Raji.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Feb 2009 06:27:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-statements-while-using-tablecontrols/m-p/5245195#M1211980</guid>
      <dc:creator>raji_v</dc:creator>
      <dc:date>2009-02-16T06:27:16Z</dc:date>
    </item>
    <item>
      <title>Re: insert statements while using tablecontrols.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-statements-while-using-tablecontrols/m-p/5245196#M1211981</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;simply as use in REPORT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
"for insert

      INSERT t352r FROM wa_work1.   " t352r is the name of data bse table,wa_work1 is the name of     work area  of internal table
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
"for delete
      DELETE t352r FROM TABLE it_del. 

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Arun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Feb 2009 06:57:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-statements-while-using-tablecontrols/m-p/5245196#M1211981</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-16T06:57:33Z</dc:date>
    </item>
    <item>
      <title>Re: insert statements while using tablecontrols.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-statements-while-using-tablecontrols/m-p/5245197#M1211982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;other than this ,shall i write any code.its not working .i alreaady i tried with dis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&amp;amp;Regards,&lt;/P&gt;&lt;P&gt;raji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Feb 2009 07:13:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-statements-while-using-tablecontrols/m-p/5245197#M1211982</guid>
      <dc:creator>raji_v</dc:creator>
      <dc:date>2009-02-16T07:13:47Z</dc:date>
    </item>
    <item>
      <title>Re: insert statements while using tablecontrols.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-statements-while-using-tablecontrols/m-p/5245198#M1211983</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;You will be displaying data into table control using an internal table so use this internal table to insert/update/delete your ztable from table control.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use these statements:-&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
INSERT Y00MOVIES FROM TABLE MOVIE_TAB. "insert new records
&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE&gt;
UPDATE Y00MOVIES FROM TABLE MOVIE_TAB. "update existing records
&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE&gt;
MODIFY Y00MOVIES FROM TABLE MOVIE_TAB.
"insert if no record found
"else update
&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE&gt;
DELETE Y00MOVIES FROM TABLE MOVIE_TAB. "delete existing records
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Y00MOVIES&lt;/STRONG&gt; is a ztable and &lt;STRONG&gt;MOVIE_TAB&lt;/STRONG&gt; is the internal table which is used to display data in table control on module pool screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this solves your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Tarun Gambhir&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Feb 2009 07:39:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-statements-while-using-tablecontrols/m-p/5245198#M1211983</guid>
      <dc:creator>I355602</dc:creator>
      <dc:date>2009-02-16T07:39:24Z</dc:date>
    </item>
    <item>
      <title>Re: insert statements while using tablecontrols.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-statements-while-using-tablecontrols/m-p/5245199#M1211984</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;Try the code below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PROCESS BEFORE OUTPUT.
LOOP AT itab WITH CONTROL TC. "table control name
   MODULE status_0500.
ENDLOOP.

PROCESS AFTER INPUT.
 LOOP AT itab.
    MODULE user_0500.
 ENDLOOP&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;MODULE user_0500 INPUT.

CASE ok_code.

WHEN 'INSERT'.

insert into tbl values struct. "struct is the work area with reqd values to be inserted

ENDCASE.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Feb 2009 10:15:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-statements-while-using-tablecontrols/m-p/5245199#M1211984</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-16T10:15:02Z</dc:date>
    </item>
    <item>
      <title>Re: insert statements while using tablecontrols.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-statements-while-using-tablecontrols/m-p/5245200#M1211985</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 insert&lt;/P&gt;&lt;P&gt;   INSERT&amp;lt;table name&amp;gt; FROM &amp;lt;work area&amp;gt;. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for delete&lt;/P&gt;&lt;P&gt;      DELETE &amp;lt;table name&amp;gt; FROM  &amp;lt;work area&amp;gt;. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use this in your module where u want to perform this on which ever criteria it will work...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Feb 2009 14:10:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-statements-while-using-tablecontrols/m-p/5245200#M1211985</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-16T14:10:07Z</dc:date>
    </item>
    <item>
      <title>Re: insert statements while using tablecontrols.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-statements-while-using-tablecontrols/m-p/5245201#M1211986</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi raji,&lt;/P&gt;&lt;P&gt;you question is not very much clear where and what you want to insert and delete.&lt;/P&gt;&lt;P&gt;here i am explaining that you are selecting some record in table control and it is going to save in another internal table from where you can insert it into any ztable where you want and that record will delete from your table control.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in internal table take one more field FLAG.&lt;/P&gt;&lt;P&gt;and in table control define this field so that when you will select the perticuler record it will put 'X' in internal tabel.  &lt;/P&gt;&lt;P&gt;in PAI.&lt;/P&gt;&lt;P&gt;modify your internal table ITAB1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In PBO.&lt;/P&gt;&lt;P&gt;copy this selected record into another internal table ITAB2.&lt;/P&gt;&lt;P&gt;and delete that selected records from ITAB1.&lt;/P&gt;&lt;P&gt;insert itab2 into your ztable.&lt;/P&gt;&lt;P&gt;and display itab1 into table control with less records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i think this will solve your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks &lt;/P&gt;&lt;P&gt;abhishek prakash&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Feb 2009 03:29:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-statements-while-using-tablecontrols/m-p/5245201#M1211986</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-18T03:29:55Z</dc:date>
    </item>
    <item>
      <title>Re: insert statements while using tablecontrols.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-statements-while-using-tablecontrols/m-p/5245202#M1211987</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi raji,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can see SAP provided examples for the same:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 1: Go to transaction SE38 and then in the menu choose ---&amp;gt;&lt;/P&gt;&lt;P&gt;Environment &amp;gt; Examples &amp;gt; Controls&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 2: now, select &lt;STRONG&gt;Table Control&lt;/STRONG&gt; and click on &lt;STRONG&gt;Source Code&lt;/STRONG&gt;  {double click to execute}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 3: scroll down to line 92 you will get your answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternatively, You can dirctly go to the Report Program &lt;STRONG&gt;RSDEMO02&lt;/STRONG&gt; in SE38 then to line 92.&lt;/P&gt;&lt;P&gt;{Also, there is another report called &lt;STRONG&gt;RSDEMO_TABLE_CONTROL&lt;/STRONG&gt; which shows how to delete rows from a table control}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this was of some help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Sagar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Feb 2009 08:26:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-statements-while-using-tablecontrols/m-p/5245202#M1211987</guid>
      <dc:creator>sagarmehta</dc:creator>
      <dc:date>2009-02-18T08:26:31Z</dc:date>
    </item>
  </channel>
</rss>

