<?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 Internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/6560548#M1431235</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;my requirement is to change one internal table to anotherone like....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            INTERNAL TABLE A&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NAME      TUES       POL                COST&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;rahul         1000       mumbai             2000&lt;/P&gt;&lt;P&gt;abhay       999         delhi                  1400&lt;/P&gt;&lt;P&gt;shetal        888        banglore            1500&lt;/P&gt;&lt;P&gt;nitin           777        gurgaon              1788&lt;/P&gt;&lt;P&gt;......          ......         .......                    .........&lt;/P&gt;&lt;P&gt;......          .......        .........                  ............&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and the output i want to be....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                                    INTERNAL TABLE B&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COMPANY1         COMPANY2     COMPANY3     COMPANY4       .............&lt;/P&gt;&lt;P&gt;rahul                          abhay            shetal                 nitin              .............&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am getting INTERNAL TABLE A  from function module...ineed to transfer first coulmn value to INTERNAL TABLE B&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;rahul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 27 Jan 2010 05:12:37 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-01-27T05:12:37Z</dc:date>
    <item>
      <title>Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/6560548#M1431235</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;my requirement is to change one internal table to anotherone like....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            INTERNAL TABLE A&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NAME      TUES       POL                COST&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;rahul         1000       mumbai             2000&lt;/P&gt;&lt;P&gt;abhay       999         delhi                  1400&lt;/P&gt;&lt;P&gt;shetal        888        banglore            1500&lt;/P&gt;&lt;P&gt;nitin           777        gurgaon              1788&lt;/P&gt;&lt;P&gt;......          ......         .......                    .........&lt;/P&gt;&lt;P&gt;......          .......        .........                  ............&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and the output i want to be....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                                    INTERNAL TABLE B&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COMPANY1         COMPANY2     COMPANY3     COMPANY4       .............&lt;/P&gt;&lt;P&gt;rahul                          abhay            shetal                 nitin              .............&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am getting INTERNAL TABLE A  from function module...ineed to transfer first coulmn value to INTERNAL TABLE B&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;rahul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jan 2010 05:12:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/6560548#M1431235</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-27T05:12:37Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/6560549#M1431236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi rahul,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can loop at first internal table, store first column in a variable. Then second index onwards you can go on concatenating first column data into that variable separated by space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: v_name type string.

Loop at itab into wa_itab.
 if sy-tabix eq 1.
   v_name = wa_itab-name.
 else.
   concatenate v_name wa_itab-name into v_name separated by space.
 Endif.
Endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use this string to append to your second internal table. Hope it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Archana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jan 2010 05:24:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/6560549#M1431236</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-27T05:24:04Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/6560550#M1431237</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 simple&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.loop in tableA&lt;/P&gt;&lt;P&gt;2. write the value of name in table B&lt;/P&gt;&lt;P&gt;3.append the same in te TableB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You'll get the desired result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this might solve your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pooja&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jan 2010 05:36:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/6560550#M1431237</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-27T05:36:33Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/6560551#M1431238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello rahulsparshmeenu &lt;/P&gt;&lt;P&gt;do you want the internal table B to be dynamic coz you want to transpose the internal table A ( According to example...you have suggested....)&lt;/P&gt;&lt;P&gt;in that case you Columns in IT B would be dynamic if this is the case please update for further assistance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jan 2010 05:46:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/6560551#M1431238</guid>
      <dc:creator>anup_deshmukh4</dc:creator>
      <dc:date>2010-01-27T05:46:33Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/6560552#M1431239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes    i want it to be dynamic as it has to be transfered to&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IT_FINAL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to show in alv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;rahul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jan 2010 05:48:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/6560552#M1431239</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-27T05:48:12Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/6560553#M1431240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oks...for that Case you will have to go for a long procedure USING RTTS ....! &lt;/P&gt;&lt;P&gt;1. Count the no of copanies( unique )... in the IT A  &lt;/P&gt;&lt;P&gt;2. Get a structre Constructed using RTTS for all the Companies ie. Build the structre for IT B according to requirement......! then create a table for the structre ( append the Values....)&lt;/P&gt;&lt;P&gt;3. Create  a Dynamic Field Catlogue for the same &lt;/P&gt;&lt;P&gt;4. Display the ITAB&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For RTTS refer to the below link&lt;/P&gt;&lt;P&gt;&lt;A href="http://wiki.sdn.sap.com/wiki/display/ABAP/Runtime" target="test_blank"&gt;http://wiki.sdn.sap.com/wiki/display/ABAP/Runtime&lt;/A&gt;&lt;EM&gt;Type&lt;/EM&gt;Services+%28RTTS%29&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or if you understant field symbols very good you can construct you own..!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jan 2010 05:56:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/6560553#M1431240</guid>
      <dc:creator>anup_deshmukh4</dc:creator>
      <dc:date>2010-01-27T05:56:31Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/6560554#M1431241</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 can go for the following logic:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: v_lines type i,
         v_str type string.
data: it_table type ref to data.

describe table IT_A lines v_lines.

do v_lines times.
 concatenate 'company' sy-index into v_str.
  wa_fcat-fieldname = v_str.
  .
  .
 append wa_fcat to it_fcat.
enddo.

CALL METHOD cl_alv_table_create=&amp;gt;create_dynamic_table
    EXPORTING
      it_fieldcatalog = it_fcat
    IMPORTING
      ep_table        = it_table.
  IF sy-subrc = 0 .

   ASSIGN it_table-&amp;gt;* TO &amp;lt;fs_table&amp;gt;.
* Create dynamic work area and assign to FS
    CREATE DATA it_line LIKE LINE OF &amp;lt;fs_table&amp;gt;.
    ASSIGN it_line-&amp;gt;* TO &amp;lt;fs_wa&amp;gt;.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;now you have your dynamic internal table  &amp;lt;fs_table&amp;gt; and work area &amp;lt;fs_wa&amp;gt;&lt;/P&gt;&lt;P&gt;to do required processing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds/Abhi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jan 2010 08:54:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/6560554#M1431241</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-27T08:54:15Z</dc:date>
    </item>
  </channel>
</rss>

