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

modulepool icon creation

Former Member
0 Likes
1,251

HI All,

In my tabel control status field i need to display RED or GREEN icon based on the input..

i've got the value in internal, but in screen ICON is not coming.. it is showing as

"@0A\QRed light; stop; erro" please help me how to display the icon..

is there any setting as to be done in screen painter...

ICON should come in table control.....

Thanks and Regards

Suprith

1 ACCEPTED SOLUTION
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
1,200

Let me know what values you have passed into the cell ..

9 REPLIES 9
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
1,200

Please mark the column in table control as outputfield, the icon gets displayed only if its marked as output field.

Read only

0 Likes
1,200

Hi...

I've marked as Outfield only...

still its not coming

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
1,201

Let me know what values you have passed into the cell ..

Read only

0 Likes
1,200

data : status type icons-text,

data : status_icon TYPE icons-text,

icon_name(20) TYPE c.

READ TABLE it_check with key mblnr = it_mseg-mblnr.

if sy-subrc = 0.

icon_name = 'ICON_RED_LIGHT'.

CALL FUNCTION 'ICON_CREATE'

EXPORTING

name = icon_name

  • text = icon_text

  • info = 'Status'

add_stdinf = 'X'

IMPORTING

result = status_icon

EXCEPTIONS

icon_not_found = 1

outputfield_too_short = 2

OTHERS = 3.

it_mseg-status = status_icon.

else.

icon_name = 'ICON_GREEN_LIGHT'.

CALL FUNCTION 'ICON_CREATE'

EXPORTING

name = icon_name

  • text = icon_text

  • info = 'Status'

add_stdinf = 'X'

IMPORTING

result = status_icon

EXCEPTIONS

icon_not_found = 1

outputfield_too_short = 2

OTHERS = 3.

it_mseg-status = status_icon.

endif.

Read only

0 Likes
1,200

Just passing 'ICON_RED_LIGHT' or the other to it_mseg-status will do.

Why do you use ICON_CREATE .. i dont have any ideas reg this fm.

The problem might be somewhere in the usage of fm

Please read link:[Status Icons|http://help.sap.com/saphelp_46c/helpdata/en/59/348efa61c611d295750000e8353423/content.htm]

Edited by: Keshav.T on Jan 12, 2010 3:03 PM

Read only

0 Likes
1,200

Hi Suprith,

<<Sorry please ignore>>

Nag

Edited by: Naga Mohan Kummara on Jan 12, 2010 10:36 AM

Read only

0 Likes
1,200

Hi keshav...

you tell me any alternative way to create ICON...

i'm using table control... last field is the icon field... based on condition either it will be RED or GREEN

Read only

0 Likes
1,200

Just moving the value 'ICON_RED_LIGHT' to the internal table row would do.

In you program can you check passing 'ICON_RED_LIGHT' directly to the fm.

Read only

Former Member
0 Likes
1,200

In Screen painter i've made default lenght as 32... its working properly

Thanks NAG and Keshav