cancel
Showing results for 
Search instead for 
Did you mean: 

AVL - traffic Light

Former Member
0 Kudos

Someone have documentation about the icon 'traffic light' in the ALV?

thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi mpm,

1. Its simple

2. We have to use the layout of alv also.

and one extra field in the internal table.

3. Just copy paste in new program.

REPORT abc.

TYPE-POOLS : slis.

DATA : alvly TYPE slis_layout_alv.

DATA : alvfc TYPE slis_t_fieldcat_alv.

DATA : BEGIN OF itab OCCURS 0,

lt TYPE i,

matnr LIKE mara-matnr,

END OF itab.

END-OF-SELECTION.

itab-lt = 1.

APPEND itab.

itab-lt = 2.

APPEND itab.

itab-lt = 3.

APPEND itab.

itab-lt = 1.

APPEND itab.

itab-lt = 3.

APPEND itab.

itab-lt = 3.

APPEND itab.

itab-lt = 3.

APPEND itab.

*----


alvly-lights_fieldname = 'LT'.

alvly-lights_tabname = 'ITAB'.

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

EXPORTING

i_program_name = sy-repid

i_internal_tabname = 'ITAB'

i_inclname = sy-repid

CHANGING

ct_fieldcat = alvfc.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = sy-repid

it_fieldcat = alvfc

is_layout = alvly

i_save = 'A'

TABLES

t_outtab = itab.

regards,

amit m.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Refer Std program - <b>BCALV_GRID_04</b>

Suggest you to Search in SDN with key - <b>traffic light</b>

Will get few more useful related Posts.

Also refer the links

http://www.sapfans.com/forums/viewtopic.php?t=79424

http://www.sapfans.com/forums/viewtopic.php?t=24512

Reward points if this Helps.

Manish

Message was edited by:

Manish Kumar

former_member1259992
Participant
0 Kudos

Hi!

Following on from Manish - you can also get some useful general info about icons (including a list of them) under the F1 help on the write statement (click on a WRITE statement in an abap and hit F1). Then click the AS ICON example link.

Traffic lights actually display as ICON_RED_LIGHT, ICON_YELLOW_LIGHT or ICON_GREEN_LIGHT - you just need to set the right one for your requirement and WRITE AS ICON (or the ALV equivalent).

Regards

Robin