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: 

how to remove space symbol in smart-forms?

0 Kudos
1,224

Dear All,

we have checked previous posts but my issue is different hence iam posting below :

we have developed one smart form which will extract data from custom table which has been populated by web dynpro application.

we have requirement to display 1000 characters which i have used edi_sdata in abap webdynpro and to store in custom table i have used 4 variables with 250 characters.

when we are displaying in the smart form the text is displaying with special character # .

kindly help us to resolve this issue.

Regards

6 REPLIES 6

raymond_giuseppi
Active Contributor
0 Kudos
569

What did you do to insure there are no special/non displayable character in your data (sdi_sdata can contain packed fields and the like)

Did you try to

  • (min) remove non displayable characters
  • (max) convert data to readable/external format using tools such as IDOC_DATA_OUTBOUND_CONVERT

0 Kudos
569

I would suggest 2 things:

On the webdynpro input, could you check if there is an end-of-line character or a new line. If so remove that during update of the table.

The other option is to do the same in the smartform. After reading the table remove any non character field using the entries from cl_abap_char_utilities and then display.

Simplest would be to check the entries before updating the table.

0 Kudos
569

Thanks for the reply.

ex: abcdfg

regards

xyz.

on updation variable text is displaying in this format abcdfg#regards#xyz.

in the smartform its displaying with '#' special character.

Regards

0 Kudos
569

In your text i do not see any special character, can you please attach a screen shot of smartform how you are doing along with which language form is printing in.

Thanks

Nabheet

0 Kudos
569

In your webdynpro entry, it looks like the enter key (new line) is being recorded along with the text. You can try 2 things:

1. In the input webdynpro, replace the cl_abap_char_utilities=>cr_lf with space so that it will be saved without the carriage return i.e. no # character will be shown.

2. In the smartform, after reading the data from the table with the #, try replacing the cl_abap_char_utilities=>cr_lf with space or splitting the text at cl_abap_char_utilities=>cr_lf into different lines of an internal table to mimic the enter key.

So something like:

       lv_str = {database text}
       split lv_str at cl_abap_char_utilities=>cr_lf into table lt_itab.

so if lv_str = "abcdfg#regards#xyz"

the split should show internal table with 3 lines

abcdfg

regards

xyz

You may have to check in debugging to see what non-printable character is being input in the text.

Hope that makes sense.

0 Kudos
569

thanks for the reply.

kindly let us know how to define table lt_itab .

split lv_str at cl_abap_char_utilities=>cr_lf into table lt_itab.