‎2007 Jul 03 2:33 PM
Hi experts,
Iam trying to check quntity field which is having CHAR24 length.
How can i check whether user enters valid quantity...??
Is there any standard FM existing??
It should accept only following conditions....
1) 1234567890
2) 12345.00
3) should be less than 15 length
should not accept..
1. wild card charecters (!@#$%%^&* ....etc )
2. two periods (12345.00.00)
how can i do that??
reward guaranteed
thanks...
kaki
‎2007 Jul 03 2:39 PM
Hi
Try this:
PARAMETERS: P1(24) TYPE C.
DATA: _NUMBER TYPE P DECIMALS 2.
CATCH SYSTEM-EXCEPTIONS CONVT_NO_NUMBER = 1.
MOVE P1 TO _NUMBER.
ENDCATCH.
IF SY-SUBRC <> 0.
WRITE: P1, 'is not number'.
ENDIF.Max
‎2007 Jul 03 2:39 PM
Hi
Try this:
PARAMETERS: P1(24) TYPE C.
DATA: _NUMBER TYPE P DECIMALS 2.
CATCH SYSTEM-EXCEPTIONS CONVT_NO_NUMBER = 1.
MOVE P1 TO _NUMBER.
ENDCATCH.
IF SY-SUBRC <> 0.
WRITE: P1, 'is not number'.
ENDIF.Max
‎2007 Jul 03 3:30 PM
Hi Max.
Excellent...
It is working very well with your simple code.
Full points alloted...
Thanks
Kaki