2007 Dec 11 3:23 PM
hi all,
actually i want to check a string as it should contain only characters only [0-9] or a dor[.] .. so can anyone plz tell me how to do tat..
v_string should contain only either 0 to 9 or a dot (.)
i hope the point is clear
supporting answers will be rewarded
regards
Nikesh
hi all,
actually i want to check a string as it should contain only characters only [0-9] or a dor[.] .. so can anyone plz tell me how to do tat..
v_string should contain only either 0 to 9 or a dot (.)
i hope the point is clear
supporting answers will be rewarded
regards
Nikesh
2007 Dec 11 3:27 PM
hi,
try this:
IF string CO '0123456789.'.
...
ENDIF.
hope this helps
ec
2007 Dec 11 3:29 PM
Hi,
pls follow the below code.
data:
l_values(11) type c value '0123456789.'.
if v_string co l_values.
"Then your string variable V_STRING contains only 0-9 or dot'
else.
"Then the string variable V_STRIN contains at least one some other value"
endif.
If the comparison is true, the system field SY-FDPOS contains the length of <f1>. If it is false, SY-FDPOS contains the offset of the first character of <f1> that does not occur in <f2>
reward if useful.
Thanks,
Sreeram.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |