2008 Feb 07 9:44 AM
How to validate a Numeric field ?
2008 Feb 07 9:46 AM
we have system variable sy-1234.
loop at itab.
if itab-field CA sy-abcde. "<<<check for any alphabet.
message e001.
endif.
endloop.
2008 Feb 07 9:47 AM
Numeric field will not accept letters . So no need of validation.
Regards,
Nageswar
2008 Feb 07 9:46 AM
What validation you need?
You might have vlaidation table for the field . Use that table to validate.
Regards,
Nageswar
2008 Feb 07 9:53 AM
Hi,
DATA : v_num TYPE I,
v_cnt TYPE i.
PARAMETERS : P_num TYPE xxxxxxx.
AT SLECTION-SCREEN.
v_num = strlen( p_num ).
DO v_num TIMES.
v_cnt = v_cnt + 1.
IF p_num+0(v_cnt) CA '0123456789'
Number found.
ENDIF.
ENDDO.
Don't forget to reward if useful..
2008 Feb 07 9:59 AM
Hi,
You can use FM NUMERIC_CHECK.
OR
if fieldname CA sy-abcde.
if sy-subrc NE 0.
message 'Contain Numeric characters' type 'I'.
else.
message 'No Numerics' type 'I'.
endif.
endif.
Thanks,
Sriram Ponna.
2008 Jul 15 4:52 AM
2008 Jul 15 4:55 AM
I think u r intensionally posting issues and solving by urself to get the point..is it like that ?
2008 Jul 15 5:52 AM
This fellow from the last 25 posts is asking something and after 2 or 3 replies is
saying that he has done it.
Hey! if you know everything STOP wasting others time...Ithink the moderator should also look into it..
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |