‎2012 Nov 21 7:16 AM
Hi,
We have created a Z field with variable type as String. while saving, after 255 characters, it adds a hesh sign # itself and if user presses enter while typing text in this variable, it saves it with two hesh sign. we have used customized control text area to let user put unlimited length of text in this variable.
The issue is, when we print this variable in smartform, this hesh is printed. Replace function also does not replace it. How do we remove this? is there any FM to print string variable as user saved it?
Thanks,
Binita Joshi
‎2012 Nov 21 7:47 AM
Hello Binita,
You will have to remove the Formatting Characters for example TAB , enter and Carriage Return,
They are saved as a Code and are denoted by # in string
You can do it by replacing such thing by using 'REPlACE ALL OCCURANCES OF cl_abap_char_utilities=>horizontal_tab <string>' .
You can try replacing all Atrributs of class cl_abap_char_utilities CR_LF , NEW_LINE ...and no on
Hope this helps,
anup Deshmukh