Skip to Content
author's profile photo Former Member
Former Member

why isn't any node being found as selected?

I typed in this code:

data: lt_selected_node type lvc_t_nkey.

CALL METHOD gc_alv_tree->get_selected_nodes


ct_selected_nodes = lt_selected_node.

and when I select a node, and press delete its supposed to recognize the selected node

However its returning null

Any help please?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Sep 23, 2009 at 08:01 AM


    Use this.

    declare a first field of your internal table i.e. you are passing to alv as cell type c.

    then in layout


    gs_layout-box_fieldname = 'SEL'.

    pass this layout to alv.

    then you are able to get exact row number.

    LOOP AT gt_gi INTO gs_gi WHERE sel = 'X'.

    gs_gi-sel = ' '.

    APPEND gs_gi TO gt_gi.

    CLEAR gs_gi.


    Use this in Interactive section even if you are doing simple ALV.


    lv_ref_grid TYPE REF TO cl_gui_alv_grid.

    CLEAR : gv_tcode.

    *-- to ensure that only new processed data is displayed

    IF lv_ref_grid IS INITIAL.



    e_grid = lv_ref_grid.


    IF NOT lv_ref_grid IS INITIAL.

    CALL METHOD lv_ref_grid->check_changed_data.


    THis will solve your problem.



    Edited by: vijay chavan on Sep 23, 2009 1:32 PM

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.