通过ST22查询报错消息,CX_SY_CONVERSION_NO_NUMBER即是报错时指向的错误类,其实类似于这样的类我们也可以使用它的超类CX_ROOT进行捕捉异常,这样超类下面的所以异常类都能处理捕获相应的异常 然后在程序中做catch处理,便能避免造成dump了 DATA:lv_cs TYPE c LENGTH4, lv_bcs TYPE i, lv_err_text TYPEstring, *...
| | |--CX_SY_TAB_RANGE_OUT_OF_BOUNDS //子字符串访问有效边界之外的表(行 &FROM&、列 &FROM_OFFSET& 到行 &TO&、列 &TO_OFFSET&)。 | | | | | |--CX_SY_OFFSET_NOT_ALLOWED //子字符串访问无效。 | | | |--CX_SY_DB_PROCEDURE_CALL //执行时出错:CALL DATABASE PROCEDURE &ABAP_NAME...
SELECT SINGLE f1 AS my_f1, f2 AS abc FROM dbtab INTO DATA(ls_struct) WHERE ... WRITE: / ls_struct-my_f1, ls_struct-abc. 2. Table Expressions If a table line is not found, the exception CX_SY_ITAB_LINE_NOT_FOUND is raised. No sy-subrc. Before 7.40 With 7.40 Read Table inde...
If the specified row is not found, a handleable expression of the class CX_SY_ITAB_LINE_NOT_FOUND is raised in all operand positions, except when a default value is specified in the definition of the type of the result, a table expression is used in the statement ASSIGN, where sy-...
cl_demo_output=>write( |READ: { sy-subrc }| ). "Expression TRY. text_short = itab[ KEY key COMPONENTS table_line = text_long ]. catch CX_SY_ITAB_LINE_NOT_FOUND. ... ENDTRY. cl_demo_output=>display( |Expression: { text_short }| )....
A line that is not found results in an runtime error. To avoid an error, you can use a TRY ... CATCH ... ENDTRY. block."In the examples, integer values are specified for the index. DATA(lv1) = itab[ 1 ]. TRY. DATA(lv2) = itab[ 2 ]. CATCH cx_sy_itab_line_not_...
DATA: lcx_error TYPE REF TO cx_root. "cx_sy_sql_error . "cx_sy_open_sql_db. DATA i_tab LIKE TABLE OF spfli WITH HEADER LINE. DATA err_text TYPE c LENGTH 1000. TRY. INSERT spfli FROM TABLE i_tab. CATCH cx_sy_open_sql_db INTO lcx_error. ...
DATA: lcx_error TYPE REF TO cx_root. "cx_sy_sql_error . "cx_sy_open_sql_db. DATA i_tab LIKE TABLE OF spfli WITH HEADER LINE. DATA err_text TYPE c LENGTH 1000. TRY. INSERT spfli FROM TABLE i_tab. CATCH cx_sy_open_sql_db INTO lcx_error. err_text = lcx_error->get_text( ...
catch cx_sy_create_object_error. lv_message = 'Method ''&'' not supported'(001). replace '&' in lv_message with lv_method. _raise_with_text zcx_not_found lv_message. endtry. endmethod. Second Strategy: Data Transfer Format
运行时错误:LOAD_PROGRAM_NOT_FOUND 原因:尝试使用SIGN传输一个无效的选择值 运行时错误:SUBMIT_WRONG_SIGN 原因:指定程序不是一个report 运行时错误:SUBMIT_WRONG_TYPE 原因:尝试向报表参数传输一个以上的值 运行时错误:SUBMIT_IMPORT_ONLY_PARAMETER 原因:尝试使用WITH sel IN itab传输的表的结构与selection不符合...