= CL_ABAP_TYPEDESCR=>DESCRIBE_BY_NAME( 'LIKP' ). LT_IDETAILS[] = LR_REF_TABLE_DES->COMPONENTS[]. "循环判断结构每个字段 LOOP AT LT_IDETAILS. ASSIGN COMPONENT LT_IDETAILS-NAME OF STRUCTURE is_likp TO 《 L_FIELD》 . IF SY-SUBRC = 0 AND IS NOT INITIAL. ASSIGN COMPONENT LT_IDETAI...
LOOP AT lt_table INTO ls_table. CONCATENATE ls_table-tabname '-' ls_table-fieldname INTO l_string. ls_comp-name = ls_table-fieldname. *读取字段类型 CALL METHOD cl_abap_datadescr=>describe_by_name EXPORTING p_name = l_string RECEIVING p_descr_ref = lr_type EXCEPTIONS type_not_found...
LOOP AT LT_TABLE INTO LS_TABLE. CONCATENATE LS_TABLE-TABNAME '-' LS_TABLE-FIELDNAME INTO L_STRING. LS_COMP-NAME = LS_TABLE-FIELDNAME. *读取字段类型 CALL METHOD CL_ABAP_DATADESCR=>DESCRIBE_BY_NAME EXPORTING P_NAME = L_STRING RECEIVING P_DESCR_REF = LR_TYPE EXCEPTIONS TYPE_NOT_FOUND...
cldescr ?= cl_abap_classdescr=>describe_by_name('CL_ABAP_FORMAT'). formats= cldescr->attributes.DELETEformatsWHEREname NP'O_*'ORis_constant <>'X'."获取format*O_SIMPLE*O_SIGN_AS_POSTFIX*O_SCALE_PRESERVING*O_SCIENTIFIC*O_SCIENTIFIC_WITH_LEADING_ZERO*O_SCALE_PRESERVING_SCIENTIFIC*O_ENGINEERI...
Hello Friends, I am using "CALL METHOD cl_abap_typedescr=>describe_by_name" for creating a dynamic table . With this the table gets generated correctly.
=CL_ABAP_TYPEDESCR=>DESCRIBE_BY_data(name). BREAK-POINT. 例2: TYPES: my_table TYPE HASHED TABLE OF i WITH UNIQUE KEY TABLE LINE. DATA: descr_ref TYPErefto cl_abap_tabledescr. FIELD-SYMBOLS: <key_comp_wa>TYPE abap_keydescr.
eo_field_catalog?=cl_abap_typedescr=>describe_by_name('ZFPM_STR').ENDMETHOD. Create FPM application Create Application 创建Application如下 Create Application Configuration 选中Application后右击创建configuration,在跳出的页面中输入configuration id,点击New按钮,填入描述与package信息 ...
5、_table-fieldnameINTOl_string.ls_comp-name=ls_table-fieldname.*读取字段类型CALLMETHODcl_abap_datadescr=>describe_by_nameEXPORTINGp_name=l_stringRECEIVINGp_descr_ref=lr_typeEXCEPTIONStype_not_found=1OTHERS=2.IFsy-subrc<>0.MESSAGEIDsy-msgidTYPEsy-msgtyNUMBERsy-msgnoWITHsy-msgv1sy-msgv2sy-...
describe SFLIGHT structure REF_TABLE_DES ?= CL_ABAP_TYPEDESCR=>DESCRIBE_BY_NAME( 'SFLIGHT' ). You will get: - all characters' length are doubled - this is Unicode system with encoding UTF-16 so 1 char = 2 bytes - all INT4 data type fields get length 4, although field length (...
cl_abap_typedescr=>describe_by_name( 'SYST' ) )->get_components( ) ). Example The factory method of the following class returns a reference variable of the type of the class itself. To use interface variables to access the components declared in the interfaceif, as recommended, the variab...