Application Development 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: 

how to display symbol in ALV ..

Former Member
0 Kudos
129

hey guys,

I have a field for SYmbol in my report(alv list)

but the rproblem is ,in output the symbol doesnt appear..but the characters in it ..@5b.... (instead of the red light i am looking for)

how to correct it?

1 ACCEPTED SOLUTION

glio_ad
Active Participant
0 Kudos
97

Hi.

Try this:

INCLUDE <ICON>.

data: begin of itab occurs 0,

my_icon(5),

vbeln like vbak-vbeln,

end of itab.

write icon_okay to itab-my_icon as icon.

append itab.

Now, pass itab to the ALV and you should see the icon correctly on its output.

Reward points if it helps.

Regards,

George

2 REPLIES 2

glio_ad
Active Participant
0 Kudos
98

Hi.

Try this:

INCLUDE <ICON>.

data: begin of itab occurs 0,

my_icon(5),

vbeln like vbak-vbeln,

end of itab.

write icon_okay to itab-my_icon as icon.

append itab.

Now, pass itab to the ALV and you should see the icon correctly on its output.

Reward points if it helps.

Regards,

George

Former Member
0 Kudos
97

hi,

Here I am giving sample code.

REPORT ALV_LIGHTS.

TYPES: BEGIN OF ty_alv,

lights(1) TYPE c, "Exception, Holding the value of the lights

text(20) TYPE c, "some text

END OF ty_alv.DATA: gs_alv TYPE ty_alv,

gt_alv TYPE TABLE OF ty_alv,

gr_alv TYPE REF TO cl_salv_table,

gr_columns TYPE REF TO cl_salv_columns_table.

START-OF-SELECTION.

gs_alv-lights = '1'. "Color red

gs_alv-text = 'RED SIGNAL'.

APPEND gs_alv TO gt_alv. gs_alv-lights = '2'. "Color yellow

gs_alv-text = 'YELLOW SIGNAL'.

APPEND gs_alv TO gt_alv. gs_alv-lights = '3'. "Color green

gs_alv-text = 'GREEN SIGNAL'.

APPEND gs_alv TO gt_alv.

CALL METHOD cl_salv_table=>factory

IMPORTING

r_salv_table = gr_alv

CHANGING

t_table = gt_alv. gr_columns = gr_alv->get_columns( ).

gr_columns->set_exception_column( value = 'LIGHTS' ).

CALL METHOD gr_alv->display.

Regards

Sandeep Reddy