06-16-2017 3:58 PM
Hello Experts,
im having a problem i have a alv created by CALL METHOD cl_salv_table=>factory,
and now i want to join a field with ICON by status.
like this:
‘ ’ – yellow icon_led_yellow
‘E ’ – red icon_led_red
‘S’ – green icon_led_green
‘A’ – inactive - icon_led_inactive
IF the status is E will appear icon green and say process procede. etc...
How can i add this no my alv.
Regards
06-16-2017 5:17 PM
You need to populate a column with the icon IDs, 'ICON_LED_...' etc.
Then set it to display it's contents as icons:
alv->get_columns( )->get_column( 'STATUS_ICON' )->set_icon( abap_true ).
06-16-2017 5:27 PM
06-16-2017 10:54 PM
Your data table needs an additional column before you create the ALV. So if your field is called STATUS, add another column STATUS_ICON (you can call it anything). Then loop through and fill it with the icon names according to the status.
Now create ALV as you have done. Give it a quick test to see your icon column is correctly filled, and then set the icon column to be displayed as icons as I explained above.