Application Development and Automation 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: 
Read only

CL_SALV_TABLE - HOTSPOT Refresh

former_member747904
Discoverer
0 Likes
3,504

I have an ALV report that displays data and allows the user to select a line and perform an action. Within the report is an exception column to highlight the outcome of the action, currently the column is defined as a hotspot . If the action fails, I highlight the line with a colour and generate an error log to allow the user to view what occurred and any suggested remediation. The column hotspot and line colouring works fine no issues there. However I don't want to set the whole column as a hotspot I only want the entries that fail to contain a hotspot. I have attempted to enable the individual hotspots by adding a field of type salv_t_int4_column (cell field) in my output and nominated this field in the ALV setup using the set_cell_type_column method. In my check for failure method I update the ''cell field' with the if_salv_c_cell_type=>HOTSPOT value and exception column and performed the usual refresh but the hotspot option does not take effect. The line colouring takes effect but no hotspot, i've checked the content of the cell field column and the hotspot values are there. I have tried a FULL refresh but still no joy. Is it possible to enable the style options after the initial display?

4 REPLIES 4
Read only

Sandra_Rossi
Active Contributor
0 Likes
1,797

That should work. You have a bug in your program.

Read only

Sandra_Rossi
Active Contributor
0 Likes
1,797

Sorry, I tried and that doesn't work. See my answer.

Read only

Sandra_Rossi
Active Contributor
0 Likes
1,797

It's impossible to apply any style on an "exception" column, whatever you do it at the very first display or after refreshing.

Instead of defining the column of type "exception", I could successfully replace it as a normal text column (of 4 characters or more) with style button or hotspot, and this text contained a value like "@08@" which is rendered as green traffic light. It also works in refresh mode.

Here are the possible values:

  • Green light : @08@
  • Yellow light : @09@
  • Red light : @0A@
  • Light out; undefined : @EB@
Read only

1,797

An interesting one eh? Something 'so simple' as it were, thanks for your input much appreciated. Thought I was going mad 😉