<?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: Adding fields to Internal table dynamically in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/adding-fields-to-internal-table-dynamically/m-p/5783874#M1308763</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ankur,&lt;/P&gt;&lt;P&gt;Can you pls send the code, to takle my issue. In that example based on no of parameters i am getting the output list. But here in my case, i have to display the first 13 fileds in the table, and then based on some other conditions, i have to add some fields to my internal table and then display. Pls send the code for the same.&lt;/P&gt;&lt;P&gt;Prob :&lt;/P&gt;&lt;P&gt;in internal table i have 13 fields&lt;/P&gt;&lt;P&gt;f1&lt;/P&gt;&lt;P&gt;f2...&lt;/P&gt;&lt;P&gt;so on &lt;/P&gt;&lt;P&gt;f13.&lt;/P&gt;&lt;P&gt;Now based on some conditions, i have to append the fields in the internal table. pls send the code.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Raju&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 Jun 2009 13:33:36 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-06-24T13:33:36Z</dc:date>
    <item>
      <title>Adding fields to Internal table dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/adding-fields-to-internal-table-dynamically/m-p/5783871#M1308760</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;I have a internal table, in that i have 13 fields, i want to add some more fields to the internal table dynamically based on the conditions. The number of fields to be added to the internal table can be any number. Pls let me know how to do this.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Raju&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jun 2009 07:34:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/adding-fields-to-internal-table-dynamically/m-p/5783871#M1308760</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-24T07:34:12Z</dc:date>
    </item>
    <item>
      <title>Re: Adding fields to Internal table dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/adding-fields-to-internal-table-dynamically/m-p/5783872#M1308761</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Refer below code :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA gv_ref TYPE REF TO data.&lt;/P&gt;&lt;P&gt;DATA gv_area TYPE REF TO data.&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS: &amp;lt;fs_table&amp;gt; TYPE STANDARD TABLE,&lt;/P&gt;&lt;P&gt;&amp;lt;fs_update&amp;gt; TYPE STANDARD TABLE,&lt;/P&gt;&lt;P&gt;&amp;lt;fs_data&amp;gt; TYPE ANY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CREATE DATA gv_ref TYPE STANDARD TABLE OF (p_table).&lt;/P&gt;&lt;P&gt;CREATE DATA gv_area LIKE gv_ref.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ASSIGN gv_ref-&amp;gt;* TO &amp;lt;fs_table&amp;gt;.&lt;/P&gt;&lt;P&gt;ASSIGN gv_ref-&amp;gt;* TO &amp;lt;fs_update&amp;gt;.&lt;/P&gt;&lt;P&gt;ASSIGN gv_area-&amp;gt;* TO &amp;lt;fs_data&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, these field-symbols you can use as your internal tables and work areas.&lt;/P&gt;&lt;P&gt;P_TABLE is variable containg any database table name.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jun 2009 07:35:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/adding-fields-to-internal-table-dynamically/m-p/5783872#M1308761</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-24T07:35:55Z</dc:date>
    </item>
    <item>
      <title>Re: Adding fields to Internal table dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/adding-fields-to-internal-table-dynamically/m-p/5783873#M1308762</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Consider your internal table as follows:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Begin of itab,&lt;/P&gt;&lt;P&gt;f1,&lt;/P&gt;&lt;P&gt;f2,&lt;/P&gt;&lt;P&gt;f3,&lt;/P&gt;&lt;P&gt;till&lt;/P&gt;&lt;P&gt;f13,&lt;/P&gt;&lt;P&gt;Dynamic f1,&lt;/P&gt;&lt;P&gt;Dynamic f2,&lt;/P&gt;&lt;P&gt;Dynamic f3,&lt;/P&gt;&lt;P&gt;Dynamic f4,&lt;/P&gt;&lt;P&gt; and so on&lt;/P&gt;&lt;P&gt;end of itab&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So basically you will have to make of the class CL_ALV_TABLE_CREATE and the method CREATE_DYNAMIC_TABLE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Prepare a fieldcatalog table first.&lt;/P&gt;&lt;P&gt;Pass the 13 fields first with their details.&lt;/P&gt;&lt;P&gt;Then within a loop pass the dynamic fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pass this fieldcatlog to the method and you will get your internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check the demo program BCALV_TABLE_CREATE&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>Wed, 24 Jun 2009 07:38:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/adding-fields-to-internal-table-dynamically/m-p/5783873#M1308762</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-24T07:38:51Z</dc:date>
    </item>
    <item>
      <title>Re: Adding fields to Internal table dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/adding-fields-to-internal-table-dynamically/m-p/5783874#M1308763</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ankur,&lt;/P&gt;&lt;P&gt;Can you pls send the code, to takle my issue. In that example based on no of parameters i am getting the output list. But here in my case, i have to display the first 13 fileds in the table, and then based on some other conditions, i have to add some fields to my internal table and then display. Pls send the code for the same.&lt;/P&gt;&lt;P&gt;Prob :&lt;/P&gt;&lt;P&gt;in internal table i have 13 fields&lt;/P&gt;&lt;P&gt;f1&lt;/P&gt;&lt;P&gt;f2...&lt;/P&gt;&lt;P&gt;so on &lt;/P&gt;&lt;P&gt;f13.&lt;/P&gt;&lt;P&gt;Now based on some conditions, i have to append the fields in the internal table. pls send the code.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Raju&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jun 2009 13:33:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/adding-fields-to-internal-table-dynamically/m-p/5783874#M1308763</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-24T13:33:36Z</dc:date>
    </item>
    <item>
      <title>Re: Adding fields to Internal table dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/adding-fields-to-internal-table-dynamically/m-p/5783875#M1308764</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 will not be able to add fields in the existing internal table.&lt;/P&gt;&lt;P&gt;But you will have to create a new internal table and add the new fields to it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will try to give an example code.&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>Wed, 24 Jun 2009 14:14:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/adding-fields-to-internal-table-dynamically/m-p/5783875#M1308764</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-24T14:14:52Z</dc:date>
    </item>
  </channel>
</rss>

