It may also be required to display hotspots (similar to hyperlinks) for an entire column in the ALV display. Clicking a particular hotspot cell will take the user to another detail screen. In this recipe, we will add hotspot functionality to the PERNR
column.
We will see how a particular column may be made to appear as a hotspot. We will also add the necessary code that is needed to carry out the steps needed for the hotspot selection. Proceed as follows:
We get access to the
PERNR
column and call theset_cell_type
method for it. Then, we pass thehotspot
static constant attribute of theif_salv_c_cell_type
interface to it.Next, we define the class
myhotspot
. Within the class definition, we create a static public methodon_click_hotspot
that will be called when a hotspot cell is clicked. This imports the row and column pertaining to the selection.Within the implementation of this class, we read the row from the table
IT_PA0008
that the user has selected...