2007 Oct 31 8:41 AM
I defined the exception 'no_value_found' in the function module, now, the problem is how to catach it in the program calling it
Hi Yong li,
You can catch the Exceptions by using Exception Handling in your FM.
Reward if useful.
Regards,
Shilpi
2007 Oct 31 8:43 AM
2007 Oct 31 8:46 AM
2007 Oct 31 8:49 AM
Hi Yong li,
You can catch the Exceptions by using Exception Handling in your FM.
Reward if useful.
Regards,
Shilpi
2007 Oct 31 8:51 AM
2007 Oct 31 8:51 AM
Hi,
In the calling program just check the sy-subrc value after the FM and based on that handle the exception. If you had only one exception then check for sy-subrc =1.
Regards,
Atish
2007 Oct 31 9:04 AM
Hi Atish
I have used sy-subrc to handle it in the program, howerver, it is still encounter runtime error:
-
Error message -
A RAISE statement in the program "SAPLZERC" raised the exception
condition "NO_OBJECT_INFO_FOUND".
Since the exception was not intercepted by a superior
program, processing was terminated.
Short description of exception condition:
No object information found
For detailed documentation of the exception condition, use
Transaction SE37 (Function Library). You can take the called
function module from the display of active calls.
-
Errors is at following position:----
39 ELSE.
>> RAISE NO_OBJECT_INFO_FOUND.
41 ENDIF.
2007 Oct 31 9:09 AM
Have you defined NO_OBJECT_INFO_FOUND this exception in FM.
If not, define it. Also paste your program and FM code.
Regards,
Atish
2007 Oct 31 9:18 AM
2007 Oct 31 9:32 AM
Hi Yong,
make used of sy-subrc values & than set raise the exception you want to catch in your program. say for example if your select query return is false than
select * into ...
if sy-subrc ne 0.
raise no_value_found.
endif.
hope this help you
~John.
2007 Nov 01 1:29 AM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |