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: 

ALV column headers in colour

Former Member
0 Kudos

Hi

1. In my alv report, column headers should be coloured dark blue, how can I get it.

2. If list contains drill-down capabilities to take the user to a new transaction, such as in the case of document displays, the key field should be displayed as a hot-spot in each line of the list..

Thank you

Rajesh

2 REPLIES 2

Former Member
0 Kudos

Hi Rajesh,

I can help you with point 2).

+ To display a field as a hotspot, you have to modify the fieldcatalogue and set the HOTSPOT option to 'X'.

+ On clicking this cell, an event HOTSPOT_CLICK is fired. So you need to create a class that handles this event.

+ Have a look at the sample program BCALV_TEST_GRID_EVENTS in package SLIS to see it work.

A nice reference which explains some of these points in more details can be found here:https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/an easy reference for alv grid control.pdf

Hope this helps (please reward me if it does ,

Joerg

Former Member
0 Kudos

Hi,

For

1) FORM set_grid_field_catalog CHANGING p_i_grid_fcat

TYPE lvc_t_fcat.

DATA ls_fcat TYPE lvc_s_fcat.

CLEAR ls_fcat.

ls_fcat-fieldname = 'VKBEZ'.

ls_fcat-ref_table = 'FKKVKP'.

ls_fcat-ref_field = 'VKBEZ'.

ls_fcat-coltext = text-001."Contract Account Name

ls_fcat-seltext = text-001.

<b>ls_fcat-EMPHASIZE = 'c310'. Check the color</b>

APPEND ls_fcat TO p_i_grid_fcat.

define all the columns as per ur specification

endform

2) For Hotspot

if ls_fcat-fieldname = 'MATNR'.

ls_fcat-hotspot = 'X'.

endif

Hope this helps u.

Regards,

Judith