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 Lights

Former Member
0 Likes
568

Hi,

I have one ALV with one field with trafic lights. i want to know if there is anyway of the user set the parameters for the lights. like when we do a colective entry on the transaction MD04 the screen that shows up have some traffic lights and in the toolbar has a button to control the traffic lights parameters.

3 REPLIES 3
Read only

naimesh_patel
Active Contributor
0 Likes
509

Hello,

You can also put some button on the toolbar and in your USER_COMMAND you can control the status of the lights.

In this form you will get the line number and based on the button clicked (red button, green ,yellow) you can set the status of the traffic light.

and then display your alv again by RS_SELFIELD-REFRESH = 'X'.

Regards,

naimesh

Read only

Former Member
0 Likes
509

Hi ,

Can you put some idea about this issue... Perhaps I can hep you about this...

regards,

Brijesh Patel

Read only

Former Member
0 Likes
509

Hi,

DATA: BEGIN OF T_ICON OCCURS 0,

ID LIKE ICON-ID,

TEXT LIKE T100-TEXT,

END OF T_ICON.

LOOP AT T_MESSAGE.

CALL FUNCTION 'FORMAT_MESSAGE'

EXPORTING

ID = T_MESSAGE-ID

LANG = 'E'

NO = T_MESSAGE-NUMBER

V1 = T_MESSAGE-MESSAGE_V1

V2 = T_MESSAGE-MESSAGE_V2

V3 = T_MESSAGE-MESSAGE_V3

V4 = T_MESSAGE-MESSAGE_V4

IMPORTING

MSG = T_ICON-TEXT.

IF T_MESSAGE-TYPE = 'E'.

T_ICON-ID = '@0A@'.

ENDIF.

IF T_MESSAGE-TYPE = 'S'.

T_ICON-ID = '@08@'.

ENDIF.

IF T_MESSAGE-TYPE = 'W'.

T_ICON-ID = '@09@'.

ENDIF.

IF T_MESSAGE-TYPE = 'I'.

T_ICON-ID = '@0S@'.

ENDIF.

APPEND T_ICON.

ENDLOOP.

CALL METHOD ALV->SET_TABLE_FOR_FIRST_DISPLAY

EXPORTING

I_BYPASSING_BUFFER = 'X'

IS_LAYOUT = GS_LAYOUT

CHANGING

IT_OUTTAB = T_ICON[]

IT_FIELDCATALOG = FIELDCATTAB[].

Regards,

Seema.