FPM十:FORM Repeater
Posted sapsb
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了FPM十:FORM Repeater相关的知识,希望对你有一定的参考价值。
1.创建feeder class:ZCL_FPM_FORM_REP_DEMO
添加接口类:
2.新建全局内表:
DATA:GT_QPGT TYPE TABLE OF QPGT.
3.实列化get_data方法:
METHOD if_fpm_guibb_form_repeater~get_data. CASE io_event->mv_event_id. WHEN ‘FPM_START‘. SELECT * FROM qpgt INTO TABLE gt_qpgt WHERE SPRACHE = ‘E‘ AND KATALOGART BETWEEN ‘Z1‘ AND ‘Z5‘. ct_data = gt_qpgt. ev_data_changed = abap_true. WHEN OTHERS. ENDCASE. ENDMETHOD.
实例化get_definition方法:这里做分组定义
METHOD if_fpm_guibb_form_repeater~get_definition. DATA: lr_struc TYPE REF TO cl_abap_structdescr, gt_fields TYPE ddfields, gw_fields TYPE dfies. FIELD-SYMBOLS:<fs_field_descr> TYPE fpmgb_s_formrepfield_descr. eo_field_catalog ?= cl_abap_tabledescr=>describe_by_name( ‘ZQPGT‘ ). lr_struc ?= eo_field_catalog->get_table_line_type( ). gt_fields = lr_struc->get_ddic_field_list( p_including_substructres = abap_true ). LOOP AT gt_fields INTO gw_fields. APPEND INITIAL LINE TO et_field_description ASSIGNING <fs_field_descr>. <fs_field_descr>-name = gw_fields-fieldname. CASE <fs_field_descr>-name. WHEN ‘KATALOGART‘."这是个二级目录表,这里以第一级目录作为分组节点 <fs_field_descr>-allow_grouping = abap_true. SELECT katalogart AS value katalogtxt AS text FROM tq15t INTO CORRESPONDING FIELDS OF TABLE <fs_field_descr>-fixed_values WHERE sprache = ‘E‘. ENDCASE. ENDLOOP. ENDMETHOD.
4.FPM_WB新建新的OVP程序:
5保存,激活。编辑配置:
6.添加UIBB对象:
7.添加UIBB配置对象,点击UIBB配置:
8。输入FEEDER类,配置UIBB
9.添加字段:
10.运行:
以上是关于FPM十:FORM Repeater的主要内容,如果未能解决你的问题,请参考以下文章