1 CL_ABAP_TYPEDESCR:用于在运行时创建类型属性 2 CL_ABAP_DATADESCR:用于在运行时处理数据类型 3 CL_ABAP_STRUCTDESCR:用于在运行时创建和描述结构 4 CL_ABAP_TABLEDESCR:用于在运行时创建和描述表 声明和使用示例: RTTS 6.权限检查对象:另一个习惯是使用权限检查对象。权限检查对象不仅仅依赖于角色分配,它可...
|--CL_ABAP_INTFDESCR DATA: structtypeTYPEREFTOcl_abap_structdescr. structtype ?= cl_abap_typedescr=>describe_by_name('spfli'). DATA: datatypeTYPEREFTOcl_abap_datadescr, field(5)TYPEc. datatype ?= cl_abap_typedescr=>describe_by_data(field). DATA: elemtypeTYPEREFTOcl_abap_elemdescr. e...
sometype typeREFTOCL_ABAP_TYPEDESCR, rrt_typeTYPEREFTOCL_ABAP_DATADESCR.FIELD-SYMBOLS: <any>TYPEany, <mine>type typ_mine.*type==>typeASSIGNlargefield to <mine>CASTING.WRITE:/ ‘Casting from15==>10to <mine>:’, <mine>.ASSIGNlargefield to <any>CASTING type typ_mine.WRITE:/ ‘Casting...
DATA ls_table TYPE dfies.DATA lr_struc TYPE REF TO cl_abap_structdescr. DATA lr_table TYPE REF TO cl_abap_tabledescr.DATA lr_type TYPE REF TO cl_abap_typedescr. DATA lr_data TYPE REF TO cl_abap_datadescr.DATA lt_comp TYPE abap_component_tab. DATA ls_comp LIKE LINE OF lt_comp....
CLASS cl_file_operator DEFINITION. PUBLIC SECTION. METHODS:constructor IMPORTING im_filename TYPE FILENAME-FILEINTERNOPTIONAL EXCEPTIONS filename_error , writefile IMPORTING p_descr TYPE REF TO cl_abap_datadescr OPTIONAL p_name TYPE char30 OPTIONAL p_value TYPE REF TO data EXCEPTIONS file_error ...
CALL METHOD CL_ABAP_DATADESCR=>DESCRIBE_BY_NAME EXPORTING P_NAME = L_STRING RECEIVING P_DESCR_REF = LR_TYPE EXCEPTIONS TYPE_NOT_FOUND = 1 OTHERS = 2. IF SY-SUBRC <> 0. MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. ...
DATA: lv_stmt_type TYPE string. DATA: ex_structdescr TYPE REF TO cl_abap_structdescr, ex_result_ref TYPE REF TO data. *获取sql语句的类型 lv_stmt_type = cl_hdb_sql_executor=>get_statement_type( gv_sql ). *创建默认数据库的链接对象 ...
DATA: ex_structdescr TYPE REF TO cl_abap_structdescr, ex_result_ref TYPE REF TO data. *获取sql语句的类型 lv_stmt_type = cl_hdb_sql_executor=>get_statement_type( gv_sql ). *创建默认数据库的链接对象 r_adbc_conn = cl_db6_con=>get_connection( 'MTD' ). ...
DATA lr_type TYPE REF TO cl_abap_typedescr. DATA lr_data TYPE REF TO cl_abap_datadescr. DATA lt_comp TYPE abap_component_tab. DATA ls_comp LIKE LINE OF lt_comp. DATA dyn_wa TYPE REF TO data. DATA dyn_table TYPE REF TO data. DATA l_string TYPE string. FIELD-SYMBOLS: <dyn_tab...
终于找到了一个方法,DATA: l_tabledesc_ref TYPE REF TO cl_abap_tabledescr, l_descr_ref TYPE REF TO cl_abap_structdescr.FIELD-SYMBOLS: TYPE abap_compdescr.l_tabledescr_ref ?= cl_abap_typedescr=>describe_by_data( i_itab ).l_descr_ref ?= l_tabledescr_ref->get_table_...