2009 Nov 18 2:53 PM
Hi experts,
I need to find in a string the point number... For exemple if var = 1.300.000, I have to find two points. So I used the Keywords "SEARCH" :
SEARCH var FOR '.'.
data pos type i.
clear pos.
IF sy-subrc = 0.
pos = sy-fdpos.
SEARCH var FOR '.' STARTING at pos.
IF sy-subrc = 0.
flag_errore = 'X'.
ELSE.
move var to valore.
ENDIF.
ENDIF.
but wheh I execute SEARCH var FOR '.'. I have sy-subrc = 4... Maybe I make an error when I use this istruction?
2009 Nov 18 3:51 PM
SEARCH is obsolute, use FIND instead
example
DATA: result_tab TYPE match_result_tab.
FIND ALL OCCURRENCES OF REGEX `((ab)|(ba))`
IN 'abba'
RESULTS result_tab. l
venkat
Hi experts,
I need to find in a string the point number... For exemple if var = 1.300.000, I have to find two points. So I used the Keywords "SEARCH" :
SEARCH var FOR '.'.
data pos type i.
clear pos.
IF sy-subrc = 0.
pos = sy-fdpos.
SEARCH var FOR '.' STARTING at pos.
IF sy-subrc = 0.
flag_errore = 'X'.
ELSE.
move var to valore.
ENDIF.
ENDIF.
but wheh I execute SEARCH var FOR '.'. I have sy-subrc = 4... Maybe I make an error when I use this istruction?
2009 Nov 18 3:51 PM
SEARCH is obsolute, use FIND instead
example
DATA: result_tab TYPE match_result_tab.
FIND ALL OCCURRENCES OF REGEX `((ab)|(ba))`
IN 'abba'
RESULTS result_tab. l
venkat
2009 Nov 18 3:54 PM