<?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 create Dynamic internal table with columns also created dynamically. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-dynamic-internal-table-with-columns-also-created-dynamically/m-p/1272805#M150723</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Fred, &lt;/P&gt;&lt;P&gt;  The requirement is like this...&lt;/P&gt;&lt;P&gt;I enter 110 or 200 on the selection screen and the internal table as below to be created dynamically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data: Begin of it_itaboccurs 0,&lt;/P&gt;&lt;P&gt;        FIELD1(19),&lt;/P&gt;&lt;P&gt;        FIELD2(19),&lt;/P&gt;&lt;P&gt;        FIELD3(19),&lt;/P&gt;&lt;P&gt;        FIELD4(19),&lt;/P&gt;&lt;P&gt;        FIELD5(19),&lt;/P&gt;&lt;P&gt;        FIELD6(19),&lt;/P&gt;&lt;P&gt;        FIELD7(19),&lt;/P&gt;&lt;P&gt;        FIELD8(19),&lt;/P&gt;&lt;P&gt;        FIELD9(19),&lt;/P&gt;&lt;P&gt;         and so on.... till field110 or may be FIELD9200,&lt;/P&gt;&lt;P&gt;end of it_itab.&lt;/P&gt;&lt;P&gt;Hope you are now clear of my requirement.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Nara&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Mar 2006 12:52:51 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-03-10T12:52:51Z</dc:date>
    <item>
      <title>How to create Dynamic internal table with columns also created dynamically.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-dynamic-internal-table-with-columns-also-created-dynamically/m-p/1272803#M150721</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; Any info on how to create a dynamic internal table along with columns(fields) also to be created dynamically.&lt;/P&gt;&lt;P&gt;My requirement is ..On the selection screen I enter the number of fields to be in the internal table which gets created dynamically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had gone thru some posts on dynamic table creation,but could'nt find any on the dynamic field creation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions pls?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Nara&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Mar 2006 12:39:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-dynamic-internal-table-with-columns-also-created-dynamically/m-p/1272803#M150721</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-10T12:39:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to create Dynamic internal table with columns also created dynamically.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-dynamic-internal-table-with-columns-also-created-dynamically/m-p/1272804#M150722</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't understand ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;something like that ? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

*----------------------------------------------------------------------*
*   Form P_MODIFY_HEADER.                                              *
*----------------------------------------------------------------------*
*----------------------------------------------------------------------*
form p_modify_header.


  data : is_fieldcatalog type lvc_s_fcat ,
         v_count(2)      type n ,
         v_date          type d ,
         v_buff(30).



* Update the fieldcatalog.
  loop at it_fieldcatalog into is_fieldcatalog.
    check is_fieldcatalog-fieldname+0(3) eq 'ABS' or
          is_fieldcatalog-fieldname+0(3) eq 'VAL' .
    move : is_fieldcatalog-fieldname+3(2) to v_count ,
           p_perb2+5(2)                   to v_date+4(2) ,
           p_perb2+0(4)                   to v_date+0(4) ,
           '01'                           to v_date+6(2) .
    v_count = v_count - 1.
    call function 'RE_ADD_MONTH_TO_DATE'
        exporting
          months        = v_count
          olddate       = v_date
        importing
          newdate       = v_date.
    if is_fieldcatalog-fieldname+0(3) eq 'ABS'.
      concatenate 'Quantité 0'
                  v_date+4(2)
                  '.'
                  v_date+0(4)
                  into v_buff.
    else.
      concatenate 'Montant 0'
                  v_date+4(2)
                  '.'
                  v_date+0(4)
                  into v_buff.
    endif.
    move : v_buff to is_fieldcatalog-scrtext_s ,
           v_buff to is_fieldcatalog-scrtext_m ,
           v_buff to is_fieldcatalog-scrtext_l ,
           v_buff to is_fieldcatalog-reptext .
    modify it_fieldcatalog from is_fieldcatalog.
  endloop.


* Modify the fieldcatalog.
  call method obj_grid-&amp;gt;set_frontend_fieldcatalog
       exporting it_fieldcatalog = it_fieldcatalog.


* Refresh the display of the grid.
  call method obj_grid-&amp;gt;refresh_table_display.



endform.                     " P_MODIFY_HEADER

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Mar 2006 12:41:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-dynamic-internal-table-with-columns-also-created-dynamically/m-p/1272804#M150722</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2006-03-10T12:41:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to create Dynamic internal table with columns also created dynamically.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-dynamic-internal-table-with-columns-also-created-dynamically/m-p/1272805#M150723</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Fred, &lt;/P&gt;&lt;P&gt;  The requirement is like this...&lt;/P&gt;&lt;P&gt;I enter 110 or 200 on the selection screen and the internal table as below to be created dynamically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data: Begin of it_itaboccurs 0,&lt;/P&gt;&lt;P&gt;        FIELD1(19),&lt;/P&gt;&lt;P&gt;        FIELD2(19),&lt;/P&gt;&lt;P&gt;        FIELD3(19),&lt;/P&gt;&lt;P&gt;        FIELD4(19),&lt;/P&gt;&lt;P&gt;        FIELD5(19),&lt;/P&gt;&lt;P&gt;        FIELD6(19),&lt;/P&gt;&lt;P&gt;        FIELD7(19),&lt;/P&gt;&lt;P&gt;        FIELD8(19),&lt;/P&gt;&lt;P&gt;        FIELD9(19),&lt;/P&gt;&lt;P&gt;         and so on.... till field110 or may be FIELD9200,&lt;/P&gt;&lt;P&gt;end of it_itab.&lt;/P&gt;&lt;P&gt;Hope you are now clear of my requirement.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Nara&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Mar 2006 12:52:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-dynamic-internal-table-with-columns-also-created-dynamically/m-p/1272805#M150723</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-10T12:52:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to create Dynamic internal table with columns also created dynamically.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-dynamic-internal-table-with-columns-also-created-dynamically/m-p/1272806#M150724</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's the code I give you. My code is to change the number of column depend of the number of month the user select.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You just have to create a good table it_fieldcatalog, with the 200 column dynamicly (depend of the number enter in your selection-screen).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fred&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Mar 2006 12:56:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-dynamic-internal-table-with-columns-also-created-dynamically/m-p/1272806#M150724</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2006-03-10T12:56:11Z</dc:date>
    </item>
  </channel>
</rss>

