2008 Oct 28 7:10 PM
Dear Freinds,
iam able to get the data in the ouput using
REUSE_ALV_GRID_DISPLAY , as per the requiremnt i want to display the first column of the record if success Green color light and failed records display in the first column a Red .
Could any one let me know please how i can give the traffic lights in the ALV .
Thanks & regards
Srinivas.
2008 Oct 28 7:16 PM
Hi,
To display icons in ALV is as follow...
Define a field in the internal table LIKE ICON-ID, not char(4). For example...
DATA: BEGIN OF ITAB...
icon_field LIKE ICON-ID,
...
END OF ITAB.
Then fill the field icon, for example...
itab-icon_field = @0A@ "Red light
Preparing the fieldcatalog...
wa_fieldcat-tabname = 'ITAB'.
wa_fieldcat-fieldname = 'ICON_FIELD'.
wa_fieldcat-icon = 'X'.
There is another way to display icons, but is only for lights...
icon_field(1) TYPE C.
itab-icon_field = '1'. "Red
itab-icon_field = '2'. "Yellow
itab-icon_field = '3'. "Green
wa_layout-lights_tabname = 'ITAB'.
wa_layout-lights_fieldname = 'ICON_FIELD'.
regards,
Advait
2008 Oct 28 7:15 PM
2008 Oct 28 7:16 PM
Hi,
To display icons in ALV is as follow...
Define a field in the internal table LIKE ICON-ID, not char(4). For example...
DATA: BEGIN OF ITAB...
icon_field LIKE ICON-ID,
...
END OF ITAB.
Then fill the field icon, for example...
itab-icon_field = @0A@ "Red light
Preparing the fieldcatalog...
wa_fieldcat-tabname = 'ITAB'.
wa_fieldcat-fieldname = 'ICON_FIELD'.
wa_fieldcat-icon = 'X'.
There is another way to display icons, but is only for lights...
icon_field(1) TYPE C.
itab-icon_field = '1'. "Red
itab-icon_field = '2'. "Yellow
itab-icon_field = '3'. "Green
wa_layout-lights_tabname = 'ITAB'.
wa_layout-lights_fieldname = 'ICON_FIELD'.
regards,
Advait