‎2008 Apr 15 2:40 PM
Hi experts,
I have used ALV report tree for a program. Now i want to perform some action for any node / any column of node selected .
May i know which system field i should use for getting current record selected.
Thanks,
Akash
‎2008 Apr 15 4:34 PM
there is no system field for this, but there are methods within the alv tree class which should help you. I don't have a system at hand right now, so I can't give you the exact name of the method.
‎2008 Apr 16 3:01 PM
Hi Experts,
Can anybody help me in finding the method of class CL_GUI_ALV_TREE by which i can capture selected node data ?
Thanks,
Akash
‎2008 Apr 16 3:05 PM
‎2008 Apr 16 3:06 PM
If you want for item then use
GET_SELECTED_ITEM
for Node use
GET_SELECTED_NODES
‎2008 Apr 16 3:16 PM
I used this in the DOUBLE_CLICK Method
METHOD handle_item_double_click.
" this method handles the item double click event of the tree
" control instance
" show the key of the node and the name of the item
" of the double clicked item in a dynpro field
g_event = 'ITEM_DOUBLE_CLICK'.
g_node_key = node_key.
g_item_name = item_name.
READ TABLE item_table INTO item
WITH KEY node_key = g_node_key
item_name = 'Column3'.
IF sy-subrc = 0.
g_item_text = item-text.
IF NOT g_item_text IS INITIAL.
data: tcode type TSTC-TCODE.
tcode = g_item_text.
CALL FUNCTION 'AUTHORITY_CHECK_TCODE'
EXPORTING
tcode = tcode
EXCEPTIONS
ok = 1
not_ok = 2
OTHERS = 3.
IF sy-subrc <> 1.
MESSAGE E208(00)
WITH 'You are not authorized to use this transaction'.
ELSE.
CALL TRANSACTION g_item_text.
ENDIF.
ENDIF.
ENDIF.
CLEAR g_header_name.
ENDMETHOD.
‎2008 Apr 16 3:18 PM
Hi Yash,
I have tried with get_selected_nodes but it returns some numeric value however i want to capture data of selected record. Please suggest
Thanks,
Akash
‎2008 Apr 17 7:57 AM
Hi all,
Can anybody suggest which method of class CL_GUI_ALV_TREE i can use to capture data of selected record of ALV report Tree ?
If get_selected_item method can be used then please let me know how to use that method and which parameters are essential.
Thanks,
Akash
‎2010 Jun 19 1:04 PM