<?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: How to fill internal table dynamically in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-fill-internal-table-dynamically/m-p/1338154#M171424</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hii&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data index type i.&lt;/P&gt;&lt;P&gt;loop at it_ztable into wl_ztable.&lt;/P&gt;&lt;P&gt;index = sy-tabix + 9.&lt;/P&gt;&lt;P&gt;read line index field value wl_ztable-ch into w_ch.&lt;/P&gt;&lt;P&gt;modify it_ztable from wl_ztable.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;instead of sy-tabix u can also sy-index .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;also look inot this link..this will answer your question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="317268"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Naresh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 May 2006 11:12:04 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-05-18T11:12:04Z</dc:date>
    <item>
      <title>How to fill internal table dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-fill-internal-table-dynamically/m-p/1338151#M171421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;   how to fill internal table dynamically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example:&lt;/P&gt;&lt;P&gt;begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;empid like pa0000-pernr,&lt;/P&gt;&lt;P&gt;empname like pa0001-ename,&lt;/P&gt;&lt;P&gt;grade(5),&lt;/P&gt;&lt;P&gt;end of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now i want to append dynamically field itab-grade along with rest fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is this possible?? if yes kindly let me know how to do that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kiran I&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 May 2006 11:04:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-fill-internal-table-dynamically/m-p/1338151#M171421</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-18T11:04:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to fill internal table dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-fill-internal-table-dynamically/m-p/1338152#M171422</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi kiran refer this thread&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="1359905"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this one too&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="711961"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="867439"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;This one is on how to modify int table&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="694621"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Rahul Kavuri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 May 2006 11:07:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-fill-internal-table-dynamically/m-p/1338152#M171422</guid>
      <dc:creator>rahulkavuri</dc:creator>
      <dc:date>2006-05-18T11:07:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to fill internal table dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-fill-internal-table-dynamically/m-p/1338153#M171423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi kiran,&lt;/P&gt;&lt;P&gt;To fill and create and internal table dynamically you can use this code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPE-POOLS: slis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: it_fcat TYPE slis_t_fieldcat_alv,&lt;/P&gt;&lt;P&gt;      is_fcat LIKE LINE OF it_fcat.&lt;/P&gt;&lt;P&gt;DATA: it_fieldcat TYPE lvc_t_fcat,&lt;/P&gt;&lt;P&gt;      is_fieldcat LIKE LINE OF it_fieldcat.&lt;/P&gt;&lt;P&gt;DATA: new_table TYPE REF TO data.&lt;/P&gt;&lt;P&gt;DATA: new_line  TYPE REF TO data.&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS: &amp;lt;l_table&amp;gt; TYPE ANY TABLE,&lt;/P&gt;&lt;P&gt;               &amp;lt;l_line&amp;gt;  TYPE ANY,&lt;/P&gt;&lt;P&gt;               &amp;lt;l_field&amp;gt; TYPE ANY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is_fieldcat-fieldname = 'FIELD1'.&lt;/P&gt;&lt;P&gt;is_fieldcat-ref_field = 'MATNR'.&lt;/P&gt;&lt;P&gt;is_fieldcat-ref_table = 'MARA'.&lt;/P&gt;&lt;P&gt;APPEND is_fieldcat TO it_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is_fieldcat-fieldname = 'FIELD2'.&lt;/P&gt;&lt;P&gt;is_fieldcat-ref_field = 'SPRPS'.&lt;/P&gt;&lt;P&gt;is_fieldcat-ref_table = 'PA0001'.&lt;/P&gt;&lt;P&gt;APPEND is_fieldcat TO it_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is_fieldcat-fieldname = 'FIELD3'.&lt;/P&gt;&lt;P&gt;is_fieldcat-ref_field = 'BEGDA'.&lt;/P&gt;&lt;P&gt;is_fieldcat-ref_table = 'PA0002'.&lt;/P&gt;&lt;P&gt;APPEND is_fieldcat TO it_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Create a new Table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL METHOD cl_alv_table_create=&amp;gt;create_dynamic_table&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    it_fieldcatalog = it_fieldcat&lt;/P&gt;&lt;P&gt;  IMPORTING&lt;/P&gt;&lt;P&gt;    ep_table        = new_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Create a new Line with the same structure of the table.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ASSIGN new_table-&amp;gt;* TO &amp;lt;l_table&amp;gt;.&lt;/P&gt;&lt;P&gt;CREATE DATA new_line LIKE LINE OF &amp;lt;l_table&amp;gt;.&lt;/P&gt;&lt;P&gt;ASSIGN new_line-&amp;gt;* TO &amp;lt;l_line&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Test it...&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DO 40 times.&lt;/P&gt;&lt;P&gt;  ASSIGN COMPONENT 'FIELD1' OF STRUCTURE &amp;lt;l_line&amp;gt; TO &amp;lt;l_field&amp;gt;.&lt;/P&gt;&lt;P&gt;  &amp;lt;l_field&amp;gt; = '12345'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ASSIGN COMPONENT 'FIELD2' OF STRUCTURE &amp;lt;l_line&amp;gt; TO &amp;lt;l_field&amp;gt;.&lt;/P&gt;&lt;P&gt;  &amp;lt;l_field&amp;gt; = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ASSIGN COMPONENT 'FIELD3' OF STRUCTURE &amp;lt;l_line&amp;gt; TO &amp;lt;l_field&amp;gt;.&lt;/P&gt;&lt;P&gt;  &amp;lt;l_field&amp;gt; = '20030101'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  INSERT &amp;lt;l_line&amp;gt; INTO TABLE &amp;lt;l_table&amp;gt;.&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT &amp;lt;l_table&amp;gt; ASSIGNING &amp;lt;l_line&amp;gt;.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; ASSIGN COMPONENT 'field1' OF STRUCTURE &amp;lt;l_line&amp;gt; TO &amp;lt;l_field&amp;gt;.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  WRITE  / &amp;lt;l_line&amp;gt;.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Aashish Garg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 May 2006 11:11:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-fill-internal-table-dynamically/m-p/1338153#M171423</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-18T11:11:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to fill internal table dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-fill-internal-table-dynamically/m-p/1338154#M171424</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hii&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data index type i.&lt;/P&gt;&lt;P&gt;loop at it_ztable into wl_ztable.&lt;/P&gt;&lt;P&gt;index = sy-tabix + 9.&lt;/P&gt;&lt;P&gt;read line index field value wl_ztable-ch into w_ch.&lt;/P&gt;&lt;P&gt;modify it_ztable from wl_ztable.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;instead of sy-tabix u can also sy-index .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;also look inot this link..this will answer your question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="317268"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Naresh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 May 2006 11:12:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-fill-internal-table-dynamically/m-p/1338154#M171424</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-18T11:12:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to fill internal table dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-fill-internal-table-dynamically/m-p/1338155#M171425</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi kiran,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check this thread&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="109594"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HOPE THIS HELPS,&lt;/P&gt;&lt;P&gt;PRIYA.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 May 2006 11:15:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-fill-internal-table-dynamically/m-p/1338155#M171425</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-18T11:15:33Z</dc:date>
    </item>
  </channel>
</rss>

