<?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: ALV in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4052154#M968596</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hema,&lt;/P&gt;&lt;P&gt;You have to use the technique of creating dynamic internal table.&lt;/P&gt;&lt;P&gt;I am giving you a simple code for buiding dynamic internal table using fieldcatalog .&lt;/P&gt;&lt;P&gt;You can debug the code and check how it builds the internal table and accordingly you can apply this in your code also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;********************************************************************&lt;/P&gt;&lt;P&gt;REPORT  Z_DYNITALV.&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: new_table TYPE REF TO data,&lt;/P&gt;&lt;P&gt;      new_line  TYPE REF TO data,&lt;/P&gt;&lt;P&gt;      IS_LVC_CAT type LVC_S_FCAT,&lt;/P&gt;&lt;P&gt;      IT_LVC_CAT type LVC_T_FCAT,&lt;/P&gt;&lt;P&gt;      IS_FIELDCAT type SLIS_FIELDCAT_ALV.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS: &amp;lt;l_table&amp;gt; TYPE 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;data:fieldname(30),&lt;/P&gt;&lt;P&gt;     N(2) type n value '00' .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do 10 times.&lt;/P&gt;&lt;P&gt;  N = N + 1.&lt;/P&gt;&lt;P&gt;  fieldname = 'column'.&lt;/P&gt;&lt;P&gt;  concatenate fieldname N into fieldname.&lt;/P&gt;&lt;P&gt; IS_LVC_CAT-FIELDNAME = fieldname.&lt;/P&gt;&lt;P&gt; append IS_LVC_CAT to IT_LVC_CAT.&lt;/P&gt;&lt;P&gt; clear fieldname.&lt;/P&gt;&lt;P&gt;enddo.&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_LVC_CAT&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;  ******************************************************************&lt;/P&gt;&lt;P&gt;Just use this code snippet and see what happens in debugger.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this will help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Help children of U.N World Food Program by rewarding  points and encourage others to answer your queries.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Jun 2008 08:36:15 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-06-27T08:36:15Z</dc:date>
    <item>
      <title>ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4052151#M968593</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;My requirement is when the user inputs a value on the selection screen for the fiscal period as 1 to 12 and fiscal year as 2007 to 2008 then the dates corresponding to these periods have to be displayed as column headers in the o/p.This is a dynamic column and changes based on the input given by the user.The purchase price amounts have to be displayed under the corresponding dates as shown below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2007-1  2007-2 2007-3----&lt;/P&gt;&lt;HR originaltext="-------" /&gt;&lt;P&gt;2008-1 2008-2 2008-3    Total&lt;/P&gt;&lt;P&gt;10         15          23               16         34      65          163&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The total of all these amounts have to be displayed in the total column.&lt;/P&gt;&lt;P&gt;In my program the total amount is displayed but the individual amounts are not getting displayed in the output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone tell me a solution for this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jun 2008 08:28:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4052151#M968593</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-27T08:28:26Z</dc:date>
    </item>
    <item>
      <title>Re: ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4052152#M968594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Make use of dynamic internal table.You will find a lot of stuff regarding this on SDN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if useful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jun 2008 08:29:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4052152#M968594</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-27T08:29:55Z</dc:date>
    </item>
    <item>
      <title>Re: ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4052153#M968595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi check this ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use this function module for getting the dates from the year and month...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;POPUP_TO_SELECT_MONTH&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for getting the total use this in the fieldcat..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_fieldcat-do_sum = 'X'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jun 2008 08:35:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4052153#M968595</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-27T08:35:00Z</dc:date>
    </item>
    <item>
      <title>Re: ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4052154#M968596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hema,&lt;/P&gt;&lt;P&gt;You have to use the technique of creating dynamic internal table.&lt;/P&gt;&lt;P&gt;I am giving you a simple code for buiding dynamic internal table using fieldcatalog .&lt;/P&gt;&lt;P&gt;You can debug the code and check how it builds the internal table and accordingly you can apply this in your code also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;********************************************************************&lt;/P&gt;&lt;P&gt;REPORT  Z_DYNITALV.&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: new_table TYPE REF TO data,&lt;/P&gt;&lt;P&gt;      new_line  TYPE REF TO data,&lt;/P&gt;&lt;P&gt;      IS_LVC_CAT type LVC_S_FCAT,&lt;/P&gt;&lt;P&gt;      IT_LVC_CAT type LVC_T_FCAT,&lt;/P&gt;&lt;P&gt;      IS_FIELDCAT type SLIS_FIELDCAT_ALV.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS: &amp;lt;l_table&amp;gt; TYPE 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;data:fieldname(30),&lt;/P&gt;&lt;P&gt;     N(2) type n value '00' .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do 10 times.&lt;/P&gt;&lt;P&gt;  N = N + 1.&lt;/P&gt;&lt;P&gt;  fieldname = 'column'.&lt;/P&gt;&lt;P&gt;  concatenate fieldname N into fieldname.&lt;/P&gt;&lt;P&gt; IS_LVC_CAT-FIELDNAME = fieldname.&lt;/P&gt;&lt;P&gt; append IS_LVC_CAT to IT_LVC_CAT.&lt;/P&gt;&lt;P&gt; clear fieldname.&lt;/P&gt;&lt;P&gt;enddo.&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_LVC_CAT&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;  ******************************************************************&lt;/P&gt;&lt;P&gt;Just use this code snippet and see what happens in debugger.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this will help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Help children of U.N World Food Program by rewarding  points and encourage others to answer your queries.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jun 2008 08:36:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4052154#M968596</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-27T08:36:15Z</dc:date>
    </item>
  </channel>
</rss>

