Skip to Content

get values of multiple rows selected in ALV

Hi,

I am selecting multiple rows of tree items.

I am able to get single value using method.

CALL METHOD tree1->get_outtab_line
EXPORTING
i_node_key = node_key
IMPORTING
* E_OUTTAB_ =
e_node_text = lvc_value
e_outtab_line = e_outtab_line.

But i want all values of multiple rows.

Please guide.

Thanks,

Darshan

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Feb 15, 2017 at 02:48 PM

    got the solution

    implemented below logic

    CALL METHOD tree1->get_selected_nodes
    CHANGING
    ct_selected_nodes = lt_nkey.

    LOOP AT lt_nkey INTO lwa_nkey.
    CALL METHOD tree1->get_outtab_line
    EXPORTING
    i_node_key = lwa_nkey
    IMPORTING
    * E_OUTTAB_ =
    e_node_text = lvc_value
    e_outtab_line = e_outtab_line.
    ENDLOOP.

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 15, 2017 at 10:23 AM

    Hello,

    to get selected item or node you can use following methods:

    for Node use : GET_SELECTED_NODES

    for Item use: GET_SELECTED_ITEM

    thank you!!

    Add comment
    10|10000 characters needed characters exceeded

    • Hi thanks for reply,

      Yes i used these methods.

      These methods are useful for single node item and can only fetch field names, not field values.

      My requirement is to select all the item rows of tree and get item values available in an internal table at background.

      Thanks,

      Darshan