2012 Jan 26 3:55 PM
Please, is it possible to catch the following error with the TRY CATCH ENDTRY construct?
From a custom program, am calling CS_BOM_EXPL_MAT_V2.
Several nested calls in, Form STL_DATEN_HOLEN (LCSS4F1I) calls FM CS_ALT_SELECT_MAT.
However, that call is missing the CALL_INVALID Exception.
CS_ALT_SELECT_MAT is raising CALL_INVALID, but since it was not included in the FM call, the RAISE_EXCEPTION runtime error is issued.
I added a TRY CATCH ENDTRY construct around the call in the custom program using CATCH cx_root, but the program is still short dumping.
All the research I have done has been misleading...some articles indicate all errors should be caught, some indicate only catchable runtime errors can be caught, others are not quite clear.
So, I would like to find out if, in this scenario, it is even possible to catch this error and avoid the short dump.
I will open a message to see about having the SAP code fixed as soon as I get authorization to do so, (as well as fix the data causing the issue in the first place), but in the meantime, I would like to handle it in my code if possible.
ECC 6.0
Thanks for any information!
Kind Regards,
Deb
Edited by: Debra Garner on Jan 26, 2012 5:19 PM
Please, is it possible to catch the following error with the TRY CATCH ENDTRY construct?
From a custom program, am calling CS_BOM_EXPL_MAT_V2.
Several nested calls in, Form STL_DATEN_HOLEN (LCSS4F1I) calls FM CS_ALT_SELECT_MAT.
However, that call is missing the CALL_INVALID Exception.
CS_ALT_SELECT_MAT is raising CALL_INVALID, but since it was not included in the FM call, the RAISE_EXCEPTION runtime error is issued.
I added a TRY CATCH ENDTRY construct around the call in the custom program using CATCH cx_root, but the program is still short dumping.
All the research I have done has been misleading...some articles indicate all errors should be caught, some indicate only catchable runtime errors can be caught, others are not quite clear.
So, I would like to find out if, in this scenario, it is even possible to catch this error and avoid the short dump.
I will open a message to see about having the SAP code fixed as soon as I get authorization to do so, (as well as fix the data causing the issue in the first place), but in the meantime, I would like to handle it in my code if possible.
ECC 6.0
Thanks for any information!
Kind Regards,
Deb
Edited by: Debra Garner on Jan 26, 2012 5:19 PM
2012 Jan 26 4:25 PM
can u show us the fm call alog with try catch that you have used?
2012 Jan 26 4:46 PM
TRY.
me->explode_bom( EXPORTING i_projn = <afpo_ei>-projn
i_matnr = <afpo_ei>-matnr
i_werks = <afpo_ei>-dwerk
CHANGING et_bom_list = gt_bom_list ).
CATCH cx_root.
CONTINUE.
ENDTRY.
2012 Jan 26 6:02 PM
which is the class, is it standard or your custom?
can you paste the code inside explode_bom method if its you own method
2012 Jan 26 7:57 PM
Hi Debra,
You cannot catch non class based exceptions using the TRY/ENDTRY. You might also find no luck with help from SAP since the FM in question 'CS_BOM_EXPL_MAT_V2' is not released for customer use. The best bet is to examine why the error is occurring and figure out what needs to be done to fix it and/or avoid it in the future.
Regards,
Ryan Crosby
2012 Jan 26 8:35 PM
2012 Jan 26 8:46 PM
Next time, please assign points to helpful answers. It will encourage people to help you in the future.
Rob
2012 Jan 26 9:01 PM
I assigned 6 points to Ryan when I said my question was answered. How do I tell if he got them?
2012 Jan 26 9:04 PM