2018 Dec 10 8:33 AM
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
2018 Dec 10 11:10 AM
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
2018 Dec 10 4:25 PM
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.
2018 Dec 11 4:24 AM
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
2018 Dec 11 8:02 AM
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
2018 Dec 11 10:58 AM
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.
2018 Dec 12 4:31 AM
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.