<?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: copy selected values from a table control into another table control in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/copy-selected-values-from-a-table-control-into-another-table-control/m-p/6007231#M1345360</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 another consideration&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suppose the structure wa_roles_tc1 and wa_roles_tc2 are used to design the input/output field of the table control, so if some data are changed, the modifications have to be transfered in the internal table it_roles_tc1 and it_roles_tc2 having the same structure of wa_roles_tc1 and wa_roles_tc2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it's so why u transfering the value of mark field only?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the module to update to update it_roles_tc1 and it_roles_tc2 should be&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;MODULE tc1_mark INPUT.
    MODIFY it_roles_tc1 FROM wa_roles_tc1 INDEX tc1-current_line.
ENDMODULE. "TC1_MARK INPUT&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So without option TRANSPORTING&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Aug 2009 09:24:39 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-08-13T09:24:39Z</dc:date>
    <item>
      <title>copy selected values from a table control into another table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copy-selected-values-from-a-table-control-into-another-table-control/m-p/6007223#M1345352</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi there,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as seen in the subject i need to copy selected values from a table control into another table control in the same screen. as i dont know much about table controls i made 2 table controls with the wizard and started to change the code... right now im totally messed up. nothing works anymore and i don't know where to start over.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i looked up the forums and google, but there is nothing to help me with this problem (or i suck in searching the internet for solutions)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have 2 buttons. one to push the selected data from the top table control into the bottom tc and the other button is to push selected data from the bottom tc into the top tc. does somebody has a sample code to do this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Aug 2009 14:29:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copy-selected-values-from-a-table-control-into-another-table-control/m-p/6007223#M1345352</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-12T14:29:24Z</dc:date>
    </item>
    <item>
      <title>Re: copy selected values from a table control into another table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copy-selected-values-from-a-table-control-into-another-table-control/m-p/6007224#M1345353</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;U should have two internal table where the data, to be displayed by the two table controls, are stored.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So u need to move a record from the forst internal table to the second one&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Aug 2009 14:32:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copy-selected-values-from-a-table-control-into-another-table-control/m-p/6007224#M1345353</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-12T14:32:50Z</dc:date>
    </item>
    <item>
      <title>Re: copy selected values from a table control into another table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copy-selected-values-from-a-table-control-into-another-table-control/m-p/6007225#M1345354</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes i know that. its so easy but i dont know how to code it cause i lack in abap programming language&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Aug 2009 14:43:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copy-selected-values-from-a-table-control-into-another-table-control/m-p/6007225#M1345354</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-12T14:43:59Z</dc:date>
    </item>
    <item>
      <title>Re: copy selected values from a table control into another table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copy-selected-values-from-a-table-control-into-another-table-control/m-p/6007226#M1345355</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;If you have managed the selection, your internal table should have a mark field, so in PAI u should loop the first table where the mark is set and append the lines to the second table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have u inserted a field for marker in the internal tables?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Aug 2009 14:54:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copy-selected-values-from-a-table-control-into-another-table-control/m-p/6007226#M1345355</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-12T14:54:13Z</dc:date>
    </item>
    <item>
      <title>Re: copy selected values from a table control into another table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copy-selected-values-from-a-table-control-into-another-table-control/m-p/6007227#M1345356</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yea i had it working that way once. but it did not work properly and i could copy selected fields which don't contain any data and that should not be possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;no i didn't made a marker field. im using another field which i don't show in the tc for the marker. but maybe that's the problem... but i'm going crazy if i have to start all over only to make a special marker field in the internal table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Aug 2009 15:03:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copy-selected-values-from-a-table-control-into-another-table-control/m-p/6007227#M1345356</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-12T15:03:03Z</dc:date>
    </item>
    <item>
      <title>Re: copy selected values from a table control into another table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copy-selected-values-from-a-table-control-into-another-table-control/m-p/6007228#M1345357</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;be quiet&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U don't need to start again, but if u need to manage a multiselection, it's easier to have a field for mark i the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So define a field for mark in both tables, go into LOOP/ENLOOP of PAI of both table controls and move the value of your old field for mark to the field of the tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U should have a module of PAI in order to move the data from table control to internal table and update it, something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; PROCESS PAI.
  LOOP AT ITAB.
     MODULE MODIFY_ITAB.
  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 MODIFY_ITAB.
   ITAB-FIELD1 = ....
   ITAB-FIELD2 = .....
   MODIFY ITAB INDEX &amp;lt;TABLE CONTROL&amp;gt;-CURRENT_LINE.
