Skip to Content

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

How to leave screen pocessing in below code

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

Former Member
Former Member replied

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

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