<?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 Re: reg we05 t code in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-we05-t-code/m-p/1745490#M323477</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But should i determine the type of lights , is there a fixed light for each status in we05&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;say for status  56 you have redfollowed byy 2 grey ones. so how should be i able determine those.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i need to display the status and the corresponding lights in my alv&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 01 Dec 2006 19:41:06 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-12-01T19:41:06Z</dc:date>
    <item>
      <title>reg we05 t code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-we05-t-code/m-p/1745486#M323473</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when you see the idoc in we05 againt the current status field in  techinical short info,you see 3 round kind of things right,&lt;/P&gt;&lt;P&gt;the color of which depend on the status.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;does anyone have an idea as to how to get those things in an alv report&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;venki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Dec 2006 19:15:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-we05-t-code/m-p/1745486#M323473</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-01T19:15:43Z</dc:date>
    </item>
    <item>
      <title>Re: reg we05 t code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-we05-t-code/m-p/1745487#M323474</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;I think you are asking the ALV traffic light.&lt;/P&gt;&lt;P&gt;Here is a code sample for the same,&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/ec31e990-0201-0010-f4b6-c02d876ce033" target="test_blank"&gt;https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/ec31e990-0201-0010-f4b6-c02d876ce033&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One more forum thread&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="204201"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Kathirvel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Dec 2006 19:19:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-we05-t-code/m-p/1745487#M323474</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-01T19:19:31Z</dc:date>
    </item>
    <item>
      <title>Re: reg we05 t code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-we05-t-code/m-p/1745488#M323475</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;Please check demo program BCALV_GRID_04.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ferry Lianto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Dec 2006 19:22:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-we05-t-code/m-p/1745488#M323475</guid>
      <dc:creator>ferry_lianto</dc:creator>
      <dc:date>2006-12-01T19:22:15Z</dc:date>
    </item>
    <item>
      <title>Re: reg we05 t code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-we05-t-code/m-p/1745489#M323476</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is the code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; Report ZALV.

TYPE-POOLS: icon.
TABLES: zc6_employee.
CLASS lcl_event_receiver DEFINITION DEFERRED.
*----------------------------------------------------------------*
DATA: BEGIN OF i_employee OCCURS 0.
      INCLUDE STRUCTURE zc6_employee.
DATA: traffic_light TYPE c.
DATA: line_color(4) TYPE c.
DATA: END OF i_employee.
*-----------------------------------------------------------------*
DATA: ok_code LIKE sy-ucomm,
      wa_employee LIKE LINE OF i_employee,
      gs_layout TYPE lvc_s_layo.

DATA: grid1 TYPE REF TO cl_gui_alv_grid,
      i_custom_container TYPE REF TO cl_gui_custom_container,
      o_event_receiver TYPE REF TO lcl_event_receiver.
DATA: wa_change LIKE zc6_employee.
DATA:
* Data for storing information about selected rows in the grid
gi_index_rows TYPE lvc_t_row,     " Internal table
g_selected_row LIKE lvc_s_row.    " Information about 1 row

*--------------------------------------------------------------------*
* C L A S S E S
*--------------------------------------------------------------------*
CLASS lcl_event_receiver DEFINITION.
  PUBLIC SECTION.
    METHODS:
    handle_toolbar FOR EVENT toolbar OF cl_gui_alv_grid
    IMPORTING
    e_object e_interactive,
    handle_user_command FOR EVENT user_command OF cl_gui_alv_grid
    IMPORTING e_ucomm.
ENDCLASS.
*---------------------------------------------------------------------*
* CLASS lcl_event_receiver IMPLEMENTATION
*---------------------------------------------------------------------*
CLASS lcl_event_receiver IMPLEMENTATION.

 METHOD handle_toolbar.        " Event handler method for event toolbar.
    CONSTANTS:                  " Constants for button type.
     c_button_normal TYPE i VALUE 0,
     c_separator TYPE i VALUE 3.
    DATA:
     ls_toolbar TYPE stb_button.
    MOVE c_separator TO ls_toolbar-butn_type.
    APPEND ls_toolbar TO e_object-&amp;gt;mt_toolbar.
* Append a new button that to the toolbar. Use E_OBJECT of
* event toolbar. E_OBJECT is of type CL_ALV_EVENT_TOOLBAR_SET.
* This class has one attribute MT_TOOLBAR which is of table type
* TTB_BUTTON. The structure is STB_BUTTON
    CLEAR ls_toolbar.
    MOVE 'CHANGE' TO ls_toolbar-function.
    MOVE icon_change TO ls_toolbar-icon.
    MOVE 'Change Details' TO ls_toolbar-quickinfo.
    MOVE 'Change' TO ls_toolbar-text.
    MOVE ' ' TO ls_toolbar-disabled.
    APPEND ls_toolbar TO e_object-&amp;gt;mt_toolbar.
  ENDMETHOD.

  METHOD handle_user_command." Handleown functions defined in thetoolbar
    CASE e_ucomm.
      WHEN 'CHANGE'.
        PERFORM change_details.
    ENDCASE.
  ENDMETHOD.
