‎2008 Mar 06 1:19 AM
hi friends ,
I created a simple function module so the import and export parameters are integers .
So when i enter any char or spl symbols it should raise the exeception .
any clues plz .........
thanks
deepti
‎2008 Mar 06 1:25 AM
Hi Deepthi,
When you are defining it as integer and if you pass any char to the Import -export parameter you will get run time error.
To show error message using FM, define them of Char type and check in the FM if any char is passed show the error.
Regards,
Atish
‎2008 Mar 06 4:39 AM
When you are defining it as integer and if you pass any char to the Import -export parameter you will get run time error.
To show error message using FM, define them of Char type and check in the FM if any char is passed show the error.
hi..
In the source try to catch the input this passed and check whether its an interger or not
if its not an interger the raise the exception.
check this code hope this wld provide u some clue but this fm is for division and i have raised the exception when we use divide by 0
IF num2 = 0 .
RAISE num2_zero .
MESSAGE e001(zarc) WITH 'division by zero not possible' RAISING
num2_zero .
ENDIF.
result = num1 / num2.
ENDFUNCTION.