2009 Mar 02 7:18 AM
2009 Mar 02 7:24 AM
2009 Mar 02 7:21 AM
HI,
U can use CO(contains only operator to analysis it_
If var CO '1234567890'.
flag = digits.
endif.
and.
if var CO sy-abcde "abcdefg......z"
flag = char.
endif.
2009 Mar 02 7:22 AM
For digits you can check -
if var co '1234567890'.
for character you may check
if var CO sy-abcde.
2009 Mar 02 7:24 AM
2009 Mar 02 7:25 AM
Data: w_no(10) type n
parameters: w_char(20) type .
W_no = w_char.
If w_no is initial.
Write : / W_char, 'Contains Characters'.
Else.
Write : / W_char, 'Contains Numbers'.
Endif.
Or.
Check for w_char CO '1234567890' and w_char co SY-ABCDE.
Regards,
Gurpreet
2009 Mar 02 7:27 AM
2009 Mar 02 7:27 AM
Hi ,
You can check like:
-> create one range for checking digits:
r_digit type i.
r_digit-low = 0.
r_digit-high = 9.
r_digit-sign = BT.
append r_digit.
->Then write:
var1( variable name) CA(Contains any) sy-abcde or r_digit.
Hope it helps
Regrds
Mansi