‎2006 Nov 29 5:43 PM
I would like to catch system exception cx_sy_dynamic_osql_semantics. However, I believe that I need to use CATCH (not TRY) because the program will run in 4.6. I don't see a valid exception group and OTHERS doesn't work. Any suggestions? I have a SELECT inside the Catch / endcatch. This select may have invalid fields in the were clause that not associated with a dynamic itab. I would like to just catch the exception and handle it.
Your help is greatly appreciated.
Kind Regards,
Jason
‎2006 Nov 29 6:07 PM
Hi,
Have a look at this code
TRY.
SELECT * FROM mard INTO TABLE lt_mard WHERE (where) ORDER BY matnr.
* Catch the error and avoid short dump
CATCH cx_sy_dynamic_osql_semantics INTO exc_ref.
Exc_ref->get_text exc_text = ().
MESSAGE exc_text TYPE 'E'.
CATCH cx_sy_dynamic_osql_syntax INTO exc_ref.
Exc_ref->get_text exc_text = ().
MESSAGE exc_text TYPE 'E'.
ENDTRY.
‎2006 Nov 29 6:16 PM
Hi
TRY/ENDTRY statament is not supported by 4.6C.
I believe you should check in "where" table if there are only the fields belonging to the table of the select.
Max