raise exception type CX_SY_STRUCT_COMP_NAME ... Within SAP BI-IP ABAP-Exit function I am trying to create a copy of the system generate ITAB1 in which the data is delivered to me by the system. I want to add a few columns to this copy, perform calculations and write the data bac...
调用类cl_abap_structdescr中的方法describe_by_data()和get_ddic_field_list()能得到表或结构的列名字(colomn name). 代码: REPORT ztest_convers_row. DATA: gwa_data TYPE t001w, desc_struc TYPE REF TO cl_abap_structdescr, git_fields TYPE ddfields. FIELD-SYMBOLS: <gfs_component> TYPE dfies....
=cl_abap_typedescr=>describe_by_name('MY_TABLE'). WRITE:/'Typename :',descr_ref->absolute_name. WRITE:/'Kind :',descr_ref->type_kind. WRITE:/'Length :',descr_ref->length. WRITE:/'Decimals :',descr_ref->decimals. WRITE:/'Table Kind :',descr_ref->table_kind. WRITE:/'Initial...
调用类cl_abap_structdescr中的方法describe_by_data()和get_ddic_field_list()能得到表或结构的列名字(colomn name). 代码: REPORT ztest_convers_row. DATA: gwa_data TYPE t001w, desc_struc TYPE REF TO cl_abap_structdescr, git_fields TYPE ddfields. FIELD-SYMBOLS: <gfs_component> TYPE dfies....
lv_msg='Table:'&& lv_tabname && ` donotexist!`.MESSAGElv_msgTYPE'E'.ENDIF."創建tablelo_struct_type ?= cl_abap_typedescr=>describe_by_name( lv_tabname ). lt_comp_tab= lo_struct_type->get_components( )."最終結構創建tablelo_structdescr = cl_abap_structdescr=>create( lt_comp_tab...
On the other hand, if we use the method CL_ABAP_STRUCTDESCR->GET_COMPONENTS( ) then the framework does that implicitly. DATA: lo_struct_descr TYPE REF TO cl_abap_structdescr, lt_struct_fields TYPE cl_abap_structdescr=>component_table, lwa_struct_field TYPE cl_abap_structdescr=>component...
CREATE DATA lw_tab_ref LIKE LINE OF pt_tab. DATA tablestructure TYPE REF TO cl_abap_structdescr. tablestructure ?= cl_abap_typedescr=>describe_by_data_ref( lw_tab_ref ). *set column name 得到列名 LOOP AT tablestructure->components REFERENCE INTO DATA(component). ...
CREATE DATA lw_tab_ref LIKE LINE OF pt_tab. DATA tablestructure TYPE REF TO cl_abap_structdescr. tablestructure ?= cl_abap_typedescr=>describe_by_data_ref( lw_tab_ref ). "获取内表的 components DATA(tablecomponents) = tablestructure->get_components( ). ...
DATA: l_oref_structure TYPE REF TO cl_abap_structdescr, l_abap_compdescr type abap_compdescr. DATA: l_fields_table type SOI_FIELDS_TABLE. ASSIGN r_dyn_table->* TO <t_dyn_table>. CREATE DATA r_wa_dyn_table LIKE LINE OF <t_dyn_table>. ASSIGN r_wa_dyn_table->* TO <wa_dyn_...
first_xlsx_sheet->change_sheet_name(iv_sheetname)."设置sheet的名称DATA(lv_column)=1."设置列=1DATAlw_tab_refTYPEREFTOdata.CREATEDATAlw_tab_refLIKELINEOFpt_tab.DATAtablestructureTYPEREFTOcl_abap_structdescr.tablestructure?=cl_abap_typedescr=>describe_by_data_ref(lw_tab_ref).*setcolumn name...