<?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: Populate Table from Table Control in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/populate-table-from-table-control/m-p/3644550#M877624</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 will explain it with an example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assume that my screen has 3 fields and a table control with 5 fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Screen fields: FIELD1, FIELD2, FIELD3&lt;/P&gt;&lt;P&gt;Table control name: CTR_TAB&lt;/P&gt;&lt;P&gt;Fields in table control: WA_TAB-TAB1, WA_TAB-TAB2, WA_TAB-TAB3, WA_TAB-TAB4, WA_TAB-TAB5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All fields are editable in the screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My ABAP program declarations:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: begin of tt_tab,&lt;/P&gt;&lt;P&gt;            tab1(10) type c,&lt;/P&gt;&lt;P&gt;            tab2(10) type c,&lt;/P&gt;&lt;P&gt;            tab3(10) type c,&lt;/P&gt;&lt;P&gt;            tab4(10) type c,&lt;/P&gt;&lt;P&gt;            tab5(10) type c,&lt;/P&gt;&lt;P&gt;            field1(10) type c,&lt;/P&gt;&lt;P&gt;            field2(10) type c,&lt;/P&gt;&lt;P&gt;            field3(10) type c,&lt;/P&gt;&lt;P&gt;            end of tt_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: it_tab type standard table of tt_tab,&lt;/P&gt;&lt;P&gt;          wa_tab type tt_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Screen flow logic:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROCESS BEFORE OUTPUT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE STATUS_1000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT IT_TAB INTO WA_TAB WITH CONTROL CTR_TAB.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROCESS AFTER INPUT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT IT_TAB.&lt;/P&gt;&lt;P&gt;MODULE UPDATE_TAB.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE USER_COMMAND_1000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Include program for modules and subroutines:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE UPDATE_TAB.&lt;/P&gt;&lt;P&gt;WA_TAB-FIELD1 = FIELD1.&lt;/P&gt;&lt;P&gt;WA_TAB-FIELD2 = FIELD2.&lt;/P&gt;&lt;P&gt;WA_TAB-FIELD3 = FIELD3.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Other fields will be automatically transferred to the workarea WA_TAB&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;since they have same name in screen and ABAP program&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;APPEND WA_TAB INTO IT_TAB.&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE USER_COMMAND_1000.&lt;/P&gt;&lt;P&gt;CASE OK_CODE.&lt;/P&gt;&lt;P&gt;WHEN 'SAVE'.&lt;/P&gt;&lt;P&gt;   INSERT INTO &amp;lt;TABLENAME&amp;gt; VALUES FROM IT_TAB.&lt;/P&gt;&lt;P&gt;ENDCASE.&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Lakshmi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 20 Apr 2008 11:36:34 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-04-20T11:36:34Z</dc:date>
    <item>
      <title>Populate Table from Table Control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/populate-table-from-table-control/m-p/3644547#M877621</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to populate my Table Control from keyboard and then populate my transparent table from this data that has been typed in the TC when 'SAVE'. The internal table I created for this purpose seems to clear of data when my  program goes into the loop in the PBO. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The screen contains five fields (not in the TC) and 4 inside the TC. The 9 fields consist of the internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assistance will be rewarded.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Apr 2008 12:43:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/populate-table-from-table-control/m-p/3644547#M877621</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-19T12:43:25Z</dc:date>
    </item>
    <item>
      <title>Re: Populate Table from Table Control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/populate-table-from-table-control/m-p/3644548#M877622</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;Please check if you are populating the screen fields into your internal table in the PAI of the screen flow logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PBO transfers the values from your ABAP program to screen fields and PAI transfers values from the screen fields to your ABAP program. For this the screen and ABAP program should have the same field names. In case of table control this transfer happens the LOOP in the screen flow logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In PAI, write the following code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROCESS AFTER OUTPUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT IT_ITAB.&lt;/P&gt;&lt;P&gt;MODULE UPDATE_ITAB.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE USER_COMMAND.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IT_ITAB is the internal table which is having the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in UPDATE_ITAB move the values from screen fields to IT_ITAB and append your entries in the internal table. Then in PBO this data will reflect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In MODULE USER_COMMAND, you have to check the OK_CODE and save the date in the transparent table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will solve your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Lakshmi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Santhanalakshmi V on Apr 19, 2008 6:49 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Apr 2008 13:01:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/populate-table-from-table-control/m-p/3644548#M877622</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-19T13:01:47Z</dc:date>
    </item>
    <item>
      <title>Re: Populate Table from Table Control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/populate-table-from-table-control/m-p/3644549#M877623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi  Santhanalakshmi V, thanx for the quick response.   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My internal table is not being populated in the PAI module. In fact, it clears as soon as it gets into the loop in the PAI Module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestion as to what I can put in the UPDATE_ITAB Module you suggested?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a check PAI Module that has the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE check INPUT.&lt;/P&gt;&lt;P&gt;  MODIFY it_purch INDEX tc_purch-current_line.&lt;/P&gt;&lt;P&gt;ENDMODULE.                 " check  INPUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Should I put another PAI Module in the loop? or is the check module above enough?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my PAI:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROCESS AFTER INPUT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT it_purch.&lt;/P&gt;&lt;P&gt;    MODULE check.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   FIELD it_purch-certno MODULE insert_purch_lines.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;  MODULE user_command_1100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have other fields not in the TC ,but which are part of the internal table it_purch. These get their values from the previous screen. They are cleared when I try to save, then, it loops with the values on screen (in the TC) and puts them one at a time in the internal table, instead of all the entrieI've run out of ideas &lt;SPAN __jive_emoticon_name="sad"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Apr 2008 15:31:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/populate-table-from-table-control/m-p/3644549#M877623</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-19T15:31:23Z</dc:date>
    </item>
    <item>
      <title>Re: Populate Table from Table Control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/populate-table-from-table-control/m-p/3644550#M877624</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 will explain it with an example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assume that my screen has 3 fields and a table control with 5 fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Screen fields: FIELD1, FIELD2, FIELD3&lt;/P&gt;&lt;P&gt;Table control name: CTR_TAB&lt;/P&gt;&lt;P&gt;Fields in table control: WA_TAB-TAB1, WA_TAB-TAB2, WA_TAB-TAB3, WA_TAB-TAB4, WA_TAB-TAB5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All fields are editable in the screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My ABAP program declarations:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: begin of tt_tab,&lt;/P&gt;&lt;P&gt;            tab1(10) type c,&lt;/P&gt;&lt;P&gt;            tab2(10) type c,&lt;/P&gt;&lt;P&gt;            tab3(10) type c,&lt;/P&gt;&lt;P&gt;            tab4(10) type c,&lt;/P&gt;&lt;P&gt;            tab5(10) type c,&lt;/P&gt;&lt;P&gt;            field1(10) type c,&lt;/P&gt;&lt;P&gt;            field2(10) type c,&lt;/P&gt;&lt;P&gt;            field3(10) type c,&lt;/P&gt;&lt;P&gt;            end of tt_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: it_tab type standard table of tt_tab,&lt;/P&gt;&lt;P&gt;          wa_tab type tt_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Screen flow logic:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROCESS BEFORE OUTPUT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE STATUS_1000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT IT_TAB INTO WA_TAB WITH CONTROL CTR_TAB.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROCESS AFTER INPUT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT IT_TAB.&lt;/P&gt;&lt;P&gt;MODULE UPDATE_TAB.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE USER_COMMAND_1000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Include program for modules and subroutines:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE UPDATE_TAB.&lt;/P&gt;&lt;P&gt;WA_TAB-FIELD1 = FIELD1.&lt;/P&gt;&lt;P&gt;WA_TAB-FIELD2 = FIELD2.&lt;/P&gt;&lt;P&gt;WA_TAB-FIELD3 = FIELD3.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Other fields will be automatically transferred to the workarea WA_TAB&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;since they have same name in screen and ABAP program&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;APPEND WA_TAB INTO IT_TAB.&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE USER_COMMAND_1000.&lt;/P&gt;&lt;P&gt;CASE OK_CODE.&lt;/P&gt;&lt;P&gt;WHEN 'SAVE'.&lt;/P&gt;&lt;P&gt;   INSERT INTO &amp;lt;TABLENAME&amp;gt; VALUES FROM IT_TAB.&lt;/P&gt;&lt;P&gt;ENDCASE.&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Lakshmi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 20 Apr 2008 11:36:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/populate-table-from-table-control/m-p/3644550#M877624</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-20T11:36:34Z</dc:date>
    </item>
    <item>
      <title>Re: Populate Table from Table Control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/populate-table-from-table-control/m-p/3644551#M877625</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a typical problem for the scenario&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why it happens:&lt;/P&gt;&lt;P&gt;We have an internal table which we project on the screen as a table control...In the PBO the screen is displayed from values in the internal table....In the PAI,once you input the data..the screen does not automatically feed the values to your internal table and it remains empty..so when u press enter..it goes to PAI..then to PBO and shows data from table in PBO..so in PAI if there is no code written to accept values from user to internal table it gets erased&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to solve it:&lt;/P&gt;&lt;P&gt;Write a module in PAI to modify the internal table with values from table control in the screen...Please see the sample code below written in PAI...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in PAI we are looping at the table from screen &lt;/P&gt;&lt;P&gt;loop at int_screentable.&lt;/P&gt;&lt;P&gt;module f_set_data.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;module f_set_data.&lt;/P&gt;&lt;P&gt;*pass data from screen to work area&lt;/P&gt;&lt;P&gt;wa_screentable = int_screentable.&lt;/P&gt;&lt;P&gt;*update the current line in the internal table from screen&lt;/P&gt;&lt;P&gt;modify internaltable from wa_screentable index sy-tabix.&lt;/P&gt;&lt;P&gt;endmodule.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In PBO..you are already displaying the internal table..so need to change there&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that in most of the cases the name of the internal table and screentable will be the same&lt;/P&gt;&lt;P&gt;which means internaltable = int_screentable.&lt;/P&gt;&lt;P&gt;in such case do the code&lt;/P&gt;&lt;P&gt;module f_set_data.&lt;/P&gt;&lt;P&gt;*pass data from screen to work area&lt;/P&gt;&lt;P&gt;wa_screentable = int_screentable.&lt;/P&gt;&lt;P&gt;*update the current line in the internal table from screen&lt;/P&gt;&lt;P&gt;modify int_screentable from wa_screentable index sy-tabix.&lt;/P&gt;&lt;P&gt;endmodule.&lt;/P&gt;&lt;P&gt;and yes..even if it the same table on screen and code you need to modify the currentline(sy-tabix) then only it will get reflected&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once tha values are coming in the internal table you can check the sy-ucomm for 'SAVE' and update the required table using ABAP statements like modify/insert/update(modify preferred for insertion or changing a record)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls check , revert and reward if helpful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Byju&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 20 Apr 2008 11:55:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/populate-table-from-table-control/m-p/3644551#M877625</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-20T11:55:34Z</dc:date>
    </item>
    <item>
      <title>Re: Populate Table from Table Control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/populate-table-from-table-control/m-p/3644552#M877626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have deciced to reopen this discussion because I have 1 problem. Everything else is fine and thank you very much for your contributions. Let me continue from the last entry.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2008 10:06:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/populate-table-from-table-control/m-p/3644552#M877626</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-08T10:06:02Z</dc:date>
    </item>
    <item>
      <title>Re: Populate Table from Table Control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/populate-table-from-table-control/m-p/3644553#M877627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have followed your advice Lakshmi and Byju and I thank you for it. Everything is fine but now on SAVE (and any other command like ENTER and even when I scroll on the Table Control) it modifies the transp. table and repeats the same records in the table control. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;E.g. if you add three lines into the TC, it repeats those same records whenever you do a command.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please explain what causes this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please refer to the SAVE command in MODULE USER_COMMAND_1000 above. I inserted a message after the insert and it pops up whenever I do any command.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2008 10:32:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/populate-table-from-table-control/m-p/3644553#M877627</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-08T10:32:58Z</dc:date>
    </item>
    <item>
      <title>Re: Populate Table from Table Control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/populate-table-from-table-control/m-p/3644554#M877628</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;Can you send the code you wrote in PAI of your screen? it would be more helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2008 10:59:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/populate-table-from-table-control/m-p/3644554#M877628</guid>
      <dc:creator>anub</dc:creator>
      <dc:date>2008-05-08T10:59:01Z</dc:date>
    </item>
    <item>
      <title>Re: Populate Table from Table Control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/populate-table-from-table-control/m-p/3644555#M877629</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;Thanks for your reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here are my PAI modules:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE user_command_1100 INPUT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ok_code = sy-ucomm.&lt;/P&gt;&lt;P&gt;  save_ok = ok_code.&lt;/P&gt;&lt;P&gt;  CLEAR ok_code.&lt;/P&gt;&lt;P&gt;  CASE save_ok.&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;    WHEN 'DELETE'.&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Updating the database table from the internal table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        UPDATE zpurch FROM TABLE it_purch.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Deleting the selected row from the internal table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        DELETE it_purch WHERE mark = 'X'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Deleting the selected row from the database table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        DELETE FROM zpurch WHERE mark = 'X'.&lt;/P&gt;&lt;P&gt;        MESSAGE s006.&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;    WHEN 'SAVE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     MODIFY zpurch FROM TABLE it_purch.&lt;/P&gt;&lt;P&gt;     MESSAGE i001.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    WHEN 'EXIT'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      LEAVE PROGRAM.&lt;/P&gt;&lt;P&gt;    WHEN OTHERS.&lt;/P&gt;&lt;P&gt;  ENDCASE.&lt;/P&gt;&lt;P&gt;ENDMODULE.                 " USER_COMMAND_1100  INPUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE set_purch_data INPUT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      wa_purch-bukrs = bukrs.&lt;/P&gt;&lt;P&gt;      wa_purch-dealid = dealid.&lt;/P&gt;&lt;P&gt;      wa_purch-dealdate = dealdate.&lt;/P&gt;&lt;P&gt;      wa_purch-counter = counter.&lt;/P&gt;&lt;P&gt;      wa_purch-broker = broker.&lt;/P&gt;&lt;P&gt;      wa_purch-trans_sec = zpurch-trans_sec.&lt;/P&gt;&lt;P&gt;      wa_purch-rec_date = zpurch-rec_date.&lt;/P&gt;&lt;P&gt;      wa_purch-tshares = tshares.&lt;/P&gt;&lt;P&gt;      wa_purch-username1 = username1.&lt;/P&gt;&lt;P&gt;      wa_purch-sdate = sdate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      APPEND wa_purch TO it_purch.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDMODULE.                 " set_purch_data  INPUT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2008 14:32:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/populate-table-from-table-control/m-p/3644555#M877629</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-08T14:32:52Z</dc:date>
    </item>
  </channel>
</rss>

