‎2007 Sep 27 1:29 PM
hi guru
in creation of functionmodule we will write soursecode by usinf if and ifelse, so then what is neccessity to write exceptions?
what is use of exception , why r u giving exceptions?
‎2007 Sep 27 1:33 PM
Raising an exception in a function module allows it to set a return code in the calling program, so that it can code a response to the error that has occured.
‎2007 Sep 29 7:51 AM
Hi Srinivas.
Exceptions are used in FM to handle Error situations.
So that the calling program will know for which reason the FM is not successfully executed.
That means if No exception is RAISED Then the FM is successfully executed.
<b>reward if Helpful.</b>
‎2007 Oct 03 11:40 AM
Hi,
Best way is create ur own FM. What i did was i created an fm: with 2 import parameters of type integer and export as result.
In this fm wht i first did was divide the first import param with the second.
Called this fm in another fm and passed the values frm there like this val1 = 9..val2 = 0. So this resulted in a runtime error. So next time i defined an exception cannot be divide by zero...and raised in it in the called fm wen the 2nd value is 0....u can c tht noe error wont occur.
U can try more on these using tables..eception classes etc..
Regards,
Simy.