Skip to Content
avatar image
Former Member

Row Select in ALV

I have an alv that displays data from a few tables.

If I select a row from teh ALV, then the following screen should display some of the fields of the row along with additional information..

I understand that the ON_CLICK event should be used once the row is selected..However, I would appreciate it if someone gave me more info on the same..


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Oct 09, 2007 at 04:47 PM


    If you select a row in ALV the event asociated is "ON_LEAD_SELECT" . If you create a method asociated to this event, plz put this code in the method asociated:

    <i> DATA: lr_index TYPE REF TO if_salv_wd_table_lead_select,

    lv_line type SYTABIX.

    lr_index ?= r_param.

    MOVE lr_index->index TO lv_line.


    In the variable lv_line you will have the selected line of alv.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member


      Tray this:

      <i> DATA: lr_table TYPE REF TO cl_salv_wd_table_lead_select,

      lr_node TYPE REF TO if_wd_context_node,

      lv_field1 TYPE (field1 of your alv table ).

      lr_table ?= r_param.

      lr_node ?= wd_context->get_child_node( 'NODE_TABLE' ).

      CALL METHOD lr_node->get_attribute


      index = lr_table->IF_SALV_WD_TABLE_LEAD_SELECT~INDEX

      name = 'FIELD1'


      value = lv_field1.


      With this code, you will have the value of the field 1 of the selected row.