<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic ALV Grid Traffic control Example  program implemented with function modules in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-traffic-control-example-program-implemented-with-function-modules/m-p/1826080#M352459</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can any one please give me ALV Grid control traffic lights  example program implented using function modules instead of OOP ALV. It is very urgent, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Santosh Kumar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 Jan 2007 10:55:50 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-01-24T10:55:50Z</dc:date>
    <item>
      <title>ALV Grid Traffic control Example  program implemented with function modules</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-traffic-control-example-program-implemented-with-function-modules/m-p/1826080#M352459</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can any one please give me ALV Grid control traffic lights  example program implented using function modules instead of OOP ALV. It is very urgent, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Santosh Kumar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jan 2007 10:55:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-traffic-control-example-program-implemented-with-function-modules/m-p/1826080#M352459</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-24T10:55:50Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Grid Traffic control Example  program implemented with function modules</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-traffic-control-example-program-implemented-with-function-modules/m-p/1826081#M352460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;go thru this url:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.erpgenie.com/abap/controls/alvgrid.htm#Make%20an%20Exception%20field%20(%20=%20Traffic%20lights)" target="test_blank"&gt;http://www.erpgenie.com/abap/controls/alvgrid.htm#Make%20an%20Exception%20field%20(%20=%20Traffic%20lights)&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Shiva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jan 2007 11:06:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-traffic-control-example-program-implemented-with-function-modules/m-p/1826081#M352460</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-24T11:06:15Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Grid Traffic control Example  program implemented with function modules</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-traffic-control-example-program-implemented-with-function-modules/m-p/1826082#M352461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Santosh,&lt;/P&gt;&lt;P&gt;In your ALV table/structure define field 1 char like 'rob'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   define a single character column as a traffic light&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   '1' = red, '2' = yellow, 3 = 'Green'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;alv_layoutcat-lights_fieldname    = 'ROB'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_list_data-rob = 1.&lt;/P&gt;&lt;P&gt;APPEND it_list_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_list_data-rob = 2.&lt;/P&gt;&lt;P&gt;APPEND it_list_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_list_data-rob = 3.&lt;/P&gt;&lt;P&gt;APPEND it_list_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ALF Function module something like this then&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Call ABAP/4 List Viewer&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            i_callback_program       = 'ZREPORT'&lt;/P&gt;&lt;P&gt;            is_layout                = alv_layoutcat&lt;/P&gt;&lt;P&gt;            it_fieldcat              = it_fieldcat&lt;/P&gt;&lt;P&gt;       TABLES&lt;/P&gt;&lt;P&gt;            t_outtab                 = it_list_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Marius&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jan 2007 11:09:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-traffic-control-example-program-implemented-with-function-modules/m-p/1826082#M352461</guid>
      <dc:creator>marius_greeff</dc:creator>
      <dc:date>2007-01-24T11:09:31Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Grid Traffic control Example  program implemented with function modules</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-traffic-control-example-program-implemented-with-function-modules/m-p/1826083#M352462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Santosh , &lt;/P&gt;&lt;P&gt;Here is a sampla code for the same&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TYPE-POOLS : SLIS.

DATA : BEGIN OF IT_1 OCCURS 0 ,
           MATNR TYPE matnr ,
           FLAG TYPE C ,  " added for the traffic control
       END OF IT_1.

SELECT MATNR INTO TABLE IT_1 " Select Data
UP TO 10 ROWS
FROM MARA.

DATA : CATALOG TYPE SLIS_T_FIELDCAT_ALV ,
       WA_CATALOG TYPE SLIS_FIELDCAT_ALV ,
       LAYOUT TYPE SLIS_LAYOUT_ALV .
*" create catalog
WA_CATALOG-FIELDNAME = 'FLAG'.
WA_CATALOG-TABNAME = 'IT_1'.
APPEND WA_CATALOG TO CATALOG.

WA_CATALOG-FIELDNAME = 'MATNR'.
WA_CATALOG-TABNAME = 'IT_1'.
APPEND WA_CATALOG TO CATALOG.
DATA : FLAG_T TYPE I.
*"assign value to traffic signal 
LOOP AT IT_1.
FLAG_T = SY-TABIX MOD 2.
IF FLAG_T = 0.
IT_1-FLAG = '1'.
ELSE.
IT_1-FLAG = '2'.
ENDIF.
MODIFY IT_1.
ENDLOOP.
*"specify the traffic signal field in the layout
LAYOUT-LIGHTS_FIELDNAME = 'FLAG'.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
 EXPORTING
*   I_INTERFACE_CHECK                 = ' '
*   I_BYPASSING_BUFFER                =
*   I_BUFFER_ACTIVE                   = ' '
*   I_CALLBACK_PROGRAM                = ' '
*   I_CALLBACK_PF_STATUS_SET          = ' '
*   I_CALLBACK_USER_COMMAND           = ' '
*   I_CALLBACK_TOP_OF_PAGE            = ' '
*   I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
*   I_CALLBACK_HTML_END_OF_LIST       = ' '
*   I_STRUCTURE_NAME                  =
*   I_BACKGROUND_ID                   = ' '
*   I_GRID_TITLE                      =
*   I_GRID_SETTINGS                   =
   IS_LAYOUT                         = LAYOUT
   IT_FIELDCAT                       = CATALOG
*   IT_EXCLUDING                      =
*   IT_SPECIAL_GROUPS                 =
*   IT_SORT                           =
*   IT_FILTER                         =
*   IS_SEL_HIDE                       =
*   I_DEFAULT                         = 'X'
*   I_SAVE                            = ' '
*   IS_VARIANT                        =
*   IT_EVENTS                         =
*   IT_EVENT_EXIT                     =
*   IS_PRINT                          =
*   IS_REPREP_ID                      =
*   I_SCREEN_START_COLUMN             = 0
*   I_SCREEN_START_LINE               = 0
*   I_SCREEN_END_COLUMN               = 0
*   I_SCREEN_END_LINE                 = 0
*   IT_ALV_GRAPHICS                   =
*   IT_ADD_FIELDCAT                   =
*   IT_HYPERLINK                      =
*   I_HTML_HEIGHT_TOP                 =
*   I_HTML_HEIGHT_END                 =
*   IT_EXCEPT_QINFO                   =
* IMPORTING
*   E_EXIT_CAUSED_BY_CALLER           =
*   ES_EXIT_CAUSED_BY_USER            =
  TABLES
    T_OUTTAB                          = IT_1
* EXCEPTIONS
*   PROGRAM_ERROR                     = 1
*   OTHERS                            = 2
          .
IF SY-SUBRC &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so rem all you need to do is add a feild in internal table for the traffic signal , assign values 0 , 1, 2 to it and last specify the name of this feild in the layout.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Arun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jan 2007 11:11:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-traffic-control-example-program-implemented-with-function-modules/m-p/1826083#M352462</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-24T11:11:07Z</dc:date>
    </item>
  </channel>
</rss>

