<?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 using RTTS - Question on Issue in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table-creation-using-rtts-question-on-issue/m-p/1166793#M121967</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi again,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. The reason could be&lt;/P&gt;&lt;P&gt;   .INCLUDE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. If in se11,&lt;/P&gt;&lt;P&gt;   u see PA0001.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. It has 4 rows. (basic definition)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; MANDT&lt;/P&gt;&lt;P&gt;.INCLUDE&lt;/P&gt;&lt;P&gt;.INCLUDE&lt;/P&gt;&lt;P&gt;.INCLUDE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. May be,&lt;/P&gt;&lt;P&gt;  the RTTS does not EXPAND &lt;/P&gt;&lt;P&gt;  these .INCLUDE&lt;/P&gt;&lt;P&gt;  AND RETURNS ONLY 4 ROWS.&lt;/P&gt;&lt;P&gt;&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;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 03 Feb 2006 13:44:56 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-02-03T13:44:56Z</dc:date>
    <item>
      <title>Dynamic Table Creation using RTTS - Question on Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table-creation-using-rtts-question-on-issue/m-p/1166790#M121964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using the RTTS services to dynamically create a table.  However, when I attempt to use the get_components method it does not return all the components for all tables that I am working with.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cases and End Results&lt;/P&gt;&lt;P&gt;1) Created structure in data dictionary &amp;#150; get_components works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Pass PA0001, P0001 or T001P to get_components and I do not receive the correct results.  It only returns a small subset of these objects.  The components table has all the entries; however, the get_components method only returns about 4 rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you explain this and point me to the correct logic sequence? I would like the logic to work with all tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Code excerpt below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The logic for the get components works for case 1, but not case 2. When I pass into this method a "Z" custom table or structure name for parameter &amp;#147;structure_name&amp;#148; and the get_components() method executes and returns the correct results. However, when I pass in any of the objects listed above in case 2, the get_components method does not return the correct number of entries. When I check typ_struct which is populated right before the get_components line, I see the correct number of components in the components table.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;method pb_add_column_headings .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  constants: c_generic_struct type c length 19 value 'ZXX_COLUMN_HEADINGS'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  data: cnt_lines      type sytabix,&lt;/P&gt;&lt;P&gt;        rf_data        type ref to data,&lt;/P&gt;&lt;P&gt;        typ_field      type ref to cl_abap_datadescr,&lt;/P&gt;&lt;P&gt;        typ_struct     type ref to cl_abap_structdescr,&lt;/P&gt;&lt;P&gt;        typ_table      type ref to cl_abap_tabledescr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  data: wa_col_headings type ddobjname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  data: rf_tbl_creation_exception type ref to  &lt;/P&gt;&lt;P&gt;                                  cx_sy_table_creation,&lt;/P&gt;&lt;P&gt;        rf_struct_creation_exception type ref to &lt;/P&gt;&lt;P&gt;                                  cx_sy_struct_creation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  data: t_comp_tab type &lt;/P&gt;&lt;P&gt;                   cl_abap_structdescr=&amp;gt;component_table,&lt;/P&gt;&lt;P&gt;        t_comp_tab_new      like t_comp_tab,&lt;/P&gt;&lt;P&gt;        t_comp_tab_imported like t_comp_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  field-symbols: &amp;lt;fs_comp&amp;gt; like line of t_comp_tab,&lt;/P&gt;&lt;P&gt;                 &amp;lt;fs_col_headings_tbl&amp;gt; type any table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**Get components of generic structure&lt;/P&gt;&lt;P&gt;  wa_col_headings = c_generic_struct.&lt;/P&gt;&lt;P&gt;  typ_struct ?= cl_abap_typedescr=&amp;gt;describe_by_name( &lt;/P&gt;&lt;P&gt;                                   wa_col_headings ).&lt;/P&gt;&lt;P&gt;  T_COMP_TAB = typ_struct-&amp;gt;get_components( ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**Determine how many components in imported structure.&lt;/P&gt;&lt;P&gt;  typ_struct ?= cl_abap_typedescr=&amp;gt;describe_by_name( &lt;/P&gt;&lt;P&gt;                                    structure_name ).&lt;/P&gt;&lt;P&gt;  t_comp_tab_imported = typ_struct-&amp;gt;get_components( ).&lt;/P&gt;&lt;P&gt;  cnt_lines = lines( t_comp_tab_imported[] ).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Feb 2006 12:45:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table-creation-using-rtts-question-on-issue/m-p/1166790#M121964</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-03T12:45:16Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Table Creation using RTTS - Question on Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table-creation-using-rtts-question-on-issue/m-p/1166791#M121965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Garton,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. GET_COMPONENT_LIST&lt;/P&gt;&lt;P&gt;   Use this FM.&lt;/P&gt;&lt;P&gt;   It gives all fieldnames.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Use this code (just copy paste)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT abc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : cmp LIKE TABLE OF rstrucinfo WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;DATA : pa0001 LIKE TABLE OF pa0001 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'GET_COMPONENT_LIST'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    program    = sy-repid&lt;/P&gt;&lt;P&gt;    fieldname  = 'PA0001'&lt;/P&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    components = cmp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT cmp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  WRITE &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; cmp-compname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&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;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Feb 2006 12:55:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table-creation-using-rtts-question-on-issue/m-p/1166791#M121965</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-03T12:55:17Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Table Creation using RTTS - Question on Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table-creation-using-rtts-question-on-issue/m-p/1166792#M121966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for this information.  however, I was looking for an answer to why the method get_components in class cl_abap_structdescr is not working with all tables.  I am aware of this FM; however, I was looking for a solution in RTTS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;john&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Feb 2006 13:37:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table-creation-using-rtts-question-on-issue/m-p/1166792#M121966</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-03T13:37:06Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Table Creation using RTTS - Question on Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table-creation-using-rtts-question-on-issue/m-p/1166793#M121967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi again,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. The reason could be&lt;/P&gt;&lt;P&gt;   .INCLUDE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. If in se11,&lt;/P&gt;&lt;P&gt;   u see PA0001.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. It has 4 rows. (basic definition)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; MANDT&lt;/P&gt;&lt;P&gt;.INCLUDE&lt;/P&gt;&lt;P&gt;.INCLUDE&lt;/P&gt;&lt;P&gt;.INCLUDE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. May be,&lt;/P&gt;&lt;P&gt;  the RTTS does not EXPAND &lt;/P&gt;&lt;P&gt;  these .INCLUDE&lt;/P&gt;&lt;P&gt;  AND RETURNS ONLY 4 ROWS.&lt;/P&gt;&lt;P&gt;&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;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Feb 2006 13:44:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table-creation-using-rtts-question-on-issue/m-p/1166793#M121967</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-03T13:44:56Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Table Creation using RTTS - Question on Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table-creation-using-rtts-question-on-issue/m-p/1166794#M121968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The answer to my question was right under my nose and I did not see it at first.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is a method in the same class that does what I wanted. It will traverse multiple levels of include statements to return a table with just the components in it.&lt;/P&gt;&lt;P&gt;Method: get_included_view( )&lt;/P&gt;&lt;P&gt;You pass in an integer value to determine how deep you want to traverse.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I check the field HAS_INCLUDE and if its checked, then I call get_included_view otherwise I call get_components().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Feb 2006 19:04:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table-creation-using-rtts-question-on-issue/m-p/1166794#M121968</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-03T19:04:35Z</dc:date>
    </item>
  </channel>
</rss>

