<?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: Internal table basic's . in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-basic-s/m-p/4703778#M1105219</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pradeep,&lt;/P&gt;&lt;P&gt;Do it in this way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;create another table with the same structure named it_tab2.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
IT_TAB2[] = IT_TAB[].
Loop at itab.
  READ TABLE IT_TAB WITH KEY FIELD1 = IT_TAB-FIELD1 
                                                    FIELD2 = IT_TAB-FIELD2
                                                    FIELD3 = IT_TAB-FIELD3.
  IF SY-SUBRC = 0.
     WRITE:/ IT_TAB2-FIELD
  ELSE.
    WRITE:/.
  ENDIF.
Endloop.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Chidanand&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 30 Oct 2008 16:16:48 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-10-30T16:16:48Z</dc:date>
    <item>
      <title>Internal table basic's .</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-basic-s/m-p/4703775#M1105216</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 have a internal table when looped will print the records as follows .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ramu  raju  kumar   anil&lt;/P&gt;&lt;P&gt;ramu  raju  swetha  anil&lt;/P&gt;&lt;P&gt;ramu  raju  ranjith   anil &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now i want the internal table to print as follows&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ramu  raju kumar,swetha,ranjith anil &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the 3rd field which is different should be seperated by comma .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how do i write the code .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Oct 2008 15:24:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-basic-s/m-p/4703775#M1105216</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-30T15:24:15Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table basic's .</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-basic-s/m-p/4703776#M1105217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Imagining that your table fields can not be moved around then this is how &lt;/P&gt;&lt;P&gt;you can get the work done&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
* Imagin the table ITAB has the following fields and values
* FD1    FD2   FD3     FD4
* ramu   raju   kumar   anil
* ramu   raju   swetha  anil
* ramu   raju   ranjith   anil 

ITAB1[] = ITAB2[] = ITAB3[] = ITAB4[] = ITAB[].
sort ITAB1 by FD1.
DELETE ADJACENT DUPLICATES FROM ITAB1 comparing FD1.

sort ITAB2 by FD2.
DELETE ADJACENT DUPLICATES FROM ITAB2 comparing FD2.

sort ITAB3 by FD3.
DELETE ADJACENT DUPLICATES FROM ITAB3 comparing FD3.

sort ITAB4 by FD4.
DELETE ADJACENT DUPLICATES FROM ITAB4 comparing FD4.

loop at itab1.
write itab1-fd1.
endloop.

loop at itab2.
write itab1-fd2.
endloop.

loop at itab3.
write : ',' , itab1-fd3.
endloop.

loop at itab4.
write : ',' ,itab1-fd4.
endloop.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will work, out of curiosity what is the business case for this anyway?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Franc&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Oct 2008 15:48:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-basic-s/m-p/4703776#M1105217</guid>
      <dc:creator>former_member226999</dc:creator>
      <dc:date>2008-10-30T15:48:06Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table basic's .</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-basic-s/m-p/4703777#M1105218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: BEGIN OF itab OCCURS 0,
       fld1(50),
       fld2(50),
       fld3(50),
       fld4(50),
      END OF itab.

DATA: itab2 LIKE TABLE OF itab,
      gs_itab2 LIKE LINE OF itab2.

* Appear internal table itab*

FIELD-SYMBOLS: &amp;lt;fs_itab&amp;gt; LIKE LINE OF itab,
               &amp;lt;fs_itab2&amp;gt; LIKE LINE OF itab.

LOOP AT itab ASSIGNING &amp;lt;fs_itab&amp;gt;.
  READ TABLE itab2 ASSIGNIGN &amp;lt;fs_itab2&amp;gt; 
                   WITH KEY fld1 = &amp;lt;fs_itab&amp;gt;-fld1
                            fld2 = &amp;lt;fs_itab&amp;gt;-fld2
                            fld4 = &amp;lt;fs_itab&amp;gt;-fld4.
  IF sy-subrc = 0.
    CONCATENATE &amp;lt;fs_itab2&amp;gt;-fld3 ',' &amp;lt;fs_itab&amp;gt;-fld3 INTO &amp;lt;fs_itab2&amp;gt;-fld3.
  ELSE.
    gs_itab2 = &amp;lt;fs_itab&amp;gt;.
    APPEND gs_itab2 TO itab2.
  ENDIF.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards.&lt;/P&gt;&lt;P&gt;David Carballido&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Oct 2008 16:01:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-basic-s/m-p/4703777#M1105218</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-30T16:01:14Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table basic's .</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-basic-s/m-p/4703778#M1105219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pradeep,&lt;/P&gt;&lt;P&gt;Do it in this way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;create another table with the same structure named it_tab2.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
IT_TAB2[] = IT_TAB[].
Loop at itab.
  READ TABLE IT_TAB WITH KEY FIELD1 = IT_TAB-FIELD1 
                                                    FIELD2 = IT_TAB-FIELD2
                                                    FIELD3 = IT_TAB-FIELD3.
  IF SY-SUBRC = 0.
     WRITE:/ IT_TAB2-FIELD
  ELSE.
    WRITE:/.
  ENDIF.
Endloop.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Chidanand&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Oct 2008 16:16:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-basic-s/m-p/4703778#M1105219</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-30T16:16:48Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table basic's .</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-basic-s/m-p/4703779#M1105220</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This message was moderated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jul 2011 18:00:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-basic-s/m-p/4703779#M1105220</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-07-19T18:00:35Z</dc:date>
    </item>
  </channel>
</rss>