ENDCLASS.
*---------------------------------------------------------------------*
* S T A R T - O F - S E L E C T I O N.
*---------------------------------------------------------------------*
START-OF-SELECTION.
  SELECT-OPTIONS: s_empid FOR zc6_employee-s1empid.
  SELECT * FROM zc6_employee INTO CORRESPONDING FIELDS OF TABLE
  i_employee WHERE s1empid IN s_empid.
  CALL SCREEN '100'.


*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Module USER_COMMAND_0100 INPUT
*&amp;amp;---------------------------------------------------------------------*
MODULE user_command_0100 INPUT.
  CASE ok_code.
    WHEN 'EXIT'.
      LEAVE PROGRAM.
  ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Module STATUS_0100 OUTPUT
*&amp;amp;---------------------------------------------------------------------*
MODULE status_0100 OUTPUT.
  DATA:
   v_layout TYPE disvariant.

  IF i_custom_container IS INITIAL.
* Create objects for container and ALV grid
    CREATE OBJECT i_custom_container
    EXPORTING container_name  ='ALV_CONTAINER'.
    CREATE OBJECT grid1
    EXPORTING
    i_parent = i_custom_container.
* Create object for event_receiver class
* and set handlers
    CREATE OBJECT o_event_receiver.
    SET HANDLER o_event_receiver-&amp;gt;handle_user_command FOR grid1.
    SET HANDLER o_event_receiver-&amp;gt;handle_toolbar FOR grid1.
* Layout (Variant) for ALV grid
    v_layout-report = sy-repid. "Layout fo report
*---------------------------------------------------------------------*
* Setup the grid layout using a variable of structure lvc_s_layo
*---------------------------------------------------------------------*
* Set grid title
    gs_layout-grid_title = 'ALV Grid Display-Employee Details'.
* Selection mode B- Single row without buttons.
* This is the default mode
    gs_layout-sel_mode = 'B'.
    gs_layout-excp_fname = 'TRAFFIC_LIGHT'.
    gs_layout-info_fname = 'LINE_COLOR'.
    LOOP AT i_employee INTO wa_employee.
      wa_employee-traffic_light = '3'.
* Value of color field:
* C = Color, 6=Color 1=Intesified on, 0: Inverse display off
      MODIFY i_employee FROM wa_employee.
    ENDLOOP.
* Grid setup for first display
    CALL METHOD grid1-&amp;gt;set_table_for_first_display
    EXPORTING i_structure_name = 'ZC6_EMPLOYEE'
    is_variant = v_layout
    i_save = 'A'
    is_layout = gs_layout
    CHANGING it_outtab = i_employee[].
* End of grid setup
  ENDIF.
ENDMODULE. " STATUS_0100 OUTPUT

*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Form change_details
*&amp;amp;---------------------------------------------------------------------*
* Reads the contents of the selected row in the grid, and transfers
* the data to screen 200, where it can be changed and saved.
*----------------------------------------------------------------------*
FORM change_details.
ENDFORM.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Raja T&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Dec 2006 19:32:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-we05-t-code/m-p/1745489#M323476</guid>
      <dc:creator>raja_thangamani</dc:creator>
      <dc:date>2006-12-01T19:32:27Z</dc:date>
    </item>
    <item>
      <title>Re: reg we05 t code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-we05-t-code/m-p/1745490#M323477</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But should i determine the type of lights , is there a fixed light for each status in we05&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;say for status  56 you have redfollowed byy 2 grey ones. so how should be i able determine those.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i need to display the status and the corresponding lights in my alv&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Dec 2006 19:41:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-we05-t-code/m-p/1745490#M323477</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-01T19:41:06Z</dc:date>
    </item>
    <item>
      <title>Re: reg we05 t code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-we05-t-code/m-p/1745491#M323478</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are 3 icons&lt;/P&gt;&lt;P&gt;1.icon_yellow_light&lt;/P&gt;&lt;P&gt;2. icon_green_light&lt;/P&gt;&lt;P&gt;3.icon_red_light&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Dec 2006 19:58:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-we05-t-code/m-p/1745491#M323478</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-01T19:58:32Z</dc:date>
    </item>
    <item>
      <title>Re: reg we05 t code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-we05-t-code/m-p/1745492#M323479</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; Based on your COndition you need to fill your &amp;lt;b&amp;gt;Itab&amp;lt;/b&amp;gt; with respective Icons which i mentioned below. You can display any one of the Lights like Green, Yellow or Red.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The ICON Names are icon_yellow_light, icon_green_light and icon_red_light.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Each icon will have 3 Lights.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;icon_yellow_light - It will look like Grey Light,Yellow, Grey Light
icon_green_light - Green Light, Grey Light, Grey Light
icon_red_light  - Grey Light, Grey Light and Red light&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Raja T&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Raja T&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Dec 2006 02:51:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-we05-t-code/m-p/1745492#M323479</guid>
      <dc:creator>raja_thangamani</dc:creator>
      <dc:date>2006-12-02T02:51:15Z</dc:date>
    </item>
  </channel>
</rss>

