11-12-2007 11:10 AM
Hi All,
From a string, i retrieve the last character sucessfully...
Need to find, whether the retrieved character is a numeric or non numeric...
and based on that need to check some further conditions...!
Is there any way, to identify whether the retrieved character is a numeric or non numeric????
Kindly, help to throw some lights!!!
Thanks!!!
Cheers,
Sundar.
11-12-2007 11:11 AM
if var co '0123456789'
write ; / 'Numeric'.
endif.
regards
shiba dutta
11-12-2007 11:11 AM
if var co '0123456789'
write ; / 'Numeric'.
endif.
regards
shiba dutta
11-12-2007 11:12 AM
Hello,
U can check like this.
If string ca '0123456789'.
write: 'Numeric'.
else.
write: 'Non Numeric'.
endif.
U can use the FM <b>NUMERIC_CHECK</b> also.-
Regards,
Vasanth
11-12-2007 11:15 AM
Hi,
See the below code.
If string ca '0123456789'.
write: 'Numeric'.
else.
if string ca sy-abcde.
write : 'Non-Numeric'.
endif.
11-12-2007 11:16 AM
Hi
You can do something like this.
report zrich_0001.
data: str type string.
data: valid_characters type string.
concatenate '0123456789' sy-abcde into valid_characters.
str = '123ABC'.
if str co valid_characters.
else.
message e001(00) with 'You have a problem'.
endif.
11-12-2007 11:18 AM
Hi,
See the below code.
If string co '0123456789'.
write: 'Numeric'.
elseif string co sy-abcde.
write : 'Non-Numeric'.
endif.
BR,
MD.
11-12-2007 11:18 AM