Skip to Content
avatar image
Former Member

Smartform printing # in place of space for some item description

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Oct 23, 2015 at 10:44 AM

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

    Add comment
    10|10000 characters needed characters exceeded

    • 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

  • Oct 23, 2015 at 10:52 AM

    Hi,

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

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 23, 2015 at 10:52 AM

    Hi,

    What is the hexdecimal value of this "space"?

    cheers

    Janis

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

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