<?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 Tree and set_table_for_first_display problem in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-tree-and-set-table-for-first-display-problem/m-p/6492387#M1420491</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The code I am using as an example is BCALV_TREE_SIMPLE_DEMO.  If I have no data in my table it doesn't error when I call set_table_for_first_display.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it looks like I might have to use that one instead because from what I understand you can use  cl_gui_alv_tree_simple when the input table has all the required columns such as sflight but you use cl_gui_alv_tree when you need an internal table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 21 Jan 2010 05:52:52 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-01-21T05:52:52Z</dc:date>
    <item>
      <title>ALV Tree and set_table_for_first_display problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-tree-and-set-table-for-first-display-problem/m-p/6492385#M1420489</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to create an alv tree.  I have some sample code that uses the sflight table and this works fine however when i replace sflight with my internal structure and table it crashes at set_table_for_first_display with a "Field symbol has not been assigned" error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is part of the original code that works.  *This isn't all the code just the relevant parts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: gt_sflight      TYPE sflight OCCURS 0,   " Output-Table
           gt_fieldcatalog TYPE lvc_t_fcat,            " Field Catalog

CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
    EXPORTING
      i_structure_name = 'sflight'
    CHANGING
      ct_fieldcat      = gt_fieldcatalog.

*  change fieldcatalog
  DATA: ls_fieldcatalog TYPE lvc_s_fcat.
  LOOP AT gt_fieldcatalog INTO ls_fieldcatalog.
    CASE ls_fieldcatalog-fieldname.
      WHEN 'CARRID' OR 'CONNID' OR 'FLDATE'.
        ls_fieldcatalog-no_out = 'X'.
        ls_fieldcatalog-key    = ''.
      WHEN 'PRICE' OR 'SEATSOCC' OR 'SEATSMAX' OR 'PAYMENTSUM'.
        ls_fieldcatalog-do_sum = 'X'.
    ENDCASE.
    MODIFY gt_fieldcatalog FROM ls_fieldcatalog.
  ENDLOOP.

SELECT * FROM sflight INTO TABLE gt_sflight.

create hierarchy
  CALL METHOD tree1-&amp;gt;set_table_for_first_display
    EXPORTING
      it_list_commentary = lt_list_commentary
      i_logo             = l_logo
      i_background_id    = 'ALV_BACKGROUND'
      i_save             = 'A'
      is_variant         = ls_variant
    CHANGING
      it_sort            = gt_sort
      it_outtab          = gt_sflight
      it_fieldcatalog    = gt_fieldcatalog.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the code when I replace gt_sflight with my internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: gt_detailed      TYPE ZDT_REPORT1_DETAIL_STRUC occurs 0 ,   " Output-Table
           gt_fieldcatalog TYPE lvc_t_fcat,         " Field Catalog

CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
    EXPORTING
      i_structure_name = 'ZDT_REPORT1_DETAIL_STRUC'
    CHANGING
      ct_fieldcat      = gt_fieldcatalog
    EXCEPTIONS
      inconsistent_interface = 1
      program_error = 2
      OTHERS = 3.
    IF sy-subrc &amp;lt;&amp;gt; 0.
*--Exception handling
    ENDIF.


"* change fieldcatalog
  DATA: ls_fieldcatalog TYPE lvc_s_fcat.
  LOOP AT gt_fieldcatalog INTO ls_fieldcatalog.
    CASE ls_fieldcatalog-fieldname.
      WHEN 'COMP_DESC' OR 'SUBC_DESC'.
        ls_fieldcatalog-no_out = 'X'.
        ls_fieldcatalog-key    = ''.
      WHEN 'DOWNTIME'.
        ls_fieldcatalog-do_sum = 'X'.
    ENDCASE.
    MODIFY gt_fieldcatalog FROM ls_fieldcatalog.
  ENDLOOP.

" Select statement to fill gt_detailed

* create hierarchy
  CALL METHOD tree1-&amp;gt;set_table_for_first_display
    EXPORTING
      it_list_commentary = lt_list_commentary
      i_logo             = l_logo
      i_background_id    = 'ALV_BACKGROUND'
      i_save             = 'A'
      is_variant         = ls_variant
    CHANGING
      it_sort            = gt_sort
      it_outtab          = gt_detailed
      it_fieldcatalog    = gt_fieldcatalog.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When it runs like this it crashes at set_table_for_first_display&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jan 2010 03:44:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-tree-and-set-table-for-first-display-problem/m-p/6492385#M1420489</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-21T03:44:35Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Tree and set_table_for_first_display problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-tree-and-set-table-for-first-display-problem/m-p/6492386#M1420490</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;Have a look at this program it will be pretty much clearer then,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BCALV_TREE_01&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps you,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Abhijit G. Borkar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jan 2010 04:23:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-tree-and-set-table-for-first-display-problem/m-p/6492386#M1420490</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-21T04:23:24Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Tree and set_table_for_first_display problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-tree-and-set-table-for-first-display-problem/m-p/6492387#M1420491</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The code I am using as an example is BCALV_TREE_SIMPLE_DEMO.  If I have no data in my table it doesn't error when I call set_table_for_first_display.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it looks like I might have to use that one instead because from what I understand you can use  cl_gui_alv_tree_simple when the input table has all the required columns such as sflight but you use cl_gui_alv_tree when you need an internal table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jan 2010 05:52:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-tree-and-set-table-for-first-display-problem/m-p/6492387#M1420491</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-21T05:52:52Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Tree and set_table_for_first_display problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-tree-and-set-table-for-first-display-problem/m-p/6492388#M1420492</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I needed to use cl_gui_alv_tree instead of cl_gui_alv_tree_simple.  BCALV_TREE_01 is a good example.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jan 2010 02:42:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-tree-and-set-table-for-first-display-problem/m-p/6492388#M1420492</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-22T02:42:48Z</dc:date>
    </item>
  </channel>
</rss>

