11-07-2011 12:11 PM
I have defined two variables to create an ALV:
DATA: fieldcat TYPE slis_fieldcat_alv OCCURS 0 WITH HEADER LINE,
DATA: ls_fieldcat TYPE slis_fieldcat_alv.
I append each column I want to appear in the ALV.
Which option should I change in order to get a certain column underlined?
Thanks in advance.
11-07-2011 12:45 PM
if you give hotspot = 'X', the field will be underlined... It is actually used to make the list interactive and will trigger a user command, but if you don write the user command code for it, it will still show the underline.
11-07-2011 12:45 PM
if you give hotspot = 'X', the field will be underlined... It is actually used to make the list interactive and will trigger a user command, but if you don write the user command code for it, it will still show the underline.
11-07-2011 12:46 PM
Hi,
use below code to undeline the column value(font).
Setting the styles for the ALV grid control
using field-symbols
LOOP AT it_fcat ASSIGNING <wa_fcat>. *For Each and every line of the fieldcat
CASE sy-tabix.*Color Styles
*Background/Font/Group/positive/negative
WHEN '1'.
<wa_fcat>-style = alv_style_color_inv_positive.
WHEN '2'.
<wa_fcat>-style = alv_style_color_int_negative.
WHEN '3'.
<wa_fcat>-style = alv_style_align_left_bottom.*Style for Font Underlined/Bold and Italic are possible
WHEN '9'.
<wa_fcat>-style = alv_style_font_underlined.ENDLOOP.
Thanks,
Chandra
11-07-2011 12:50 PM
Much like who you maintain your field catalog, you can maintain a table of type slis_sortinfo_alv for the fields you wish to underline.
DATA: it_sort TYPE STANDARD TABLE OF slis_sortinfo_alv.
gs_sort TYPE slis_sortinfo_alv.
gs_sort-fieldname = field_to_be_underlined1.
gs_sort-group = 'UL'.
APPEND gs_sort TO it_sort.
You can then pass it_sort to the ALV output FM like you do with your fieldcat.
This will underline the fields without having the hyperlink like making a hotspot will do.
11-07-2011 12:50 PM