‎2009 Dec 03 2:22 PM
Hi
Im using the following API:
CL_WS_HELPER=>get_proxy_abapkey_by_esrkey(
EXPORTING
esr_key = l_t_esr_key
IMPORTING
abap_key = l_t_abap_key
EXCEPTIONS
not_found = 1
).
This API throws NOT_FOUND Exception.
Questions:
1. I'm not able to find this exception type anywhere in the workbench. In the error it says Exception Condition NOT_FOUND is thrown.
2. How to catch these kind of exceptions?
Please help.
Thanks,
Piyush
‎2009 Dec 03 2:25 PM
Hello,
You donot have to create / handle these EXCEPTIONS. Just uncomment these lines & check SY-SUBRC after the method call:
CL_WS_HELPER=>get_proxy_abapkey_by_esrkey(
EXPORTING
esr_key = l_t_esr_key
IMPORTING
abap_key = l_t_abap_key
EXCEPTIONS "Uncomment these lines
not_found = 1 "Uncomment these lines
).
CASE sy-subrc.
WHEN 0.
WHEN 1.
" Error Handling
WHEN OTHERS.
ENDCASE.
BR,
Suhas
‎2009 Dec 03 2:25 PM
Hello,
You donot have to create / handle these EXCEPTIONS. Just uncomment these lines & check SY-SUBRC after the method call:
CL_WS_HELPER=>get_proxy_abapkey_by_esrkey(
EXPORTING
esr_key = l_t_esr_key
IMPORTING
abap_key = l_t_abap_key
EXCEPTIONS "Uncomment these lines
not_found = 1 "Uncomment these lines
).
CASE sy-subrc.
WHEN 0.
WHEN 1.
" Error Handling
WHEN OTHERS.
ENDCASE.
BR,
Suhas
‎2009 Dec 03 3:12 PM
Hello Bajaj,
uncomment Exceptions and not_found = 1 lines.
CL_WS_HELPER=>get_proxy_abapkey_by_esrkey(
EXPORTING
esr_key = l_t_esr_key
IMPORTING
abap_key = l_t_abap_key
EXCEPTIONS
not_found = 1
).
if you want to know why this exception occured , just keep a breakpoint in get_proxy_abapkey_by_esrkey method.
Thanks