10-23-2015 11:36 AM
Hi,
I need to replace # in the smartforms printing in place of space. On debugging what I see is that value does not have #, space is there. But when we go out to print smartform or print preview smartform, it is showing #. On debug I changed the values manually then it is printing fine.
I also used :
replace all occurrences of cl_abap_char_utilities=>CR_LF in str with space. But no help.
Please advise.
Regards,
Devanshu
10-23-2015 11:44 AM
How you are generating the value in the first place? What is the source?
10-23-2015 11:55 AM
Hi Devanshu ,
Please change your output device and check.
Regards,
Aakash
10-23-2015 12:01 PM
10-23-2015 12:13 PM
When you execute your program , it will ask for output device . Change it and check again .
10-23-2015 1:09 PM
This helped a bit. Please check the scenario below :
Previous -
Now -
10-23-2015 4:28 PM
It may be a tab.
try replace all occurrences of cl_abap_char_utilities=>HORIZONTAL_TAB in str with space.
R
10-24-2015 10:22 AM
A0 is so called non-breaking space. While it may (should) be possible to make SAP Spool system to recognize and process them as "normal" spaces (on our SAP_BASIS 740 SP 12 system the preview is already correct, for example), if there is no valid reason for having them, instead of trying to fix the output, I'd try to find out where are they coming from and fix them at the source - migrate the descriptions for example. CL_ABAP_CONV_IN_CE=>uccp( '00A0' ) call returns non-breaking space as character.
cheers
Jānis
10-23-2015 11:52 AM
Hi,
try replace all occurrences of regex '[^[:print:]]' in str with ` `.
10-23-2015 12:14 PM
10-23-2015 12:24 PM
10-23-2015 7:40 PM
10-23-2015 11:52 AM
10-23-2015 12:01 PM
Hexadecimal value for space here on debugging is coming 'A0', while the value which are printing fine for them it is coming '20'