<?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 Table Creation in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table-creation/m-p/1401382#M194040</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It sure does.  Thanks.  I'll have to study it to see how it differs.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 Jun 2006 16:59:15 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-06-29T16:59:15Z</dc:date>
    <item>
      <title>Dynamic Table Creation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table-creation/m-p/1401380#M194038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to create a dynamic table based on a transparent table, but the component table returned by method &amp;lt;b&amp;gt;l_r_structype-&amp;gt;get_components( )&amp;lt;/b&amp;gt; does not contain the  fields in an .include structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone know of a way around this?&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  l_r_structype ?= cl_abap_typedescr=&amp;gt;describe_by_name( p_tbl ).

  l_t_comp_tab = l_r_structype-&amp;gt;get_components( ).

  LOOP AT l_t_comp_tab INTO l_s_comp_tab.
    WRITE:/ l_s_comp_tab-name.
  ENDLOOP.

LOGDPID          
OBJVERS          
VARIANT          
SOURCE           
TYP              
LOGSYS           
LOGDPID_N        
FIRSTFLAG        
UNAME            
TIMESTAMP        
OLTPSOURCE       
OLTPTYP          
GENERATED        
CRT_PACKAGE      
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;From FM DB_GET_TABLE_FIELDS (included fields are bold-faced):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOGDPID                 
OBJVERS                 
VARIANT                 
SOURCE                  
TYP                     
LOGSYS                  
LOGDPID_N               
FIRSTFLAG               
UNAME                   
TIMESTAMP       
&amp;lt;b&amp;gt;        
OBJSTAT                 
CONTREL                 
CONTTIMESTMP            
OWNER                   
BWAPPL                  
&amp;lt;/b&amp;gt;
OLTPSOURCE              
OLTPTYP                 
GENERATED               
CRT_PACKAGE             
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jun 2006 16:50:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table-creation/m-p/1401380#M194038</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-29T16:50:21Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Table Creation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table-creation/m-p/1401381#M194039</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please see the example program.  Does this pull all of the fields?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;


report zrich_0001 .


type-pools : abap.

data : it_details type abap_compdescr_tab,
       wa_details type abap_compdescr.

data : ref_descr type ref to cl_abap_structdescr.

selection-screen begin of block b1 with frame title text .
parameters: p_table(30) type c.
selection-screen end of block b1.

* Get the structure of the table.
&amp;lt;b&amp;gt;ref_descr ?= cl_abap_typedescr=&amp;gt;describe_by_name( p_table ).
it_details[] = ref_descr-&amp;gt;components[].&amp;lt;/b&amp;gt;

loop at it_details into wa_details.
  write:/ wa_details-name.
endloop.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jun 2006 16:56:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table-creation/m-p/1401381#M194039</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-06-29T16:56:16Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Table Creation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table-creation/m-p/1401382#M194040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It sure does.  Thanks.  I'll have to study it to see how it differs.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jun 2006 16:59:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table-creation/m-p/1401382#M194040</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-29T16:59:15Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Table Creation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table-creation/m-p/1401383#M194041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is your DATA statment for l_r_structype?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jun 2006 17:02:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table-creation/m-p/1401383#M194041</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-06-29T17:02:27Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Table Creation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table-creation/m-p/1401384#M194042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;l_r_structype        TYPE REF TO cl_abap_structdescr,
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Seems similar to your:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data : ref_descr type ref to cl_abap_structdescr.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;statement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jun 2006 17:08:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table-creation/m-p/1401384#M194042</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-29T17:08:52Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Table Creation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table-creation/m-p/1401385#M194043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What version of SAP are you on?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jun 2006 17:11:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table-creation/m-p/1401385#M194043</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-06-29T17:11:44Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Table Creation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table-creation/m-p/1401386#M194044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My version gets the component table from a method call&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;l_t_comp_tab = l_r_structype-&amp;gt;get_components( ).&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;whereas yours references it directly.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;it_details[] = ref_descr-&amp;gt;components[].
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I wonder if that is the difference.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jun 2006 17:12:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table-creation/m-p/1401386#M194044</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-29T17:12:10Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Table Creation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table-creation/m-p/1401387#M194045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We're on BW, kernel version 6.40&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jun 2006 17:13:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table-creation/m-p/1401387#M194045</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-29T17:13:11Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Table Creation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table-creation/m-p/1401388#M194046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In my 46c system, It doesn't seem that the method get_components exists for this class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jun 2006 17:13:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table-creation/m-p/1401388#M194046</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-06-29T17:13:21Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Table Creation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table-creation/m-p/1401389#M194047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This code will help you to create a workarea and display the contents of the transparent table you specify.&lt;/P&gt;&lt;P&gt;************************************&lt;/P&gt;&lt;P&gt;REPORT  ZMART_DYNAMIC_TABLE                     .&lt;/P&gt;&lt;P&gt;PARAMETERS : tname(30).&lt;/P&gt;&lt;P&gt;DATA: dref TYPE REF TO DATA,tab type ref to data.&lt;/P&gt;&lt;P&gt;*data tname TYPE string.&lt;/P&gt;&lt;P&gt; field-symbols :  &amp;lt;f&amp;gt; TYPE any,&amp;lt;fc&amp;gt; type any,&amp;lt;fcd&amp;gt;,&amp;lt;ft&amp;gt; type standard table.&lt;/P&gt;&lt;P&gt;*tname = TABNAME.&lt;/P&gt;&lt;P&gt;CREATE DATA dref TYPE (tname).&lt;/P&gt;&lt;P&gt;ASSIGN dref-&amp;gt;* TO &amp;lt;f&amp;gt;.&lt;/P&gt;&lt;P&gt;create data tab like table of &amp;lt;f&amp;gt;.&lt;/P&gt;&lt;P&gt;assign tab-&amp;gt;* to &amp;lt;ft&amp;gt;.&lt;/P&gt;&lt;P&gt;SELECT  *  INTO table &amp;lt;ft&amp;gt; from (tname).&lt;/P&gt;&lt;P&gt;LOOP AT &amp;lt;ft&amp;gt; INTO &amp;lt;f&amp;gt;.&lt;/P&gt;&lt;P&gt;do.&lt;/P&gt;&lt;P&gt;      assign component  sy-index&lt;/P&gt;&lt;P&gt;         of structure &amp;lt;f&amp;gt; to &amp;lt;fcd&amp;gt;.&lt;/P&gt;&lt;P&gt;      if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;        exit.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;      if sy-index = 1.&lt;/P&gt;&lt;P&gt;        write:/ &amp;lt;fcd&amp;gt;.&lt;/P&gt;&lt;P&gt;      else.&lt;/P&gt;&lt;P&gt;        write: &amp;lt;fcd&amp;gt;.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;    enddo.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please reward points if find informative.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Apr 2007 09:08:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table-creation/m-p/1401389#M194047</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-19T09:08:25Z</dc:date>
    </item>
  </channel>
</rss>