ENDMODULE.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So in this module u need to move the value of field for mark too:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; MODULE MODIFY_ITAB.
   ITAB-FIELD1 = ....
   ITAB-FIELD2 = .....
   ITAB-MARK  = MARK.
   MODIFY ITAB INDEX &amp;lt;TABLE CONTROL&amp;gt;-CURRENT_LINE.
ENDMODULE.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the fields of table control are the same name of the fields of internal table, u need to move the mark only: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; MODULE MODIFY_ITAB.
   ITAB-MARK  = MARK.
   MODIFY ITAB INDEX &amp;lt;TABLE CONTROL&amp;gt;-CURRENT_LINE.
ENDMODULE.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Aug 2009 15:22:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copy-selected-values-from-a-table-control-into-another-table-control/m-p/6007228#M1345357</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-12T15:22:13Z</dc:date>
    </item>
    <item>
      <title>Re: copy selected values from a table control into another table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copy-selected-values-from-a-table-control-into-another-table-control/m-p/6007229#M1345358</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you're funny &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i still don't get it... can't believe, there is no tutorial or sample code around how to copy multiple selected rows from a tc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here's my code, maybe you can tell me exactly were i have to change it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tc1 = upper table control&lt;/P&gt;&lt;P&gt;tc2 = lower table control&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SCREEN 0100:&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_0100.&lt;/P&gt;&lt;P&gt;  MODULE get_nfo. --&amp;gt; gets data from the dictionary table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  MODULE tc1_change_tc_attr.&lt;/P&gt;&lt;P&gt;  LOOP AT   it_roles_tc1&lt;/P&gt;&lt;P&gt;       INTO wa_roles_tc1&lt;/P&gt;&lt;P&gt;       WITH CONTROL tc1&lt;/P&gt;&lt;P&gt;       CURSOR tc1-current_line.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  MODULE tc2_change_tc_attr.&lt;/P&gt;&lt;P&gt;  LOOP AT   it_roles_tc2&lt;/P&gt;&lt;P&gt;       INTO wa_roles_tc2l&lt;/P&gt;&lt;P&gt;       WITH CONTROL tc2&lt;/P&gt;&lt;P&gt;       CURSOR tc2-current_line.&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_roles_tc1.&lt;/P&gt;&lt;P&gt;    CHAIN.&lt;/P&gt;&lt;P&gt;      FIELD wa_roles_tc1-agr_name.&lt;/P&gt;&lt;P&gt;      FIELD wa_roles_tc1-text.&lt;/P&gt;&lt;P&gt;    ENDCHAIN.&lt;/P&gt;&lt;P&gt;    FIELD wa_roles_tc1-mark&lt;/P&gt;&lt;P&gt;      MODULE tc1_mark ON REQUEST.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT it_roles_tc2.&lt;/P&gt;&lt;P&gt;    CHAIN.&lt;/P&gt;&lt;P&gt;      FIELD wa_roles_tc2-agr_name.&lt;/P&gt;&lt;P&gt;      FIELD wa_roles_tc2-text.&lt;/P&gt;&lt;P&gt;    ENDCHAIN.&lt;/P&gt;&lt;P&gt;    FIELD wa_roles_tc2-mark&lt;/P&gt;&lt;P&gt;      MODULE tc2_mark ON REQUEST.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  MODULE ok_code.&lt;/P&gt;&lt;P&gt;  MODULE user_command_0100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INCLUDE PAI:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE tc1_mark INPUT.&lt;/P&gt;&lt;P&gt;  IF tc1-line_sel_mode = 2&lt;/P&gt;&lt;P&gt;  AND wa_roles_tc1-mark = 'X'.&lt;/P&gt;&lt;P&gt;    LOOP AT it_roles_tc1 INTO g_tc1_wa2&lt;/P&gt;&lt;P&gt;      WHERE mark = 'X'.    -&lt;/P&gt;&lt;HR originaltext="----------------------------------------" /&gt;&lt;P&gt;&amp;gt; big problem here is, that no entry has an 'X' there&lt;/P&gt;&lt;P&gt;      g_tc1_wa2-mark = ''.&lt;/P&gt;&lt;P&gt;      MODIFY it_roles_tc1&lt;/P&gt;&lt;P&gt;        FROM g_tc1_wa2&lt;/P&gt;&lt;P&gt;        TRANSPORTING mark.&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;  MODIFY it_roles_tc1&lt;/P&gt;&lt;P&gt;    FROM wa_roles_tc1&lt;/P&gt;&lt;P&gt;    INDEX tc1-current_line&lt;/P&gt;&lt;P&gt;    TRANSPORTING mark.&lt;/P&gt;&lt;P&gt;ENDMODULE.                    "TC1_MARK INPUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE tc2_mark INPUT.&lt;/P&gt;&lt;P&gt;  IF tc2-line_sel_mode = 2&lt;/P&gt;&lt;P&gt;  AND wa_roles_tc2-mark = 'X'.&lt;/P&gt;&lt;P&gt;    LOOP AT it_roles_tc2 INTO g_tc2_wa2&lt;/P&gt;&lt;P&gt;      WHERE mark = 'X'.             -&lt;/P&gt;&lt;HR originaltext="----------------------------------------" /&gt;&lt;P&gt;&amp;gt; same here, it doesn't gets any data&lt;/P&gt;&lt;P&gt;      g_tc2_wa2-mark = ''.&lt;/P&gt;&lt;P&gt;      MODIFY it_roles_tc2&lt;/P&gt;&lt;P&gt;        FROM g_tc2_wa2&lt;/P&gt;&lt;P&gt;        TRANSPORTING mark.&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;  MODIFY it_roles_tc2&lt;/P&gt;&lt;P&gt;    FROM wa_roles_tc2&lt;/P&gt;&lt;P&gt;    INDEX tc2-current_line&lt;/P&gt;&lt;P&gt;    TRANSPORTING mark.&lt;/P&gt;&lt;P&gt;ENDMODULE.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thx for anybody who can help with this!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2009 08:49:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copy-selected-values-from-a-table-control-into-another-table-control/m-p/6007229#M1345358</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-13T08:49:51Z</dc:date>
    </item>
    <item>
      <title>Re: copy selected values from a table control into another table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copy-selected-values-from-a-table-control-into-another-table-control/m-p/6007230#M1345359</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;This is your code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; MODULE tc1_mark INPUT.
     IF tc1-line_sel_mode = 2  AND wa_roles_tc1-mark = 'X'.
        LOOP AT it_roles_tc1 INTO g_tc1_wa2 WHERE mark = 'X'. -----------&amp;gt; big problem here is, that no entry has an 'X' there
              g_tc1_wa2-mark = ''.
              MODIFY it_roles_tc1 FROM g_tc1_wa2 TRANSPORTING mark.
        ENDLOOP.
    ENDIF.
    MODIFY it_roles_tc1 FROM wa_roles_tc1 INDEX tc1-current_line TRANSPORTING mark.
