2020 Mar 11 6:11 PM
Hello Expert's
I am developing an Classical report in SC2 dev system and for the cells with particular block name i am suggested add some colors. Please check the attached image i.e RTO should have red color, INVEX should have green...etc.
I have added those colors with statement :
WHEN 'RTO'.
FORMAT COLOR COL_TOTAL INTENSIFIED OFF.
WHEN 'INVEX'.
FORMAT COLOR COL_NORMAL INTENSIFIED ON.
The issue is a small bit of the color is coming outside of the cell and its displaying in the cell next to it and its very annoying to look.
Please check 2nd attachment.
Can anyone have any idea of why it's happening like this?
Thanks.
2020 Mar 11 10:30 PM
I can't see your entire report, thus can't tell you exactly what you need to change. However I'd suggest the following patter that worked for me several times:
WHEN 'RTO'.
FORMAT COLOR COL_TOTAL INTENSIFIED OFF.
WRITE: / ...
FORMAT COLOR OFF.
WHEN 'INVEX'.
FORMAT COLOR COL_NORMAL INTENSIFIED ON.
WRITE: / ...
FORMAT COLOR OFF.The idea is to switch on color formatting, write what you need to write and then immediately switch off color formatting. This way the color formatting won't affect next WRITE statement.
HTH
Dominik Tylczynski
2020 Mar 12 7:25 AM
Your code has a bug. But if you post the whole code, probably people won't be able to compile it and so won't be able to debug so it will be very difficult to help you. Maybe you need tips to debug the code yourself?
2020 Mar 12 7:29 AM
Hi
It happens when the adjacent columns are overlapping - where your vertical line | is intersecting inbetween
Better you specify the column position in your code for each column. - that makes clear
Example :
LOOP AT it_final INTO wa_final. WRITE : /1 wa_final-matnr COLOR 2,
20 wa_final-ersda COLOR 3,
37 wa_final-ernam,
50 wa_final-laeda ,
70 wa_final-mtart ,
85 wa_final-matkl ,
95 wa_final-meins,
115 wa_final-lgort COLOR 4,
130 wa_final-werks COLOR 5.
ENDLOOP.Regards,
Venkat