Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

cl_gui_column_tree: editable item causes MESSAGE_TYPE_X dump

Hello,

I already started a discussion in "User Interface Development in ABAPUser Interface Development in ABAP" but I did not get an approach.

My problem occurrs, when I add some editable checkbox-items to a cl_gui_column_tree-object.

When I set the editable flag of the item (type MTREEITM) a MESSAGE_TYPE_X dump (Control Framework : Error processing control) is created.

When I do not set the editable flag everything works fine.

I compared my coding with demo programm SAPCOLUMN_TREE_CONTROL_DEMO but could not find any significant difference.


Also demo programm SAPCOLUMN_TREE_CONTROL_DEMO is running fine on my client.

This is the relevant part of my coding:

DATA:
   gr_container TYPE REF TO cl_gui_custom_container,
   gr_tree      TYPE REF TO cl_gui_column_tree,
   gr_event_rec TYPE REF TO lcl_event_receiver
.


...

    CREATE OBJECT gr_container
       EXPORTING
         container_name              = 'DATA_AREA'
       EXCEPTIONS
         cntl_error                  = 1
         cntl_system_error           = 2
         create_error                = 3
         lifetime_error              = 4
         lifetime_dynpro_dynpro_link = 5.
     IF sy-subrc <> 0.
       MESSAGE a000(tree_control_msg).
     ENDIF.

     CREATE OBJECT gr_tree
       EXPORTING
         parent                      = gr_container
         node_selection_mode         = cl_gui_column_tree=>node_sel_mode_single
         item_selection              = abap_true
         hierarchy_header            = ls_hierhead
         hierarchy_column_name       = gc_col_hierarchy
       EXCEPTIONS
         cntl_system_error           = 1
         create_error                = 2
         failed                      = 3
         illegal_node_selection_mode = 4
         illegal_column_name         = 5
         lifetime_error              = 6.
     IF NOT sy-subrc IS INITIAL.
       MESSAGE a000(tree_control_msg).
     ENDIF.


...


    CALL METHOD gr_tree->add_column
       EXPORTING
         name                         = gc_col_kms
         width                        = 11
         alignment                    = cl_gui_column_tree=>align_right
         header_text                  = text-tck
       EXCEPTIONS
         column_exists                = 1
         illegal_column_name          = 2
         too_many_columns             = 3
         illegal_alignment            = 4
         different_column_types       = 5
         cntl_system_error            = 6
         failed                       = 7
         predecessor_column_not_found = 8.
     IF NOT sy-subrc IS INITIAL.
       MESSAGE a000(tree_control_msg).
     ENDIF.


...


DATA:

  lt_nodes TYPE treev_ntab,
  lt_items TYPE srmitemtab, " linetype is MTREEITM

  ls_node  LIKE LINE OF lt_nodes,
  ls_item  LIKE LINE OF lt_items,

.


...


      ls_node-relatkey  = lv_last_nplnr_node.
     lv_node_key       = lv_node_key + 1.
     ls_node-node_key  = lv_node_key.
     ls_node-isfolder  = abap_false.
     ls_node-n_image   = icon_material.
     ls_node-exp_image = icon_material.
     APPEND ls_node TO lt_nodes.

...


     CLEAR ls_item-text.
     ls_item-class     = cl_gui_column_tree=>item_class_checkbox.
     ls_item-node_key  = ls_node-node_key.
     ls_item-item_name = gc_col_kms.
     ls_item-editable  = 'X'.
     APPEND ls_item TO lt_items.

...


     CALL METHOD gr_tree->add_nodes_and_items
       EXPORTING
         node_table                     = lt_nodes
         item_table                     = lt_items
         item_table_structure_name      = 'MTREEITM'
       EXCEPTIONS
         failed                         = 1
         cntl_system_error              = 3
         error_in_tables                = 4
         dp_error                       = 5
         table_structure_name_not_found = 6.
     IF sy-subrc <> 0.
       MESSAGE a000(tree_control_msg).
     ENDIF.

When I comment codeline "ls_item-editable  = 'X'." the cl_gui_column_tree-Object is shown and no Dumps occurs.


Regards,

Hubert

Not what you were looking for? View more on this topic or Ask a question