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: 

Making only some records of a column as hotspot

former_member215563
Active Participant
0 Kudos

Hi All,

For making all the rows of a column as hotspot  in ALV , we  select the field catalogue attribute hotspot = 'X'

However in my requirement I want some of the records in 1 column as hotspot and the other without hotspot .

How can we achieve this???

Thanks,

Faiz


4 REPLIES 4

Former Member
0 Kudos

Hi,

Which one your using reuse_alv_grid_display or OO ALV?

Thanks,

Ashok.

naveenvishal
Contributor
0 Kudos

Hi Faizur,

What you can do is at the time of handling the hotspot clicks, skip (do nothing) the records which you don't want to navigate for. i.e. in User Command where you handle the navigation, exclude based on condition over there.

Hope that helps.

Regards,

Naveen

Former Member
0 Kudos

Hi faizur,

Set the hotspot = 'X' in the field catalog for that particular field and assuming that you are using OOPS-ALV, use 'hotspot_click' event to write the logic just as mentioned by Naveen.

former_member302911
Active Participant
0 Kudos

Hi Faizur,

If you use CL_GUI_ALV_GRID or REUSE_ALV_GRID_DISPLAY_LVC you can manage single cells styles.

To do this you need to add a type table for Styles in your ALV structure:


TYPES: BEGIN OF t_st_alv,

                ...

                styletab             TYPE lvc_t_styl,

             END OF t_st_alv.

Define Layout with the name of Style Field:


gst_layout-stylefname = 'STYLETAB'.

Add style to desidered cell:


         DATA:                   lst_styletab TYPE lvc_s_styl,

         FIELD-SYMBOLS: <fs_st_alv>  TYPE t_st_alv.

LOOP AT gtb_alv ASSIGNING <fs_st_alv>.

   IF...

    

         lst_styletab-fieldname = "FieldName where you want to set Style".

         lst_styletab-style        = cl_gui_alv_grid=>mc_style_hotspot. "Hotspot Style

         INSERT lst_celltab  INTO TABLE <fs_st_alv>-styletab.


   ENDIF.

ENDLOOP.

Regards,

Angelo.