Skip to Content
-1

traffic lights not coming in SPOOL log

Feb 22 at 07:27 AM

108

avatar image
Former Member

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?

0
Former Member

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.

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

2 Answers

Best Answer
Raymond Giuseppi
Feb 22 at 03:01 PM
1

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
Former Member

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

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.

0

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.

1
Former Member
Raymond Giuseppi

LINE-SIZE helped for now.

Thank you so much Raymond

0
Former Member
Former Member

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

Foreground report output is fine as earlier.

0
Former Member
Sandra Rossi

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

0

yep, done by the mod probably. Thanks :)

0
avatar image
Former Member Feb 22 at 10:44 AM
0

Hi Megha,

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

SY-COLNO and ULINE

Regards

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

I am not using 2 icons together.

Mentioning 'as ICON' helped me.

1
Former Member

true dont read the WHEN

0