Kinder-Knoten nicht Sichtbar im ALV_TREE

Benutzeroberflächen in SAP Systemen.

Kinder-Knoten nicht Sichtbar im ALV_TREE

Postby Alexis1570 » Tue Apr 19, 2011 12:12 pm

Hallo Zusammen,

ich habe mir einen ALV-Tree (Klasse CL_GUI_ALV_TREE) gebaut. Dieser zeigt mir aber nur den Root-Knoten an. Die Kinder des Knoten werden nicht angezeigt.
Die Kinder-Knoten bekommen auch als relat_node_key den new_node_key des Root-Knoten.

Code: [Select all] [Expand/Collapse] [Download] (Untitled.txt)
  1. *--- Root-Knoten
  2.   CALL METHOD gr_tree->add_node
  3.     EXPORTING
  4.       i_relat_node_key     = lv_node_key
  5.       i_relationship       = cl_gui_column_tree=>relat_last_child
  6.       is_outtab_line       = ls_line
  7.       is_node_layout       = ls_node_layout
  8. *      it_item_layout       =
  9.       i_node_text          = lv_node_text
  10.     IMPORTING
  11.       e_new_node_key       = lv_root_key
  12.     EXCEPTIONS
  13.       relat_node_not_found = 1
  14.       node_not_found       = 2
  15.       OTHERS               = 3
  16.           .
  17.   IF sy-subrc <> 0.
  18. *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
  19. *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  20.   ENDIF.
  21.  
  22.  
  23.   LOOP AT lt_sel ASSIGNING <ls_sel>.
  24.  
  25.     CLEAR ls_node_layout.
  26.     CLEAR lv_node_text.
  27.  
  28. *--- Angezeigter Text
  29.     CONCATENATE <ls_sel>-key1    gc_nodekey_separator
  30.                            <ls_sel>-key2   gc_nodekey_separator
  31.                            <ls_sel>-key3
  32.            INTO lv_node_text
  33.            SEPARATED BY space.
  34.  
  35.     ls_node_layout-n_image    = '@EQ@'.
  36.     ls_node_layout-exp_image  = '@EQ@'.
  37.  
  38.     CALL METHOD gr_tree->add_node
  39.       EXPORTING
  40.         i_relat_node_key     = lv_root_key
  41.         i_relationship       = cl_gui_column_tree=>relat_last_child
  42.         is_outtab_line       = <ls_sel>
  43.         is_node_layout       = ls_node_layout
  44. *       it_item_layout       =
  45.         i_node_text          = lv_node_text
  46. *    IMPORTING
  47. *      e_new_node_key       =
  48.     EXCEPTIONS
  49.       relat_node_not_found = 1
  50.       node_not_found       = 2
  51.       others               = 3
  52.             .
  53.     IF sy-subrc <> 0.
  54. *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
  55. *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  56.     ENDIF.
  57.  
  58.  
  59. *--- Frontend aktualisieren.
  60.   CALL METHOD gr_tree->frontend_update.
  61.  
  62.  
GeSHi ©
Alexis1570
...
...
 
Posts: 102
Joined: Tue Jan 15, 2008 11:48 am

Return to Dialogprogrammierung

Who is online

Users browsing this forum: No registered users and 4 guests