<?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: Simple Tree Problem in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/simple-tree-problem/m-p/2133867#M448745</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Markus&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I understand neither the reason for the dump nor your SELECT statement. If you want to read metadata of tables then you should use function module &amp;lt;b&amp;gt;DDIF_FIELDINFO_GET&amp;lt;/b&amp;gt; (set IMPORTING parameter ALL_TYPES = 'X').&lt;/P&gt;&lt;P&gt;Alternatively, you could use function module &amp;lt;b&amp;gt;LVC_FIELDCATALOG_MERGE&amp;lt;/b&amp;gt;. By default this function module does not return the client field (I_CLIENT_NEVER_DISPLAY = 'X').&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 Apr 2007 20:47:58 GMT</pubDate>
    <dc:creator>uwe_schieferstein</dc:creator>
    <dc:date>2007-04-19T20:47:58Z</dc:date>
    <item>
      <title>Simple Tree Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/simple-tree-problem/m-p/2133866#M448744</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;I read the table 'dd03l' to get all fields of one Table.&lt;/P&gt;&lt;P&gt;The result are 63 Fields.&lt;/P&gt;&lt;P&gt;The select:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  SELECT fieldname FROM dd03l INTO ls_fields-fieldname
      WHERE tabname  = gf_database
        AND as4local = 'A'
        AND as4vers  = 0
        AND position &amp;lt; 59
        AND datatype &amp;lt;&amp;gt; 'CLNT'.
    APPEND ls_fields TO lt_fields.
  ENDSELECT.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ok, now i want to make a simple Tree with this fieldnames, like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Tablename
 - Field1
 - Field2
 - Field3&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and so on...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No Problem?But i get a Dump, when i dont set this Argument ' AND position &amp;lt; 59'.&lt;/P&gt;&lt;P&gt;When i write position &amp;lt; 60, the result is a Dump. When i omit this Argument, i get a Dump. Because the Table, which i want to get all fields, have more then 59 Fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here my Tree Coding:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  node-node_key = 'Root'.                                   
  CLEAR node-relatkey.      
  CLEAR node-relatship. 
  node-hidden = ' '.    
  node-disabled = ' '. 
  node-isfolder = 'X'.    
  CLEAR node-n_image.   
  CLEAR node-exp_image.
  CLEAR node-expander.  
  node-text = gf_database.
  APPEND node TO node_table.

  CLEAR gf_zaehler.
  CLEAR lf_fullzaehl.


  LOOP AT lt_fields INTO ls_fields.

    IF gf_zaehler EQ 10 OR gf_zaehler EQ 0.
      lf_fullzaehl = lf_fullzaehl + gf_zaehler.
      lf_zahltxt = lf_fullzaehl.
      CONCATENATE 'von' lf_zahltxt
             INTO lf_nodekeytxt
        SEPARATED BY space.

      CLEAR node.
      node-node_key = lf_nodekeytxt.                        
      node-relatkey = 'Root'.
      node-relatship = cl_gui_list_tree=&amp;gt;relat_last_child.
      node-isfolder = 'X'.
      node-text = lf_nodekeytxt.
      APPEND node TO node_table.

      CLEAR gf_zaehler.
    ENDIF.


    CLEAR node.
    node-node_key = ls_fields-fieldname.                    
    node-relatkey = lf_nodekeytxt.
    node-relatship = cl_gui_simple_tree=&amp;gt;relat_last_child.
    node-hidden = ' '.
    node-disabled = ' '.
    node-isfolder = ' '.
    CLEAR node-n_image.
    CLEAR node-exp_image.
    node-expander = ' '.
    node-text = ls_fields-fieldname.
    APPEND node TO node_table.

    gf_zaehler = gf_zaehler + 1.

  ENDLOOP.

  CALL METHOD g_tree-&amp;gt;add_nodes
    EXPORTING
      table_structure_name           = 'MTREESNODE'
      node_table                     = node_table
    EXCEPTIONS
      failed                         = 1
      error_in_node_table            = 2
      dp_error                       = 3
      table_structure_name_not_found = 4
      OTHERS                         = 5.
  IF sy-subrc &amp;lt;&amp;gt; 0.
    MESSAGE a999.
  ENDIF.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What can i do???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thx 4 help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sincerely yours&lt;/P&gt;&lt;P&gt;Markus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Apr 2007 16:31:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/simple-tree-problem/m-p/2133866#M448744</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-19T16:31:38Z</dc:date>
    </item>
    <item>
      <title>Re: Simple Tree Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/simple-tree-problem/m-p/2133867#M448745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Markus&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I understand neither the reason for the dump nor your SELECT statement. If you want to read metadata of tables then you should use function module &amp;lt;b&amp;gt;DDIF_FIELDINFO_GET&amp;lt;/b&amp;gt; (set IMPORTING parameter ALL_TYPES = 'X').&lt;/P&gt;&lt;P&gt;Alternatively, you could use function module &amp;lt;b&amp;gt;LVC_FIELDCATALOG_MERGE&amp;lt;/b&amp;gt;. By default this function module does not return the client field (I_CLIENT_NEVER_DISPLAY = 'X').&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Apr 2007 20:47:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/simple-tree-problem/m-p/2133867#M448745</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2007-04-19T20:47:58Z</dc:date>
    </item>
    <item>
      <title>Re: Simple Tree Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/simple-tree-problem/m-p/2133868#M448746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Uwe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;maybe its not the finest way, but the SELECT statement works fine. I get all fieldnames.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a second Report, a little bit different from the one i spoken in my first posting. There i get the Tree with all Fields, and i used the same SELECT statement. But the tree dosent looks fine, because all 'fieldnames' are root childs....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i can post it tomorrow. but i mean the select is not the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Markus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Apr 2007 21:17:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/simple-tree-problem/m-p/2133868#M448746</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-19T21:17:44Z</dc:date>
    </item>
    <item>
      <title>Re: Simple Tree Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/simple-tree-problem/m-p/2133869#M448747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Today i want to post the second program, but now this one dont work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here the code:&lt;/P&gt;&lt;P&gt;Today i cant use 3 of the result-fieldnames. This coding runs in a dump.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FORM build_node_and_item_table.

  DATA:
        ls_fields          TYPE                   rsdsfields,
        lt_fields          TYPE STANDARD TABLE OF rsdsfields,

        lf_nodekeytxt(12)  TYPE c,

        lf_zaehler         TYPE int4,
        lf_zahltxt(3)      TYPE c,
        lf_fullzaehl       TYPE int4,
        lf_feldname(20)    TYPE c.




  ls_fields-tablename = gf_database.

  SELECT fieldname FROM dd03l INTO ls_fields-fieldname
      WHERE tabname  = gf_database
        AND as4local = 'A'
        AND as4vers  = 0
        AND position &amp;lt; 3
        AND datatype &amp;lt;&amp;gt; 'CLNT'.
    APPEND ls_fields TO lt_fields.
  ENDSELECT.


  nodekey = 1.



