Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to get key field value when clicked on any field in alv grid display?

0 Kudos

hey guys.. I have displayed a table with an custom field of "SHOW INVOICE" (this will act as a hyperlink column for every row) so when I click this hyperlink i want the key field value from field catelog.. SO far i know i'll get that perticular field value using slis-selfield-value but i dont want this value.. just the value of key field of that perticular row... please help me how can i get this.

3 REPLIES 3

FredericGirod
Active Contributor
0 Kudos

witch class did you use for the ALV grid ?

cdprasanna
Active Participant

Hi Prasad Supare,

In same structure you will get selected row index take that and read your alv table with index.

sriharsha_parayatham
Participant
0 Kudos

You have to create a handler method for the events(link_click) of alv.

and on click, this event will return the cell value and row selected.

a quick snippet if you are using salv.

on_click  FOR EVENT link_click OF cl_salv_events_table
             IMPORTING
               row            " gives row number
               column  .      " gives name of the column you selected.