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

i am displaying status (traffic signal ) in output screen in tree display

Former Member
0 Kudos
506

hi all,

i am displaying status (traffic signal ) in output screen in tree display but instead its displaying <b>@08@</b> like text format....is there any need of conversion....

but it works in normal ALV grid layout.

please suggest a solution....... !

regards.

sivaram.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Kudos
299

see this program in se38 <b>BCALV_GRID_04</b> for traffic light ...

reward points if it is usefull ...

Girish

4 REPLIES 4
Read only

Former Member
0 Kudos
299

HI,

if u write like this below it will give u properly.

DATA: NODE TYPE TREEV_NODE.

node-N_IMAGE = '@08@'.

rgds,

bharat.

Read only

Former Member
0 Kudos
299

You need to do the following three steps in order to have "status" indicators on your ALV list:

(1) Add a status or exception field to your itab definition, e.g.

TYPES: BEGIN OF ty_s_outtab.
TYPES:  status(4)    TYPE c.      " status field for LED / traffic light
INCLUDE TYPE KNB1.
TYPES: END OF ty_s_outtab.
 
DATA:
  gt_outtab  TYPE STANDARD TABLE OF ty_s_outtab
                           WITH DEFAULT KEY.



(2) Define the status field in the layout (LVC_S_LAYO):


  gs_layout-excp_fname = 'STATUS'.  " name of the status/exception field
  gs_layout-excp_led = 'X'.  " display LEDs, else traffic lights




(3) Loop over the itab and set the appropriate status:


  LOOP AT gt_outtab INTO ls_outtab.
 
    IF ( <condition is fulfilled> ).
      ls_outtab-status = '3'.   " green
   ELSEIF ( <condition partially fulfilled> ).
      ls_outtab-status = '2'.   " yellow
   ELSE.
      ls_outtab-status = '1'.   " red
   ENDIF.
 
    MODIFY gt_outtab FROM ls_outtab.
  ENDLOOP.

reward points if it is usefull....

Girish

Read only

Former Member
0 Kudos
300

see this program in se38 <b>BCALV_GRID_04</b> for traffic light ...

reward points if it is usefull ...

Girish

Read only

Former Member
0 Kudos
299

Hi,

refer to the following program:

BCALV_GRID_04

Hope this helps.

Reward if helpful.

Regards,

Sipra