*-- Node with key 'Root'
  CLEAR node.
  node-node_key  = 'Root'.
  node-hidden    = ' '.
  node-disabled  = ' '.
  node-isfolder  = 'X'.
  APPEND node TO node_table.

*-- Item to key 'Root'
  CLEAR item.
  item-node_key  = 'Root'.
  item-item_name = '1'.
  item-class     = cl_gui_list_tree=&amp;gt;item_class_text.
  item-alignment = cl_gui_list_tree=&amp;gt;align_auto.
  item-font      = cl_gui_list_tree=&amp;gt;item_font_prop.
  item-text      = gf_database.
  APPEND item TO item_table.


  CLEAR lf_zaehler.
  CLEAR lf_fullzaehl.


  LOOP AT lt_fields INTO ls_fields.

    lf_feldname = ls_fields-fieldname.

    IF lf_zaehler EQ 10 OR lf_zaehler EQ 0.
*-- Verzeichnis "von XX" erstellen
      lf_fullzaehl = lf_fullzaehl + lf_zaehler.
      lf_zahltxt = lf_fullzaehl.
      CONCATENATE 'von' lf_zahltxt
       INTO lf_nodekeytxt
  SEPARATED BY space.

      CLEAR node.
      ADD 1 TO nodekey.
      node-node_key   = lf_nodekeytxt.
      nodekeyx        = nodekey.
      node-relatkey   = 'Root'.
      node-relatship  = cl_gui_list_tree=&amp;gt;relat_last_child.
      node-dragdropid = handle_drop.
      node-hidden     = ' '.
      node-disabled   = ' '.
      node-isfolder   = 'X'.
      APPEND node TO node_table.

