Skip to Content

traffic lights not coming in SPOOL log

Feb 22 at 07:27 AM


avatar image

Hi experts,

I have created a report which is displaying traffic lights on report output. This is not ALV, simple WRITE statement is used. This is working fine.

Now, when this report is executed in background, the SPOOL is created, but the traffic lights are not displayed. It comes as '@0A@' for red and '@08@' for green.

Can someone please help?

10 |10000 characters needed characters left characters exceeded

where is the code?


My current code is:

CONSTANTS: lc_green(4) TYPE c VALUE '@08@',

lc_red(4) TYPE c VALUE '@0A@'.

LOOP AT gt_log INTO gw_log.

CASE gw_log-msgtyp.

WHEN 'S'. WRITE : (6) lc_green, sy-vline.

WHEN 'E'. WRITE : (6) lc_red, sy-vline.

WHEN 'W'. WRITE : (6) lc_green, sy-vline.


WRITE : gw_log-msgdesc+0(100), sy-uline .


* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Raymond Giuseppi
Feb 22 at 03:01 PM

In your code (old fashionned one) don't define icon use this alternative:

INCLUDE <icon>.
WRITE: / icon_okay AS ICON.

leave a space between icon and previous text, else icon will be converted to text.

Show 7 Share
10 |10000 characters needed characters left characters exceeded

Thank you Raymond. Adding "as ICON" helped.


Now another issue is error description text. It is coming in next line; only in background SPOOL. Foreground, every thing is fine.

Refer the code given above.

Screenshots are:

Foreground - fine.

Background - text comes in next line.This should be corrected.

Please check and advise.


Please move your reply as a comment to Raymond's answer, so that he's automatically informed. Don't use an "answer" as it means a "proposed solution" in this forum.


Match report width from

  • In program: Statements like REPORT or NEW-PAGE option LINE-SIZE
  • During execution/scheduling: Print parameters of the background job step or statement SUBMIT option SPOOL PARAMETERS.

Hint: use of SET/GET_PRINT_PARAMETERS FM can be useful to handle print.

Raymond Giuseppi

LINE-SIZE helped for now.

Thank you so much Raymond


But, this has misaligned SPOOL top heading of the page. See the screen shot please.

Foreground report output is fine as earlier.


I can see this is a comment already. Please correct me if I am wrong. Thank you for your advise.


yep, done by the mod probably. Thanks :)

Julian R Feb 22 at 10:44 AM

Hi Megha,

Spool dont understand two ICONS together so use sentences for separate the columns and play with this:



Show 2 Share
10 |10000 characters needed characters left characters exceeded

I am not using 2 icons together.

Mentioning 'as ICON' helped me.


true dont read the WHEN