<?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: regarding populating internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-populating-internal-table/m-p/5585212#M1273556</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You can achieve this as follows:-&lt;/P&gt;&lt;P&gt;Please note that my table has 2 columns so I have looped twice.&lt;/P&gt;&lt;P&gt;You can loop as per your columns.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES : BEGIN OF itab,&lt;/P&gt;&lt;P&gt;        col01 TYPE c,&lt;/P&gt;&lt;P&gt;        col02 TYPE c,&lt;/P&gt;&lt;P&gt;  END OF itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : itab TYPE STANDARD TABLE OF itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS : &amp;lt;fs&amp;gt; TYPE char1.&lt;/P&gt;&lt;P&gt;DATA : wa TYPE itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: var     TYPE string,&lt;/P&gt;&lt;P&gt;      cntr(2) TYPE n.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO 2 TIMES.&lt;/P&gt;&lt;P&gt;  cntr = cntr + 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CONCATENATE 'wa-col' cntr INTO var.&lt;/P&gt;&lt;P&gt;  ASSIGN (var) TO &amp;lt;fs&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if &amp;lt;fs&amp;gt; is assigned.&lt;/P&gt;&lt;P&gt;    &amp;lt;fs&amp;gt; = 'A'.&lt;/P&gt;&lt;P&gt;   endif.&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;  append wa to itab.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 May 2009 10:05:56 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-05-12T10:05:56Z</dc:date>
    <item>
      <title>regarding populating internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-populating-internal-table/m-p/5585211#M1273555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i have created an internal table which is like...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;       col01 type string,&lt;/P&gt;&lt;P&gt;       col02 type string,&lt;/P&gt;&lt;P&gt;       col03 type string,&lt;/P&gt;&lt;P&gt;       col04 type string,&lt;/P&gt;&lt;P&gt;       col05 type string,&lt;/P&gt;&lt;P&gt;       col06 type string,&lt;/P&gt;&lt;P&gt;       col07 type string,&lt;/P&gt;&lt;P&gt;       col08 type string,&lt;/P&gt;&lt;P&gt;       col09 type string,&lt;/P&gt;&lt;P&gt;       col10 type string,&lt;/P&gt;&lt;P&gt;       col11 type string,&lt;/P&gt;&lt;P&gt;      .........................&lt;/P&gt;&lt;P&gt;       col31 type string,&lt;/P&gt;&lt;P&gt;       end of itab.&lt;/P&gt;&lt;P&gt;.............................................&lt;/P&gt;&lt;P&gt;some code goes here..................&lt;/P&gt;&lt;P&gt;...................................&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if fkdat + 7(2)  = '01'&lt;/P&gt;&lt;P&gt;     itab-col01 = .....&lt;/P&gt;&lt;P&gt;...............................&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;................................&lt;/P&gt;&lt;P&gt;if fkdat + 7(2)  = '02'&lt;/P&gt;&lt;P&gt;     itab-col02 = .....&lt;/P&gt;&lt;P&gt;...............................&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;................................&lt;/P&gt;&lt;P&gt;if fkdat + 7(2)  = '03'&lt;/P&gt;&lt;P&gt;     itab-col03 = .....&lt;/P&gt;&lt;P&gt;...............................&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;................................&lt;/P&gt;&lt;P&gt;if fkdat + 7(2)  = '04'&lt;/P&gt;&lt;P&gt;     itab-col04 = .....&lt;/P&gt;&lt;P&gt;...............................&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;................................&lt;/P&gt;&lt;P&gt;if fkdat + 7(2)  = '05'&lt;/P&gt;&lt;P&gt;     itab-col05 = .....&lt;/P&gt;&lt;P&gt;...............................&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;................................&lt;/P&gt;&lt;P&gt;if fkdat + 7(2)  = '06'&lt;/P&gt;&lt;P&gt;     itab-col06 = .....&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 so on like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can i append the internal table itab dynamically without doing the same thing for 31 times?? is there any way to increase the index of the fields of itab according to the if condition?? i think it might be done using field symbols......but i have confusion about that. i need help regarding this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 May 2009 09:10:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-populating-internal-table/m-p/5585211#M1273555</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-12T09:10:06Z</dc:date>
    </item>
    <item>
      <title>Re: regarding populating internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-populating-internal-table/m-p/5585212#M1273556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You can achieve this as follows:-&lt;/P&gt;&lt;P&gt;Please note that my table has 2 columns so I have looped twice.&lt;/P&gt;&lt;P&gt;You can loop as per your columns.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES : BEGIN OF itab,&lt;/P&gt;&lt;P&gt;        col01 TYPE c,&lt;/P&gt;&lt;P&gt;        col02 TYPE c,&lt;/P&gt;&lt;P&gt;  END OF itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : itab TYPE STANDARD TABLE OF itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS : &amp;lt;fs&amp;gt; TYPE char1.&lt;/P&gt;&lt;P&gt;DATA : wa TYPE itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: var     TYPE string,&lt;/P&gt;&lt;P&gt;      cntr(2) TYPE n.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO 2 TIMES.&lt;/P&gt;&lt;P&gt;  cntr = cntr + 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CONCATENATE 'wa-col' cntr INTO var.&lt;/P&gt;&lt;P&gt;  ASSIGN (var) TO &amp;lt;fs&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if &amp;lt;fs&amp;gt; is assigned.&lt;/P&gt;&lt;P&gt;    &amp;lt;fs&amp;gt; = 'A'.&lt;/P&gt;&lt;P&gt;   endif.&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;  append wa to itab.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 May 2009 10:05:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-populating-internal-table/m-p/5585212#M1273556</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-12T10:05:56Z</dc:date>
    </item>
    <item>
      <title>Re: regarding populating internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-populating-internal-table/m-p/5585213#M1273557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;does &lt;STRONG&gt;(variable)&lt;/STRONG&gt; mean the content of the variable?? this is what i was missing in using the field symbol.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 May 2009 10:32:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-populating-internal-table/m-p/5585213#M1273557</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-12T10:32:13Z</dc:date>
    </item>
    <item>
      <title>Re: regarding populating internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-populating-internal-table/m-p/5585214#M1273558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Yes.&lt;/P&gt;&lt;P&gt;The statements &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; CONCATENATE 'wa-col' cntr INTO var.&lt;/P&gt;&lt;P&gt;ASSIGN (var) TO &amp;lt;fs&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;will actually point the field-symbol to the variable WA-COL01, WA-COL02 as you change the value of the counter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The ASSIGN (var) TO &amp;lt;fs&amp;gt; means assign the value which is in var.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ankur Parab&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 May 2009 10:48:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-populating-internal-table/m-p/5585214#M1273558</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-12T10:48:50Z</dc:date>
    </item>
    <item>
      <title>Re: regarding populating internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-populating-internal-table/m-p/5585215#M1273559</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 using do varying&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 May 2009 10:53:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-populating-internal-table/m-p/5585215#M1273559</guid>
      <dc:creator>jayanthi_jayaraman</dc:creator>
      <dc:date>2009-05-12T10:53:19Z</dc:date>
    </item>
    <item>
      <title>Re: regarding populating internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-populating-internal-table/m-p/5585216#M1273560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank you a lot. i hope it will solve my problem. i learnt a new and very useful thing from you. i did not know how to point the content of the variable using pointer. that's why the internal table was not populating. &lt;/P&gt;&lt;P&gt;thanks again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 May 2009 10:59:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-populating-internal-table/m-p/5585216#M1273560</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-12T10:59:36Z</dc:date>
    </item>
  </channel>
</rss>

