<?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 column based on the input in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-column-based-on-the-input/m-p/5608972#M1278138</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But do you also have a dynamic table? In other words, is the number of columns of your internal table FIXED or not?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. If FIXED, use the ALV grid as output, in which you can enter a column of the field catalog and set the NO_OUT to 'X' (column is not output).&lt;/P&gt;&lt;P&gt;2. If dynamic number of columns, just provide only those columns to your method corresponding to the number of columns to be output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Again, you need to be a bit more specific about your requirement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 May 2009 06:44:52 GMT</pubDate>
    <dc:creator>Sm1tje</dc:creator>
    <dc:date>2009-05-14T06:44:52Z</dc:date>
    <item>
      <title>dynamic column based on the input</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-column-based-on-the-input/m-p/5608967#M1278133</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;    I need to have dynamic &lt;STRONG&gt;column&lt;/STRONG&gt;  based on the given  input  . for eg if i give 3 as input then it should give me 3 column as the out put . Can any one solve it .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Abeehs&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2009 06:17:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-column-based-on-the-input/m-p/5608967#M1278133</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-14T06:17:56Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic column based on the input</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-column-based-on-the-input/m-p/5608968#M1278134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A lot of people can probably be of some help, but you do need to be a bit more specific.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Does your output (internal table for example), have a variable number of columns?&lt;/P&gt;&lt;P&gt;2. which columns need to be output, the first three, or just 3 random columns?&lt;/P&gt;&lt;P&gt;3. Is your output an ALV?&lt;/P&gt;&lt;P&gt;4. etc. etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In case of ALV for example it will be quite easy to set the number of columns to be output to 3.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2009 06:21:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-column-based-on-the-input/m-p/5608968#M1278134</guid>
      <dc:creator>Sm1tje</dc:creator>
      <dc:date>2009-05-14T06:21:56Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic column based on the input</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-column-based-on-the-input/m-p/5608969#M1278135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can pass the selection screen parameter as (no. of coulumns) in brackets '()' to the variable which holds no. of columns. &lt;/P&gt;&lt;P&gt;It would automatically take the dynamic no. of columns entered.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2009 06:24:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-column-based-on-the-input/m-p/5608969#M1278135</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-14T06:24:02Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic column based on the input</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-column-based-on-the-input/m-p/5608970#M1278136</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Basically i suppose you mean that your internal table will be dynamic.&lt;/P&gt;&lt;P&gt;There are a lot of posts in SDN on how to create in internal table dynamically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically you will have to make use of method CL_ALV_TABLE_CREATE=&amp;gt;CREATE_DYNAMIC_TABLE .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will have to create a fieldcatalog which will contain details about the columns which you will need and that will help you in creating the dynamic internal table.&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>Thu, 14 May 2009 06:25:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-column-based-on-the-input/m-p/5608970#M1278136</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-14T06:25:44Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic column based on the input</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-column-based-on-the-input/m-p/5608971#M1278137</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;&lt;/P&gt;&lt;P&gt; Thanks for ur reply ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; My task to display the column dynamically based on the user input given in the parameter for eg . Consider a parameter . the user enter the value 5 . Then it has to show 5  columns as out put how to solve it&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2009 06:39:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-column-based-on-the-input/m-p/5608971#M1278137</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-14T06:39:52Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic column based on the input</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-column-based-on-the-input/m-p/5608972#M1278138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But do you also have a dynamic table? In other words, is the number of columns of your internal table FIXED or not?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. If FIXED, use the ALV grid as output, in which you can enter a column of the field catalog and set the NO_OUT to 'X' (column is not output).&lt;/P&gt;&lt;P&gt;2. If dynamic number of columns, just provide only those columns to your method corresponding to the number of columns to be output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Again, you need to be a bit more specific about your requirement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2009 06:44:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-column-based-on-the-input/m-p/5608972#M1278138</guid>
      <dc:creator>Sm1tje</dc:creator>
      <dc:date>2009-05-14T06:44:52Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic column based on the input</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-column-based-on-the-input/m-p/5608973#M1278139</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 need to use FIELD-SYMBOLS  to dynamically assign the columns.&lt;/P&gt;&lt;P&gt;Check the sample code -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PARAMETERS : P_ABC TYPE I.

FIELD-SYMBOLS : &amp;lt;FIELD&amp;gt; TYPE ANY.

TABLES : SCARR.

DATA : T_SCARR TYPE TABLE OF SCARR.
SELECT * FROM SCARR INTO TABLE T_SCARR.
LOOP AT T_SCARR INTO SCARR.
  DO P_ABC TIMES.
    ASSIGN COMPONENT SY-INDEX OF STRUCTURE SCARR TO &amp;lt;FIELD&amp;gt;.
    WRITE : &amp;lt;FIELD&amp;gt;.
  ENDDO.
  NEW-LINE.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Note : Here I have displayed the columns of SCARR as an example.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pinaki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2009 06:52:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-column-based-on-the-input/m-p/5608973#M1278139</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-14T06:52:49Z</dc:date>
    </item>
  </channel>
</rss>

