Skip to Content
0
Former Member
Feb 24, 2011 at 01:04 PM

CL_SALV_TREE: How to read the value of a double-clicked field

736 Views

Hey Guys!

I have build a list with CL_SALV_TREE. When the user makes a DOUBLE CLICK in a especially field of a line I want to call a transaction with the field's value.

Can you please tell me how exactly I can get the value of the double-clicked field?

Reacting on the double-click-event is no problem (thanks to the sap-sample-codes), but I just don't know how to find the item-value having node-key and columname.

I got this far:

*---------------------------------------------------------------------*
*       CLASS lcl_handle_events DEFINITION
*---------------------------------------------------------------------*
*                                                                     *
*---------------------------------------------------------------------*
class lcl_handle_events definition.
  public section.
    methods:
      on_double_click for event double_click of cl_salv_events_tree
        importing node_key columnname.
endclass.                    "lcl_handle_events DEFINITION

*---------------------------------------------------------------------*
*       CLASS lcl_handle_events IMPLEMENTATION
*---------------------------------------------------------------------*

class lcl_handle_events implementation.
  method on_double_click.
*   selecting field's value
*   call transaction
    message i000(0k) with node_key columnname. 'just for test
endmethod.                    "on_double_click
endclass.                    "lcl_handle_events IMPLEMENTATION

I googled a lot and also searched in this forum and found some questions to a similar topic, but no solution to my problem.

Can you help me with some example-code?

Thank you very much!!!