‎2011 Feb 25 7:20 AM
Hi,
I want to check inside loop of itab ,whether my field f1(132) type c contains value '####',if it is true i have to code continue.so i created one var f2 like this
data:f2(20) type c value '########'.
my code:
loop at itab.
if f1 cp f2.
continue.
endif.
endloop.
but sy-tdpos contains 132 after if stmt.it should be 0 right? anybody have solution for this.please help me if u know..
Thanks & Regards,
Kavitha
‎2011 Feb 25 7:54 AM
From f1 help : The character '#' has a special meaning. It serves as an escape symbol and indicates that the very next character should be compared "exactly".
Also if the CP is true it gives sy-fdpos as the first match.
‎2011 Feb 25 8:08 AM
What is the purpose of this #???????
Try once with CA CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB....
‎2011 Feb 25 9:18 AM
Hi ,
You should use "Find" or "Search" statemnt for this purpose. I am using the same and getting the output.
data : test type char10 value 'ABC',
test1 type char20 value 'HHJGJHGABCss'.
data : qw type i.
Find FIRST OCCURRENCE OF test in test1 match OFFSET qw.
write qw.
OUTPUT : 7 (Start counting from zero)
Hope this helps.