*-- Item zum Verzeichnis
      CLEAR item.
      item-node_key  = node-node_key.
      item-item_name = nodekeyx.
      item-class     = cl_gui_list_tree=&amp;gt;item_class_text.
      item-alignment = cl_gui_list_tree=&amp;gt;align_auto.
      item-font      = cl_gui_list_tree=&amp;gt;item_font_prop.
      item-text      = lf_nodekeytxt.
      APPEND item TO item_table.

      CLEAR lf_zaehler.
    ENDIF.


*-- Nun die Felder anhängen und dem jeweiligen Verzeichnis zuordnen
    CLEAR node.
*    ADD 1 TO nodekey.
    node-node_key   = lf_feldname.
    node-relatkey   = nodekeyx.
    node-relatship  = cl_gui_list_tree=&amp;gt;relat_last_child.
    node-dragdropid = handle_drag.
    node-hidden     = ' '.
    node-disabled   = ' '.
    node-isfolder   = ' '.
    APPEND node TO node_table.

*-- Item "Land"
    CLEAR item.
    item-node_key  = node-node_key.
    item-item_name = '1'.
    item-style     = cl_gui_list_tree=&amp;gt;style_intensified.
    item-class     = cl_gui_list_tree=&amp;gt;item_class_text.
    item-alignment = cl_gui_list_tree=&amp;gt;align_auto.
    item-font      = cl_gui_list_tree=&amp;gt;item_font_fixed.
    item-text      = lf_feldname.
    APPEND item TO item_table.

    lf_zaehler = lf_zaehler + 1.

  ENDLOOP.

ENDFORM.                    "build_node_and_item_table&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and the Dump:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Runtime errors         MESSAGE_TYPE_X                                    
       Occurred on     20.04.2007 at   09:12:54                                                                                
The current application triggered a termination with a short dump.                                                                                
What happened?                                                                                
The current application program detected a situation which really        
should not occur. Therefore, a termination with a short dump was         
triggered on purpose by the key word MESSAGE (type X).                                                                                
What can you do?                                                                                
Print out the error message (using the "Print" function)                 
and make a note of the actions and input that caused the                 
error.                                                                                
To resolve the problem, contact your SAP system administrator.           
You can use transaction ST22 (ABAP Dump Analysis) to view and administer 
 termination messages, especially those beyond their normal deletion     
date.                                                                                
Error analysis                                                                                
Short text of error message:                                             
Control Framework : Error processing control                                                                                
Technical information about the message:                                 
 Diagnosis                                                               
     An error occurred when the system tried to process the commands     
     from the Automation Queue on the presentation server.               
     There are several possible reasons for this:                        
     - The installation of the SAP GUI on the presentation server is     
     faulty or obsolete.                                                 
     - There is an error in the application program                      
     - There is an error in the SAPGUI or an integrated control  
.
.
.
.
       &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the problem???&lt;/P&gt;&lt;P&gt;I´m helpless ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Markus&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Apr 2007 07:16:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/simple-tree-problem/m-p/2133869#M448747</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-20T07:16:16Z</dc:date>
    </item>
    <item>
      <title>Re: Simple Tree Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/simple-tree-problem/m-p/2133870#M448748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I found one mistake in the second coding.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*-- Nun die Felder anhängen und dem jeweiligen Verzeichnis zuordnen
    CLEAR node.
*    ADD 1 TO nodekey.
    node-node_key   = lf_feldname.
    node-relatkey   = lf_nodekeytxt.
    node-relatship  = cl_gui_list_tree=&amp;gt;relat_last_child.
    node-dragdropid = handle_drag.
    node-hidden     = ' '.
    node-disabled   = ' '.
    node-isfolder   = ' '.
    APPEND node TO node_table.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wrong relatkey. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And i found the point, when the Dump activated.&lt;/P&gt;&lt;P&gt;At the moment when the Method "cl_gui_cfw=&amp;gt;flush" is triggered.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help?&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Markus Wendel&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Apr 2007 07:38:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/simple-tree-problem/m-p/2133870#M448748</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-20T07:38:59Z</dc:date>
    </item>
  </channel>
</rss>

