Application Development 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: 

traffic lights not coming in SPOOL log

former_member229979
Participant
0 Kudos

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?

1 ACCEPTED SOLUTION

raymond_giuseppi
Active Contributor

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.

17 REPLIES 17

Sandra_Rossi
Active Contributor
0 Kudos

where is the code?

JRDEVELOPEE
Explorer
0 Kudos

Hi Megha,

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

SY-COLNO and ULINE

Regards

I am not using 2 icons together.

Mentioning 'as ICON' helped me.

0 Kudos

true dont read the WHEN

Sandra_Rossi
Active Contributor

Please move your code in your initial question, not as an "answer" (i.e. it means "proposed solution" in this forum)

Sandra_Rossi
Active Contributor

I ran your code in my system and the spool shows the icon successfully.

PS: your code contained syntax errors, here it is after correction:

REPORT.
CONSTANTS: lc_green(4) TYPE c VALUE '@08@'.
WRITE : (6) lc_green, sy-vline.

raymond_giuseppi
Active Contributor

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.

0 Kudos

Thank you Raymond. Adding "as ICON" helped.

Experts,

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.

0 Kudos

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.

0 Kudos

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

0 Kudos

LINE-SIZE helped for now.

Thank you so much Raymond

0 Kudos

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

Foreground report output is fine as earlier.

0 Kudos

yep, done by the mod probably. Thanks 🙂

former_member229979
Participant
0 Kudos

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.

ENDCASE.

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

ENDLOOP.

former_member229979
Participant
0 Kudos

Done, thanks.

Sandra_Rossi
Active Contributor
0 Kudos

Thanks. Don't hesitate to delete your "answer" too, it brings nothing to the "story" now 🙂