Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

search dot('.') in string, why the sy-fdpos is zero?

Former Member
0 Kudos

Hi,

str = '136.59900'

search str for '.'

IF sy-subrc = 0.

pos = sy-fdpos.

ENDIF.

but pos is zero.

when i use 'CA' instead of search, result is str including dot. why? anybody give me an explanation?

if str ca '.'.

write:/ 'Including dot'.

else.

write:/ 'Not including dot'.

endif.

3 REPLIES 3

Former Member
0 Kudos

Hi daniel,

1. Dot is a special pattern character.

2. hence, give THREE DOTS.

3. like this.

search str for '...'.

4. Then it will search for One Dot

5. SY-FDPOS = 3.

regards,

amit m.

0 Kudos

hi, Amit

Thank you very much!

The problem has been solved correctly

Former Member
0 Kudos

Hi.

Try this.

str = '136.59900'.

find '.' in str match offset off.

IF sy-subrc = 0.

pos = off.

ENDIF.