ENDMODULE. "TC1_MARK INPUT&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but the code should be like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; MODULE tc1_mark INPUT.
    MODIFY it_roles_tc1 FROM wa_roles_tc1 INDEX tc1-current_line TRANSPORTING mark.
ENDMODULE. "TC1_MARK INPUT&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So u should delete the loop, I think it's useless, the module tc1_mark is just in the loop of table it_roles_tc1 (the LOOP of PAI process, you don't need to repeat it again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2009 09:01:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copy-selected-values-from-a-table-control-into-another-table-control/m-p/6007230#M1345359</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-13T09:01:12Z</dc:date>
    </item>
    <item>
      <title>Re: copy selected values from a table control into another table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copy-selected-values-from-a-table-control-into-another-table-control/m-p/6007231#M1345360</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 another consideration&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suppose the structure wa_roles_tc1 and wa_roles_tc2 are used to design the input/output field of the table control, so if some data are changed, the modifications have to be transfered in the internal table it_roles_tc1 and it_roles_tc2 having the same structure of wa_roles_tc1 and wa_roles_tc2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it's so why u transfering the value of mark field only?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the module to update to update it_roles_tc1 and it_roles_tc2 should be&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;MODULE tc1_mark INPUT.
    MODIFY it_roles_tc1 FROM wa_roles_tc1 INDEX tc1-current_line.
