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

trafic light indicator in table control

Former Member
0 Likes
2,853

Hi All

Is it possible to put trafic ligth indicator against each record in table control. I need to display green, red and orange indicator depending upon the status of the record.

Thanks

Ravindra Suvarna

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,226

Hi Ravindra,

In your internal table you need to create a field and populate these values for the desired traffic light indicator.

@0A@ - Red light

@08@ - Green light

@09@ - Yellow light

Hope this helps.

Regards,

Sudheer

9 REPLIES 9
Read only

Former Member
0 Likes
2,226

Use another field in table control which will display ICON_GREEN_LIGHT/ICON_YELLOW_LIGHT/ICON_RED_LIGHT based on the condition. You need to set the relavant ICON.

Read only

0 Likes
2,226

I do this quite often. All you need to do is write it to the field.



type-pools: icon.

if condition.

write ICON_GREEN_LIGHT as ICON to itab-status.

endif.



Make sure that ITAB-STATUS is character field length 4.

Regards,

Rich HEilman

Read only

0 Likes
2,226

Hi Rich

Thanks for the details.

Which element type i should assign to status field in table control to display the trafic light indicator.

thanks

Ravindra Suvarna

Read only

Former Member
0 Likes
2,226

Try:


* Icons
TYPE-POOLS: icon.
DATA: balance_icon(132). 

call function 'ICON_CREATE'              
     exporting                           
          name   = icon_green_light      
          info   = 'OK Result'
     importing                           
          result = balance_icon.         

Rob

Read only

Former Member
0 Likes
2,227

Hi Ravindra,

In your internal table you need to create a field and populate these values for the desired traffic light indicator.

@0A@ - Red light

@08@ - Green light

@09@ - Yellow light

Hope this helps.

Regards,

Sudheer

Read only

0 Likes
2,226

Hi All

I want to display trafic light indicator against EACH RECORD IN TABLE CONTROL. TRAFIC LIGHT COLOR CAN BE RED, GREED OR ORANGE. please let me know the element type to be used in table control display this.

Please Advice.

Ravindra Suvarna

Read only

0 Likes
2,226

In the screen painter, use the "status icon" element in your table control. Its the last element on the left hand side with an "X" and check mark in it. Use this. Make sure that it is defined as char with a length of at less 4. That's it.

Regards,

Rich Heilman

Read only

0 Likes
2,226

Thank you very much rich. you have solved my problem.

Read only

0 Likes
2,226

Cool. Please remember to award points for helpful answers and mark this post as solved. THanks.

Regards,

Rich Heilman