cancel
Showing results for 
Search instead for 
Did you mean: 

3 Link to Actions in ALV with OnClick event

Former Member
0 Kudos

Dear all,

I am displaying ALV report with some columns, in this i have 3 link to actions for VBELN_GRP,VBELN,SERNR.

On clicking of these columns i am displaying data in anotehr 2 ALVs. for example.. VBELN i want to display data of that VBELN related info.. like that.

How to know which colum is clicked??I want to take that column value as input and i am getting data from tables.. But how to restrict this for clicking column

related information only wants to display in another ALV.

Please help.

Thank you.

Venkat.

Accepted Solutions (0)

Answers (5)

Answers (5)

former_member222068
Active Participant
0 Kudos

Hi Venkat,

Following code will help you to resolve the issue.

CASE r_param->column( attribute name ).


    WHEN 'ATTRIBUTE_NAME OF THE COLUMN'.

    WHEN 'ATTRIBUTE_NAME OF THE COLUMN'.

    WHEN 'ATTRIBUTE_NAME OF THE COLUMN'.

  ENDCASE.

Thanks & Regards,

Sankar Gelivi

Former Member
0 Kudos

Hi Venki,

When ever u created ON_CLICK_LINK EventHandler method .....DOuble click on that method in that method ucan find

Parameters like:

                           WDEVENT

                 and     R_PARAM   type IF_SALV_WD_TABLE_CLICK.

The above parametr type is IF_SALV_WD_TABLE_CLICK  .. If u  double click inthis interface u can find the attributes like

ATTRIBUTE Type STRING

COLUMN Type STRING

INDEX Type I

VALUE Type Ref To DATA

Using these Ucan Get the Values Selected and Column and Indexes also.....

Regards,

Venkat

Former Member
0 Kudos
chengalarayulu
Active Contributor
0 Kudos

Venky,

use the below code. Here r_param is the auto imported parameter for ON_CLICK event of ALV Component.

  CASE r_param->column.


    WHEN 'COLUMN1'.

    WHEN 'COLUMN2'.

    WHEN 'COLUMN3'.

  ENDCASE.

former_member223219
Participant
0 Kudos

Hi Chengalarayulu,


Thanks a lot for your answer man.

Kalpana

Former Member
0 Kudos

Hi Venkat,

While defining the onAction property of UI element LinkToAction check the checkbox "Trasfer UI Event Parameters" .Then in the event handler method so created you will have two more input parameters ID and CONTEXT_ELEMENT.

Use the following method :

    CALL METHOD context_element->get_static_attributes
    IMPORTING
      static_attributes = ls_attributes.

Give the structure of ls_attributes same as that of the row of the ALV. From that you will be able to find which row, which column was clicked.

Hope it helps.

Regards,

Sayan