‎2007 Jun 19 3:42 PM
Hi all,
I have the below requirement..
A variable will take either alpha numeric value or Numeric Value..
and based on this i have to set other fields.
isay for e.g,
if it is alpha numeric Then say field X will be set to 1.or if it is Numeric field then
X will be set to 2.
help me in solving this issue.
thanks in Advance.
regards
Balaji
‎2007 Jun 19 3:43 PM
‎2007 Jun 19 3:43 PM
‎2007 Jun 19 3:45 PM
IF <i>FIELD</i> CO '0123456789' . "Numeric
.....
ELSE. "Alphanumeric
.....
ENDIF.
‎2007 Jun 19 3:47 PM
Hi,
You can use following comparision for the varaiable which is containing value:
If variable CA sy-abcde.
set flag alphanumeric.
Elseif variable CO '1234567890'.
set flag numeric.
Endif.
Ashvender
‎2007 Jun 19 8:20 PM
hi,
use this function module.
CALL FUNCTION 'NUMERIC_CHECK'
EXPORTING
STRING_IN = L_SAKNR
IMPORTING
HTYPE = L_TIPO.<b>or</b>
<b>IF var1 CO '0123456789'
FLAG = 1.
ELSE.
FLAG = 2.
ENDIF.</b>
regards,
Ashokreddy
‎2007 Jun 20 7:22 AM
HI..
I Appreciate all the Useful Answers From you..
Thanks a Lot for Ur Responses.
Regards
Balaji
All The Answers has been Rewarded......