Skip to Content

Traffic signals display

Hi All,

I want to display traffic signals in ALV report.

My Out put table displays aroud 15 Columns in which I need to display in 8th and 12 th column of Traffic Signals.

Would appreciate if anyone helps me in giving sample program which any one has done in displaying traffic signals in two columns in ouput display.

Thanks in Advance...

Regards,

Chandra.....

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Posted on Nov 25, 2007 at 03:48 PM

    Hi Chandra,

    refer program BCALV_GRID_04

    as well as go through below links..

    regarding-displaying-trafic-light-on-one-column-of

    trafic-lights

    i-am-displaying-status-traffic-signal--in-output-s

    Hope it will solve ur problem

    <b>Reward points if useful...</b>

    Thanks & Regards

    ilesh 24x7

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 25, 2007 at 03:54 PM

    Hi Chandra,

    Check this link

    traffic-light-in-alv

    Regards,

    Satish

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 25, 2007 at 08:02 PM

    Hi,

    Check the below links.

    How to provide signal lights in ALV output

    traffic-light-in-alv

    Regards,

    Maha

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 26, 2007 at 04:06 AM

    Hi,

    Go through this report. U will get the idea about the traffic signal display.

    REPORT YMS_COLOURALV NO STANDARD PAGE HEADING.

    TYPE-POOLS: SLIS, ICON.

    DATA: FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.

    DATA: BEGIN OF IMARA OCCURS 0,

    LIGHT(4) TYPE C,

    MATNR TYPE MARA-MATNR,

    MTART TYPE MARA-MTART,

    MAKTX TYPE MAKT-MAKTX,

    COLOR_LINE(4) TYPE C,

    TCOLOR TYPE SLIS_T_SPECIALCOL_ALV, "cell

    END OF IMARA.

    DATA: XCOLOR TYPE SLIS_SPECIALCOL_ALV.

    START-OF-SELECTION.

    PERFORM GET_DATA.

    PERFORM WRITE_REPORT.

    ************************************************************************

    • Get_Data

    ************************************************************************

    FORM GET_DATA.

    WRITE ICON_GREEN_LIGHT AS ICON TO IMARA-LIGHT.

    IMARA-MATNR = 'ABC'.

    IMARA-MTART = 'ZCFG'.

    IMARA-MAKTX = 'This is description for ABC'.

    APPEND IMARA.

    WRITE ICON_YELLOW_LIGHT AS ICON TO IMARA-LIGHT.

    IMARA-MATNR = 'DEF'.

    IMARA-MTART = 'ZCFG'.

    IMARA-MAKTX = 'This is description for DEF'.

    APPEND IMARA.

    WRITE ICON_RED_LIGHT AS ICON TO IMARA-LIGHT.

    IMARA-MATNR = 'GHI'.

    IMARA-MTART = 'ZCFG'.

    IMARA-MAKTX = 'This is description for GHI'.

    APPEND IMARA.

    LOOP AT IMARA.

    IF SY-TABIX = 1.

    IMARA-COLOR_LINE = 'C410'. " color line

    ENDIF.

    IF SY-TABIX = 2. " color CELL

    CLEAR XCOLOR.

    XCOLOR-FIELDNAME = 'MTART'.

    XCOLOR-COLOR-COL = '3'.

    XCOLOR-COLOR-INT = '1'. " Intensified on/off

    XCOLOR-COLOR-INV = '0'.

    APPEND XCOLOR TO IMARA-TCOLOR.

    ENDIF.

    MODIFY IMARA.

    ENDLOOP.

    ENDFORM. "get_data

    ************************************************************************

    • WRITE_REPORT

    ************************************************************************

    FORM WRITE_REPORT.

    DATA: LAYOUT TYPE SLIS_LAYOUT_ALV.

    LAYOUT-COLTAB_FIELDNAME = 'TCOLOR'.

    LAYOUT-INFO_FIELDNAME = 'COLOR_LINE'.

    PERFORM BUILD_FIELD_CATALOG.

    • CALL ABAP LIST VIEWER (ALV)

    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

    EXPORTING

    IS_LAYOUT = LAYOUT

    IT_FIELDCAT = FIELDCAT

    TABLES

    T_OUTTAB = IMARA.

    ENDFORM. "write_report

    ************************************************************************

    • BUILD_FIELD_CATALOG

    ************************************************************************

    FORM BUILD_FIELD_CATALOG.

    DATA: FC_TMP TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE.

    CLEAR: FIELDCAT. REFRESH: FIELDCAT.

    CLEAR: FC_TMP.

    FC_TMP-REPTEXT_DDIC = 'Status'.

    FC_TMP-FIELDNAME = 'LIGHT'.

    FC_TMP-TABNAME = 'IMARA'.

    FC_TMP-OUTPUTLEN = '4'.

    FC_TMP-ICON = 'X'.

    APPEND FC_TMP TO FIELDCAT.

    CLEAR: FC_TMP.

    FC_TMP-REPTEXT_DDIC = 'Material Number'.

    FC_TMP-FIELDNAME = 'MATNR'.

    FC_TMP-TABNAME = 'IMARA'.

    FC_TMP-OUTPUTLEN = '18'.

    APPEND FC_TMP TO FIELDCAT.

    CLEAR: FC_TMP.

    FC_TMP-REPTEXT_DDIC = 'Material Type'.

    FC_TMP-FIELDNAME = 'MTART'.

    FC_TMP-TABNAME = 'IMARA'.

    FC_TMP-OUTPUTLEN = '10'.

    APPEND FC_TMP TO FIELDCAT.

    CLEAR: FC_TMP.

    FC_TMP-REPTEXT_DDIC = 'Material'.

    FC_TMP-FIELDNAME = 'MAKTX'.

    FC_TMP-TABNAME = 'IMARA'.

    FC_TMP-OUTPUTLEN = '40'.

    FC_TMP-EMPHASIZE = 'C610'. " color column

    APPEND FC_TMP TO FIELDCAT.

    ENDFORM. "build_field_catalog

    Thanks,

    Sankar M

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.