‎2010 Jul 06 6:59 AM
Hi All,
I am taking data from inbound file, and at the end of file i am getting a symbol #. Tried to replace this but its not allowing actually this is enter value. Can any one help us to resolve this.
Thanks,
Srinath
‎2010 Jul 06 7:04 AM
Hi Srinath,
Please let us know the logic you are using to replace it?
Have you tried using the CL_ABAP_CHAR_UTILITIES=>NEWLINE attribute.If not please check with this.
Regards,
Lakshman.
‎2010 Jul 06 7:47 AM
Hi Lakshman,
I tried your thing yesterday itself but I couldnt get it right
I did replace CL_ABAP_CHAR_UTILITIES=>NEWLINE in wa_line with ' ' .
also replace '#' in ......
presently i have a solution but its not the best
I have a senario were i have to split this owrk area in to seperate fields
I am removing this # by using shift operator and its working fine, but I want to make it better
any other options.
Kind Regards,
Srinath.
Edited by: Srinath Ustili on Jul 6, 2010 8:48 AM
‎2010 Jul 06 10:04 AM
In runtime ABAP compiler recognizes # as tab delimiter.
You try below code:
DATA: l_sep1 TYPE c.
l_sep1 = cl_abap_char_utilities=>HORIZONTAL_TAB.
replace all occurances of l_sep1 in wa_it with space.
or
DATA: l_sep1 TYPE c.
l_sep1 = cl_abap_char_utilities=>HORIZONTAL_TAB.
SPLIT wa_it AT l_sep1 INTO wa_string-string1 wa_string-string2 wa_string-string3 wa_string-string4
wa_string-string5 wa_string-string6 wa_string-string7 wa_string-string8
wa_string-string9
If # symbol is at end of the line
In runtime ABAP compiler recognizes # as CRLF.
Then instead of HORIZONTAL_TAB use CR_LF
Thanks and Regards,
‎2010 Jul 06 10:23 AM
Hi Keshav and Chandra,
Both your solutions are not working....
thanks of your time, kindly try something else.
Kind Regards,
Bharat.
‎2010 Jul 06 9:48 AM
Hey ,
try using
"REPLACE all occurances of '#' by space " in your logic.
Hope this is helpful.
Regards,
Uma Dave
‎2010 Jul 06 9:49 AM
Hey ,
try using
"REPLACE all occurances of '#' by space " in your logic.
Hope this is helpful.
Regards,
Uma Dave
‎2010 Jul 06 9:59 AM
Hi,
this is not a normal # repsesentation which could me removed using Replace '#' ......infact i have used that too.
this is smthing which comes right after the whole work area data
ex: abcd,kjasdh," ", asdjfh, # , 0#
the # in between can be remove by using Replace statement but not the END one, kindly cross check,
Please tell me any other possible options.
Kind Regards,
Bharat
‎2010 Jul 06 10:01 AM
‎2010 Jul 06 10:31 AM
‎2010 Jul 06 10:37 AM
Hi keshav,
ENT must only be of these Data types C N D T or string.
Regards,
Bharat.
‎2010 Jul 06 11:29 AM
Hi,
1. Get the hexadecimal value. Here you will get four char value.
2. Then get the special char using class cl_abap_conv_in_ce.
Get special char NON BREAK SPACE
call method cl_abap_conv_in_ce=>uccp
exporting
uccp = '00A0' "(This is hex value of special char)
receiving
char = v_rep.
3. Replace the special char in the string by space or anything you want.
replace all occurrences of v_rep in l_doknr with ' '.
Thanks
Subhankar
‎2010 Jul 06 11:38 AM
Hi Subhankar,
is the hexa decimal value correct for this.
I guess you are close, but this one too didnt work.
Kind Regards,
Bharat.
‎2010 Jul 06 12:05 PM
Hi subhankar,
The Hexa decimal valu would be 000D.
and its working fine thanks a lot for your support.
Bharat.
‎2010 Jul 06 12:05 PM
Hi subhankar,
The Hexa decimal valu would be 000D.
and its working fine thanks a lot for your support.
Bharat.
‎2010 Aug 17 8:42 AM
Hi All,
I am also facing the same problem...
when i enter the text in textEdit in BSP application, when there is a text with 2,3 lines in text edit...
i am getting # # in in string variable in debugging mode...This ## making my text with big gap in out put at line break...
by using the code below i am able to replece only one #. But unable to replace second #...
call method cl_abap_conv_in_ce=>uccp
exporting
uccp = '000D' "(This is hex value of special char)
receiving
char = v_rep.
replace all occurrences of v_rep in text1 with ' '.
how can i replce the second # in the text? I think , i need to pass other hexa value insted of "000D"?
Pls help to solve the problem.
Regards,
Kishan
‎2015 Oct 09 1:38 PM
Hi
check in debugging
if hex value for # is 000D
then use:
REPLACE ALL OCCURANCE OF cl_abap_char_utilities=>cr_lf(1) IN string WITH space.
if hex value is 000A
then use:
REPLACE ALL OCCURANCE OF cl_abap_char_utilities=>cr_lf+1(1) IN string WITH space.
similary you can check for HORIZONTAL_TAB, VERTICAL_TAB etc.
hope this help
Regards