2007 Jun 15 7:24 AM
Hi
Can you clarify on how to handle the check for initial status of the import parameters which are not optional. I do not need my method call to proceed without supplying some input (not inital) for the import parameters.
If exceptions are the only way to handle I would like to see one sample code for the same.
Regards
Karthick
2007 Jun 15 7:27 AM
Hi,
IN the method parameters..you can define the exception code..Like NO_INPUT.
in the code of the method..
Check the parameter...
Ex..
IF IM_INPUT IS INITIAL.
* Raise an exception that there is no input supplied..
RAISE NO_INPUT.
ENDIF.
Thanks
Naren
Hi
Can you clarify on how to handle the check for initial status of the import parameters which are not optional. I do not need my method call to proceed without supplying some input (not inital) for the import parameters.
If exceptions are the only way to handle I would like to see one sample code for the same.
Regards
Karthick
2007 Jun 15 7:27 AM
Hi,
IN the method parameters..you can define the exception code..Like NO_INPUT.
in the code of the method..
Check the parameter...
Ex..
IF IM_INPUT IS INITIAL.
* Raise an exception that there is no input supplied..
RAISE NO_INPUT.
ENDIF.
Thanks
Naren
2007 Jun 15 7:28 AM
Hi,
Wiht out supplying the mandatory IMPORT paramter you will any get a SYNTAX error,
so if you want to check in the program if the supplied paramter is NOT initial then you have to check in the method implementation and raise an exception.
Example.
if IM_DATA is initial.
raise exception type cx_no_data_supplied (If class based exception)(Recommended).
also you can use
raise no_data_supplied.
Regards,
Sesh