09-23-2008 11:07 AM
Dear All,
Can we add traffic light (Symbol) at the header of the window? I want the header of ALV GRID to show traffic light and corresponding description.
Please can you suggest anything on this?
Thanks and regards,
Atanu
09-23-2008 11:44 AM
Hi
Use Include <symbols> to get the traffic light symbol.
Regards,
Vishwa.
09-23-2008 11:45 AM
09-23-2008 11:50 AM
Dear Syf,
Thanks for your suggestion. The objective is to write traffic light at the header, not at the detailed report.
Thanks and regards,
Atanu
09-23-2008 12:08 PM
Hi,
This functionality can be possible by defining two containers one docking container and another one custom container.
In first docking container we need to implement the traffic lights as a top of page.
and List we need to call in custom container down the docking container.
Like the below
*create a docking container and dock the control at the botton
CREATE OBJECT g_cont_dock
EXPORTING
dynnr = c_9000
extension = 260
side = cl_gui_docking_container=>dock_at_bottom.
*
* Call the Custom Container in ALVGRID
CREATE OBJECT g_alvgrid
EXPORTING
i_parent = g_cont_dock
EXCEPTIONS
error_cntl_create = 1
error_cntl_init = 2
error_cntl_link = 3
error_dp_create = 4
others = 5.
IF sy-subrc <> 0.
* MESSAGE ID '00' TYPE 'E' NUMBER '208'
* WITH 'Error While Preparing Alv Grid'(t03).
ENDIF.
*
* Defining Container for Custom Controls in the Screen Area
CREATE OBJECT g_custom_cont
EXPORTING
container_name = c_cont
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5
others = 6.
IF sy-subrc <> 0.
* MESSAGE ID '00' TYPE 'E' NUMBER '208'
* WITH 'Error While Defining Container'(t02).
ENDIF.
*
* Call the Custom Container in ALVGRID
CREATE OBJECT g_alvgrid1
EXPORTING
i_parent = g_custom_cont
EXCEPTIONS
error_cntl_create = 1
error_cntl_init = 2
error_cntl_link = 3
error_dp_create = 4
others = 5.
IF sy-subrc <> 0.
* MESSAGE ID '00' TYPE 'E' NUMBER '208'
* WITH 'Error While Preparing Alv Grid'(t03).
ENDIF.
and Traffic light variable needs to be included in final structure like below
BEGIN OF t_log,
ebeln TYPE ekko-ebeln, " Contract
ebelp TYPE ekpo-ebelp, " Line Item
msgtyp TYPE bdcmsgcoll-msgtyp, " Message Type
messg TYPE mcmailobj-objline, " Message
*light(04) TYPE c, " Traffic Light*
END OF t_log.
Light values needs to be changed like below while populating the final table
c_0a(04) TYPE c VALUE '@0A@', " Red
c_09(04) TYPE c VALUE '@09@', " Green
c_08(04) TYPE c VALUE '@08@', " Yellow
It will work fine.
Regards,
Nandha