<?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 how to control internal table columns dynamically based on input in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-control-internal-table-columns-dynamically-based-on-input/m-p/5371598#M1235673</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i have 2 fields in the selection screen - user and tcode&lt;/P&gt;&lt;P&gt;we can give any number of tcodes as in put&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;based on requirement i need to display all the tcodes belongs to one user in one row&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in other words&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the out put table columns should increase dynamically based on number of tcodes entered&lt;/P&gt;&lt;P&gt;in the input&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how to do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: tummala swapna on Apr 7, 2009 11:55 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Apr 2009 06:22:52 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-04-07T06:22:52Z</dc:date>
    <item>
      <title>how to control internal table columns dynamically based on input</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-control-internal-table-columns-dynamically-based-on-input/m-p/5371598#M1235673</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i have 2 fields in the selection screen - user and tcode&lt;/P&gt;&lt;P&gt;we can give any number of tcodes as in put&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;based on requirement i need to display all the tcodes belongs to one user in one row&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in other words&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the out put table columns should increase dynamically based on number of tcodes entered&lt;/P&gt;&lt;P&gt;in the input&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how to do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: tummala swapna on Apr 7, 2009 11:55 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2009 06:22:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-control-internal-table-columns-dynamically-based-on-input/m-p/5371598#M1235673</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-07T06:22:52Z</dc:date>
    </item>
    <item>
      <title>Re: how to control internal table columns dynamically based on input</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-control-internal-table-columns-dynamically-based-on-input/m-p/5371599#M1235674</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use the class CL_ALV_TABLE_CREATE - &amp;gt;CREATE_DYNAMIC_TABLE for dynamic table creation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2009 06:28:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-control-internal-table-columns-dynamically-based-on-input/m-p/5371599#M1235674</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-07T06:28:37Z</dc:date>
    </item>
    <item>
      <title>Re: how to control internal table columns dynamically based on input</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-control-internal-table-columns-dynamically-based-on-input/m-p/5371600#M1235675</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Swapna,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can certainly achieve this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just a sample code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : lt_dy_tab_fields TYPE lvc_t_fcat WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  cl_alv_table_create=&amp;gt;create_dynamic_table(&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      it_fieldcatalog = lt_dy_tab_fields[]&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      ep_table        = tab_ref1 ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ASSIGN tab_ref1-&amp;gt;*  TO &amp;lt;table_sum&amp;gt;.&lt;/P&gt;&lt;P&gt;*Line item is created using the TAB_REF&lt;/P&gt;&lt;P&gt;  CREATE DATA line_ref LIKE LINE OF &amp;lt;table&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ASSIGN line_ref-&amp;gt;* TO &amp;lt;line&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have to fill up the lt_dy_tab_fields with the list of the columns, the method wil convert it to a internal table.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tell me in case u need any help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gowri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2009 06:31:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-control-internal-table-columns-dynamically-based-on-input/m-p/5371600#M1235675</guid>
      <dc:creator>former_member873340</dc:creator>
      <dc:date>2009-04-07T06:31:09Z</dc:date>
    </item>
    <item>
      <title>Re: how to control internal table columns dynamically based on input</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-control-internal-table-columns-dynamically-based-on-input/m-p/5371601#M1235676</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This may be useful to you..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS : &amp;lt;FS_TABLE&amp;gt; TYPE ANY TABLE.&lt;/P&gt;&lt;P&gt;             &lt;/P&gt;&lt;P&gt;DATA: DREF TYPE REF TO DATA,&lt;/P&gt;&lt;P&gt;      WA_DREF TYPE REF TO DATA,&lt;/P&gt;&lt;P&gt;      DY_LINE TYPE REF TO DATA,&lt;/P&gt;&lt;P&gt;      ITAB_TYPE TYPE REF TO CL_ABAP_TABLEDESCR,&lt;/P&gt;&lt;P&gt;      WA_TYPE TYPE REF TO CL_ABAP_STRUCTDESCR,&lt;/P&gt;&lt;P&gt;      STRUCT_TYPE TYPE REF TO CL_ABAP_STRUCTDESCR,&lt;/P&gt;&lt;P&gt;      ELEM_TYPE TYPE REF TO CL_ABAP_ELEMDESCR,&lt;/P&gt;&lt;P&gt;      COMP_TAB TYPE CL_ABAP_STRUCTDESCR=&amp;gt;COMPONENT_TABLE,&lt;/P&gt;&lt;P&gt;      COMP_FLD TYPE CL_ABAP_STRUCTDESCR=&amp;gt;COMPONENT,&lt;/P&gt;&lt;P&gt;      OTAB TYPE ABAP_SORTORDER_TAB,&lt;/P&gt;&lt;P&gt;      OLINE TYPE ABAP_SORTORDER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;BEGIN DYNAMIC STRUCTURE FOR FINAL INTERNAL TABLE @@@@@@@@@@@@@@@@@@&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STRUCT_TYPE ?= CL_ABAP_TYPEDESCR=&amp;gt;DESCRIBE_BY_NAME('table or structure name').&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COMP_TAB = STRUCT_TYPE-&amp;gt;GET_COMPONENTS( ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STRUCT_TYPE = CL_ABAP_STRUCTDESCR=&amp;gt;CREATE( COMP_TAB ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ITAB_TYPE = CL_ABAP_TABLEDESCR=&amp;gt;CREATE( STRUCT_TYPE ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CREATE DATA DREF TYPE HANDLE ITAB_TYPE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ASSIGN DREF-&amp;gt;* TO &amp;lt;FS_TABLE&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;END DYNAMIC STRUCTURE FOR FINAL INTERNAL TABLE @@@@@@@@@@@@@@@@@@&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2009 09:42:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-control-internal-table-columns-dynamically-based-on-input/m-p/5371601#M1235676</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-07T09:42:50Z</dc:date>
    </item>
  </channel>
</rss>

