‎2006 Nov 29 5:32 PM
IF eq '#' does not work!
i debug and i can see the value # in the variable but never do the next line!
is a char type or ?
DATA:
linea(20),
zlineas type n.
zlineas = STRLEN( linea ).
if zlineas NE 0.
zlineas = zlineas - 1.
describe field linea+zlineas(1) type zchar.
move linea+zlineas(1) TO zchar.
if not is numeric zchar.
<b> if linea+zlineas(1) = '#'.</b>
linea = linea(zlineas).
endif.
endif.
‎2006 Nov 29 5:44 PM
HI Javier
I guess the '#' you see in debugging is End of Line Character.
Please try with below declarations and check if this works for you:
data: crlf(1) type c value cl_abap_char_utilities=>cr_lf,
newline(1) type c value cl_abap_char_utilities=>new_line.
if <b>linea+zlines(1) = crlf or linea+zlines(1) = newline</b>.
linea = linea(zlineas).
endif.Hope this helps.
Kind Regards
Eswar
‎2006 Nov 29 5:35 PM
Try declaring a variable and compare
constants : c_hash type c value '#'.
Use C_hash for comparison.
Regards,
Ravi
‎2006 Nov 29 5:39 PM
I am assuming that you are seeing this '#' in debugging, not an actual character in that string. It may be some special character like a tab or new line character.
‎2006 Nov 29 5:44 PM
the problem is that both are char type (1).
there is no space for another weird character..
‎2006 Nov 29 5:44 PM
HI Javier
I guess the '#' you see in debugging is End of Line Character.
Please try with below declarations and check if this works for you:
data: crlf(1) type c value cl_abap_char_utilities=>cr_lf,
newline(1) type c value cl_abap_char_utilities=>new_line.
if <b>linea+zlines(1) = crlf or linea+zlines(1) = newline</b>.
linea = linea(zlineas).
endif.Hope this helps.
Kind Regards
Eswar