RE: cl_gui_column_tree: editable item causes MESSAGE_TYPE_X dump

      Hello,

      I want to 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, with the exception of a not editable checkbox.

      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 sysubrc <> 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 sysubrc 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                  = texttck
             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 sysubrc 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_nodenode_key  = lv_node_key.
           ls_nodeisfolder  = abap_false.
           ls_noden_image   = icon_material.
           ls_nodeexp_image = icon_material.
           APPEND ls_node TO lt_nodes.


           CLEAR ls_itemtext.
           ls_itemclass     = cl_gui_column_tree=>item_class_checkbox.
           ls_itemnode_key  = ls_nodenode_key.
           ls_itemitem_name = gc_col_kms.
           ls_itemeditable  = ‘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 sysubrc <> 0.
             MESSAGE a000(tree_control_msg).
           ENDIF.

      When I comment out line “ls_itemeditable  = ‘X’.” the cl_gui_column_tree-Object is shown and no Dumps occurs.



      Message was edited by: Hubert Heitzer

      Hi, Hubert. Did you try to clear the whole ls_item before you add checkbox element? Maybe there is some conflict with previous parameters?

      User Rating: Be the first one !
      Add Comment
      1 Answers

        Hi, Hubert.

        Did you try to clear the whole ls_item before you add checkbox element? Maybe there is some conflict with previous parameters?

        Add Comment

        Your Answer

        By posting your answer, you agree to the privacy policy and terms of service.