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: 

Smartform printing # in place of space for some item description

Former Member
0 Kudos

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

13 REPLIES 13

Former Member
0 Kudos

How you are generating the value in the first place? What is the source?

0 Kudos

Hi Devanshu ,

Please change your output device and check.

Regards,

Aakash

0 Kudos

How can I change that? Please advise

0 Kudos

When you execute your program , it will ask for output device . Change it and check again .

0 Kudos

This helped a bit. Please check the scenario below :

Previous -

Now -

0 Kudos

It may be a tab.

try replace all occurrences of  cl_abap_char_utilities=>HORIZONTAL_TAB in str with space.


R

0 Kudos

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

michael_kozlowski
Active Contributor
0 Kudos

Hi,

try replace all occurrences of regex '[^[:print:]]' in str with ` `.

0 Kudos

Tried it. But no help.

0 Kudos

Hi, in smartform. Is multiple line option for field ticked?

0 Kudos

Hi, change device type to a unicode supporting device type.

Private_Member_7726
Active Contributor
0 Kudos

Hi,

What is the hexdecimal value of this "space"?

cheers

Janis

0 Kudos

Hexadecimal value for space here on debugging is coming 'A0', while the value which are printing fine for them it is coming '20'