cl_alv_table_create=>create_dynamic_table( EXPORTING it_fieldcatalog = gw_fieldcat " Field Catalog IMPORTING ep_table = t_newtable EXCEPTIONS generate_subpool_dir_full = 1 OTHERS = 2 ). ASSIGN t_newtable->* TO <t_dyntable>. * Create dynamic work area and assign to FS CREATE DATA ...
cl_alv_table_create=>create_dynamic_table 定义. 这种方式定义动态内表在一个进程中最多只能定义36次. 超过36次会报错. 其中 传递的内表 IT_FIELDCATALOG 可以通过函数 LVC_FIELDCATALOG_MERGE 传入表或结构获取 36次限制原因及处理方式 SPRING 该静态类方法中使用临时生成代码的方式产生数据的定义(这种办法也...
1.动态内表的创建,首先要定义动态结构,然后再根据定义的动态结构利用系统一个标准的method:”cl_ALV_table_create=>create_dynamic_table“生成动态内表。 2.动态内表的赋值,遍历动态结构,获取指定的字段,然后给指定的字段赋值。 3.动态内表的读取显示,与赋值相似,遍历动态结构,获取指定的字段,然后读取对应字段的...
1、打开类CL_ALV_TABLE_CREATE,查看方法CREATE_DYNAMIC_TABLE 2、查看代码中的函数LVC_TABLE_CREATE 3、继续查看代码中的ALV_TABLE_CREATE方法 4、继续点开FORM fb_table_create_string 5、看代码,到第600行 这个类是通过GENERATE SUBROUTINE POOL创建一个动态程序,然后再来执行后续动作的。 我们可以看到标准程序在...
FORM create_dynamic_itab. CALL METHOD cl_alv_table_create=>create_dynamic_table EXPORTING it_fieldcatalog = ifc IMPORTING ep_table = dy_table. ASSIGN dy_table->* TO <dyn_table>. CREATE DATA dy_line LIKE LINE OF <dyn_table>.
CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE EXPORTING IT_FIELDCATALOG = IT_STRUCTURE * I_LENGTH_IN_BYTE = 'X' IMPORTING EP_TABLE = DY_TABLE. ASSIGN DY_TABLE->* TO <DYN_TABLE>. 动态工作区的产生跟第一种一样。 该方法有一种弊端,仅能连续使用36次。即改方法产生动态是使用创建子...
CALL METHOD cl_gui_frontend_services=>file_open_dialog EXPORTING default_extension = l_extension default_filename = l_filename file_filter = l_filter multiselection = ' ' CHANGING file_table = l_tab_filetable rc = l_result1. * Check user did not cancel request ...
Create a new Table CALL METHOD cl_alv_table_create=>create_dynamic_table EXPORTING it_fieldcatalog = it_fieldcat IMPORTING ep_table = new_table. Create a new Line with the same structure of the table. ASSIGN new_table->* TO <l_table>. CREATE DATA new_line LIKE LINE OF ...
However this rather creates a deep table (with reference to other table as a component) then a flat one (where all components are of elementary data types). I would suggest to search a little bit around CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE where you can provide any component listing ...
I_STRUCTURE_NAME = DB_TABLE CHANGING CT_FIELDCAT = FCAT1[]. CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE EXPORTING IT_FIELDCATALOG = FCAT1[] IMPORTING EP_TABLE = DYN_ITAB. ASSIGN DYN_ITAB->* TO <DISP_TABLE>. CREATE DATA WA LIKE LINE OF <DISP_TABLE>. ...