‎2007 Jun 22 8:26 AM
hi friends,
i have a parameter (var1) which is declared as String .now i want a function module which will not allow any other datatype otherthan number (type N) to be entered in that variable.is there any function module like that?would appreciate if u help me.
thanks and regards,
kanti
‎2007 Jun 22 8:44 AM
Hi,
You can create a function module by copying this function module and have the paramter type as you want and then you can check the type of the incoming variable using the utility method in the class
CL_ABAP_TYPEDESCR and the method is describe by data this will give you the type of the paramter then check if the type you want is the type you are getting in the FM and raise an exception if it is not.
Regards,
Sesh
‎2007 Jun 22 8:47 AM
Hello Kanti
The function module you are looking for is <b>NUMERIC_CHECK</b>.
Regards
Uwe