<?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: dynamic Alv grid display in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-alv-grid-display/m-p/3768528#M906830</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;better to change the layout columns as A B C D E F&lt;/P&gt;&lt;P&gt;and rows as years&lt;/P&gt;&lt;P&gt;y don't u think like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;bcz internal table can handle rows dynamically&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Apr 2008 13:10:02 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-04-22T13:10:02Z</dc:date>
    <item>
      <title>dynamic Alv grid display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-alv-grid-display/m-p/3768527#M906829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to display an alv report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the number of rows are fixed. but the number of columns can vary.&lt;/P&gt;&lt;P&gt;Any suggestion on how to go for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        year 1   year 2 year 3 .... year n.&lt;/P&gt;&lt;P&gt;A&lt;/P&gt;&lt;P&gt;B &lt;/P&gt;&lt;P&gt;C&lt;/P&gt;&lt;P&gt;D &lt;/P&gt;&lt;P&gt;E&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to create the internal table dynamically using field symbols  but i am finding difficulty in filling up the internal table with data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Apr 2008 13:00:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-alv-grid-display/m-p/3768527#M906829</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-22T13:00:03Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic Alv grid display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-alv-grid-display/m-p/3768528#M906830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;better to change the layout columns as A B C D E F&lt;/P&gt;&lt;P&gt;and rows as years&lt;/P&gt;&lt;P&gt;y don't u think like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;bcz internal table can handle rows dynamically&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Apr 2008 13:10:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-alv-grid-display/m-p/3768528#M906830</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-22T13:10:02Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic Alv grid display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-alv-grid-display/m-p/3768529#M906831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's not that easy...But surely it can be done -;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA:  dataref TYPE REF TO data.

  FIELD-SYMBOLS: &amp;lt;l_line&amp;gt; TYPE ANY,
                 &amp;lt;l_field&amp;gt; TYPE ANY

  CREATE DATA dataref TYPE data.

  LOOP AT gt_bukrs_table ASSIGNING &amp;lt;fs_bukrs&amp;gt;.
    w_tabix_field = sy-tabix.
    wa_fcat-fieldname = &amp;lt;fs_bukrs&amp;gt;-bukrs.
    wa_fcat-inttype = 'I'.
    APPEND wa_fcat TO it_fieldcatalog.
    CONCATENATE 'TOT' w_tabix_field
    INTO w_tot_field.
    wa_fcat-fieldname = w_tot_field.
    wa_fcat-inttype = 'I'.
    APPEND wa_fcat TO it_fieldcatalog.
  ENDLOOP.

  CALL METHOD cl_alv_table_create=&amp;gt;create_dynamic_table
     EXPORTING
       it_fieldcatalog           = it_fieldcatalog
     IMPORTING
       ep_table                  = dataref
     EXCEPTIONS
       generate_subpool_dir_full = 1
       OTHERS                    = 2.

  ASSIGN dataref-&amp;gt;* TO &amp;lt;row&amp;gt;.
  CREATE DATA new_line LIKE LINE OF &amp;lt;row&amp;gt;.
  ASSIGN new_line-&amp;gt;* TO &amp;lt;l_line&amp;gt;.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before that, you need to use...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
      ASSIGN COMPONENT sy-tabix OF STRUCTURE &amp;lt;l_line&amp;gt; TO &amp;lt;l_field&amp;gt;.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
INSERT &amp;lt;l_line&amp;gt; INTO TABLE &amp;lt;row&amp;gt;.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just use &amp;lt;ROW&amp;gt; in the ALV FM and you're done -;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Blag.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Apr 2008 19:15:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-alv-grid-display/m-p/3768529#M906831</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-22T19:15:35Z</dc:date>
    </item>
  </channel>
</rss>

