- 流行类别
Data Structure(数据结构)
Networking(网络)
RDBMS(关系数据库管理系统)
Operating System(操作系统)
Java(Java)
MS Excel(MS Excel)
iOS(iOS)
HTML(HTML)
CSS(CSS)
Android(Android)
Python(Python)
C Programming(C 编程)
C++(C++)
C#(C#)
MongoDB(MongoDB)
MySQL(MySQL)
Javascript(Javascript)
PHP(PHP)Physics(物理)
Chemistry(化学)
Biology(生物)
Mathematics(数学)
English(英语)
Economics(经济学)
Psychology(心理学)
Social Studies(社会学研究)
Fashion Studies(时尚研究)
Legal Studies(法律研究)
在 SAP ABAP 中创建具有动态变量类型变量
您可以使用 RTTS 相关 API 创建类似 RANGE 的标准表,其中包含“LOW”、“HIGH”、“EQ”和“OPTION”等组件
data: rr_data type ref to data, rt_range_string type range of string, rs_range_string like line of rt_range_string, rt_component type abap_component_tab, rs_component type line of abap_component_tab, rt_range_components type abap_component_tab, ro_struc_descr type ref to cl_abap_structdescr, ro_table_descr type ref to cl_abap_tabledescr, ro_data_descr type ref to cl_abap_datadescr.
字段符号
<var_value> type any, <rt_range_type> type standard table, //<rt_range_type> is your range table <rs_range_type> type any. data(var_type) = 'BU_PARTNER'. create data rr_data type (var_type). ro_struc_descr ?= cl_abap_structdescr=>describe_by_data( p_data = rs_range_string ). rt_component = ro_struc_descr->get_components( ). ro_data_descr ?= cl_abap_elemdescr=>describe_by_name( var_type ). rt_range_components = value #( for comp in rt_component ( name = comp-name type = cond #( when comp-name eq 'SIGN' or comp-name eq 'OPTION' then comp-type else ro_data_descr ) ) ). ro_struc_descr ?= cl_abap_structdescr=>create( rt_range_components ). ro_table_descr ?= cl_abap_tabledescr=>create( ro_struc_descr ). create data rr_data type handle ro_table_descr. assign rr_data->* to <rt_range_type>. create data rr_data like line of <rt_range_type>. assign rr_data->* to <rs_range_type>. assign component 'SIGN' of structure <rs_range_type> to <var_value>. <var_value> = 'I'. assign component 'OPTION' of structure <rs_range_type> to <var_value>. <var_value> = 'EQ'. assign component 'LOW' of structure <rs_range_type> to <var_value>. <var_value> = 'X1'. assign component 'HIGH' of structure <rs_range_type> to <var_value>. <var_value> = 'X2'.
广告