ENDMODULE. "TC1_MARK INPUT&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So without option TRANSPORTING&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2009 09:24:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copy-selected-values-from-a-table-control-into-another-table-control/m-p/6007231#M1345360</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-13T09:24:39Z</dc:date>
    </item>
    <item>
      <title>Re: copy selected values from a table control into another table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copy-selected-values-from-a-table-control-into-another-table-control/m-p/6007232#M1345361</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thx for your help so far but its still not working...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it should be like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tc1&lt;/P&gt;&lt;P&gt;_____________&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;test1&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;                           &lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;test2&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;_____________&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;button                               &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tc2&lt;/P&gt;&lt;P&gt;_____________&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;             &lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;_____________&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but after pushing the button both tc should look like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tc1&lt;/P&gt;&lt;P&gt;_____________&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt; &lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;_____________&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;button                     &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tc2&lt;/P&gt;&lt;P&gt;_____________&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;test1&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt; &lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;test2&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;_____________&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: rafe b. on Aug 13, 2009 11:35 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2009 09:35:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copy-selected-values-from-a-table-control-into-another-table-control/m-p/6007232#M1345361</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-13T09:35:07Z</dc:date>
    </item>
    <item>
      <title>Re: copy selected values from a table control into another table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copy-selected-values-from-a-table-control-into-another-table-control/m-p/6007233#M1345362</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 think your code should be like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SCREEN 0100:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PROCESS BEFORE OUTPUT.

     MODULE status_0100.
     MODULE get_nfo. --&amp;gt; gets data from the dictionary table

* Tab ctrl 1
     MODULE tc1_change_tc_attr.

     LOOP AT it_roles_tc1 INTO wa_roles_tc1 
          WITH CONTROL tc1 CURSOR tc1-current_line.
    ENDLOOP.

* Tab ctrl 2
    MODULE tc2_change_tc_attr.
    LOOP AT it_roles_tc2 INTO wa_roles_tc2l
      WITH CONTROL tc2 CURSOR tc2-current_line.
   ENDLOOP.

PROCESS AFTER INPUT.

   LOOP AT it_roles_tc1.
       FIELD wa_roles_tc1-agr_name.
       FIELD wa_roles_tc1-text.
       FIELD wa_roles_tc1-mark MODULE tc1_mark.
  ENDLOOP.

  LOOP AT it_roles_tc2.
      FIELD wa_roles_tc2-agr_name.
      FIELD wa_roles_tc2-text.
      FIELD wa_roles_tc2-mark MODULE tc2_mark..
  ENDLOOP.

  MODULE ok_code.
  MODULE user_command_0100.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INCLUDE PAI:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;.MODULE tc1_mark INPUT.
   MODIFY it_roles_tc1 FROM wa_roles_tc1 INDEX tc1-current_line TRANSPORTING mark.
ENDMODULE. "TC1_MARK INPUT

MODULE tc2_mark INPUT.
   MODIFY it_roles_tc2 FROM wa_roles_tc2 INDEX tc2-current_line TRANSPORTING mark.
ENDMODULE.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The module of user_command&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;.module user_command_0100.
   CASE OK_CODE.
      WHEN 'COPY'.
          LOOP AT IT_ROLES_TC1 INTO IT_ROLES_TC2.
             DELETE IT_ROLES_TC1.
             APPEND IT_ROLES_CT2.
          ENDLOOP.
endmodule.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U make sure the ouput module to get data from dictionary doesn't get the data again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2009 10:12:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copy-selected-values-from-a-table-control-into-another-table-control/m-p/6007233#M1345362</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-13T10:12:40Z</dc:date>
    </item>
    <item>
      <title>Re: copy selected values from a table control into another table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copy-selected-values-from-a-table-control-into-another-table-control/m-p/6007234#M1345363</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;its working now. not perfect but i have a very good base to build on. thanks max for your time. you really helped me out.&lt;/P&gt;&lt;P&gt;good guy &lt;span class="lia-unicode-emoji" title=":face_with_tongue:"&gt;😛&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2009 11:53:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copy-selected-values-from-a-table-control-into-another-table-control/m-p/6007234#M1345363</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-13T11:53:21Z</dc:date>
    </item>
  </channel>
</rss>

