Application Development 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: 

How to leave screen pocessing in below code

Former Member
0 Kudos

Hi all,

I have alv tree, while adding node i get some input from user. so i have created a screen with two fields on continue i want to create a node based on the user entered values.



  METHOD handle_node_ctxt_menu_sel.
    CASE fcode.
      WHEN 'ADD_NODE'.
        CLEAR gs_node_lay.

*        CALL SCREEN 102 STARTING AT 10 5 ENDING AT 40 5.
        CALL SCREEN 102 STARTING AT 50 5 ENDING AT 100 8. " After the user enter value i want to return cursor to this add   " node method but at present the screen remains same. Cursor not leave to add node.

        CALL METHOD gcl_tree->add_node
          EXPORTING
            i_relat_node_key     = node_key
            i_relationship       = cl_gui_column_tree=>relat_last_child
*        IS_OUTTAB_LINE       =
            is_node_layout       = gs_node_lay
*        IT_ITEM_LAYOUT       =
            i_node_text          = gv_node_text
          IMPORTING
            e_new_node_key       = gv_new_key
          EXCEPTIONS
            relat_node_not_found = 1
            node_not_found       = 2
            OTHERS               = 3
                .
        BREAK-POINT.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
        CALL METHOD gcl_tree->frontend_update.
      WHEN 'ADD_CHILD'.
      WHEN OTHERS.
    ENDCASE.

  ENDMETHOD.                    "handle_NODE_CONTEXT_MENU_SELECTED

Edited by: Lisa Roy on Jun 15, 2011 5:59 AM

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Lisa,

After user enters value in Screen 102, lets say CONTINUE is pressed. In PAI for 102 for OK_CODE 'CONTINUE' use

SET SCREEN 0.
      LEAVE SCREEN.

Your processing will then start from CALL METHOD gcl_tree->add_node

Regards

Rajvansh

3 REPLIES 3

Former Member
0 Kudos

Hi Lisa,

After user enters value in Screen 102, lets say CONTINUE is pressed. In PAI for 102 for OK_CODE 'CONTINUE' use

SET SCREEN 0.
      LEAVE SCREEN.

Your processing will then start from CALL METHOD gcl_tree->add_node

Regards

Rajvansh

koolspy_ultimate
Active Contributor
0 Kudos

try the following

SET SCREEN 0.

LEAVE SCREEN.

0 Kudos

Hi,

In the place, you want to leave screen processing,

Place the code specified above. i.e.

SET SCREEN 0.

LEAVE SCREEN.

Which will take you to Parent screen i.e. the earlier screen.