• 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.运行:

  • 相关阅读:
    一个简单的makefile,一次性编译本文件夹下所有的cpp文件
    c++ 最短路两种算法
    C++语言十进制数,CDecimal(未完成)
    C语言面向对象的简便方法
    C语言2048
    C图书借还示例
    Javascript 备忘
    原型与原型链
    css3动画-跳动圈
    学习css3动画
  • 原文地址:https://www.cnblogs.com/sapSB/p/11577293.html
Copyright © 2020-2023  润新知