Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Error message in cl_gui_column_tree

Former Member
0 Likes
411

Hi all,

I'm trying to create a program (module pool) that should display a column tree. Some nodes has a context menu. What I need is to output an error message if the user click on a context menu choice that is not yet implemented.

Here is the code I'm using:

CLASS lcl_application DEFINITION.

  PUBLIC SECTION.
    METHODS:
      handle_ctx_menu_req
        FOR EVENT node_context_menu_request
        OF cl_gui_column_tree
        IMPORTING node_key
                  menu,

      handle_ctx_menu_sel
        FOR EVENT node_context_menu_select
        OF cl_gui_column_tree
        IMPORTING node_key
                  fcode.

ENDCLASS.

CLASS lcl_application IMPLEMENTATION.

  METHOD handle_ctx_menu_req.
  ...
  ENDMETHOD.

  METHOD handle_ctx_menu_sel.
    CASE fcode.
      WHEN co_display.
      ...
      WHEN co_edit.
        MESSAGE e049.
      WHEN OTHERS.
    ENDCASE.
  ENDMETHOD.

ENDCLASS.

The problem is that this code stops the application and put the user to the initial menu while what I want is to stay on the tree screen.

Help me please!

Stefano

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
390

hi,

try to use an other message type, e.g. type 'I' :

MESSAGE 'Function not implemented' TYPE 'I'.

hope this helps, regards

olaf

3 REPLIES 3
Read only

Former Member
0 Likes
391

hi,

try to use an other message type, e.g. type 'I' :

MESSAGE 'Function not implemented' TYPE 'I'.

hope this helps, regards

olaf

Read only

0 Likes
390

Hi Olaf,

of course it helps but the result is not exactly the same. I'd like to produce a "real" error message.

Thanks,

Stefano

Read only

0 Likes
390

hi,

perhaps this helps:

MESSAGE node_key TYPE 'S' display like 'E'. " display in "command line"

or

MESSAGE node_key TYPE 'I' display like 'E'. " display in popup

moreover perhaps the F1 Doku for "message" helps ?

regards

olaf