FPM 快速报表开发

背景:

        使用FPM开发报表时,如果报表字段过多,页面拖拽等操作不方便

        报表数量过多时,新建应用操作步骤较为繁琐

        更习惯通过少量代码而非页面操作去实现功能

处理:

        将FPM报表开发简化为类似GUI端ALV的开发过程::定义数据对象,选择屏幕;数据处理;报表展示控制

        需要继承基础类并重写对应方法,复制或新建FPM应用,使用新报表对应的类

        可扩展实现一个FPM应用根据不同的URL参数,来展示报表

        可添加权限,数据源可配置等功能,作为报表中心

如下以新建FPM应用为例(可直接拉至文末查看代码)

1. 使用事务代码FPM_WB打开FPM应用新建页面

 2. 填写应用命名

3. 创建应用

4. 创建search UIBB 和list UIBB并填写feeder 类

6. 测试应用

Feeder 类代码部分:

 代码:
CLASS zcl_sample_report_base DEFINITION
  PUBLIC
  CREATE PUBLIC .

  PUBLIC SECTION.

    INTERFACES if_fpm_guibb .
    INTERFACES if_fpm_guibb_search .
    INTERFACES if_fpm_guibb_list .
    INTERFACES if_fpm_guibb_dynamic_config .
protected section.

  types:
    BEGIN OF ty_layout,
        visible_row_counts    TYPE fpmgb_row_count, " 列表行数
        title                 TYPE wdy_conf_transl_text, " title
        allow_personalization TYPE fpmgb_allow_pers_ats,
        allow_sorting         TYPE fpmgb_allow_sorting_ats,
        allow_filtering       TYPE fpmgb_allow_filtering_ats,
        allow_grouping        TYPE fpmgb_allow_grouping_ats,
        scroll_mode           TYPE fpm_s_table_settings-scroll_mode, " S: 滚动 P; 分页 默认滚动
        export_to_excel       TYPE fpmgb_excel_export, " 允许导出Excel
        fit_to_table_width    TYPE fpmgb_fit_table_width, " 自适应列宽,为X 时,无横向滚动条,数据条目较多时体验较
      END OF ty_layout .
  types:
    BEGIN OF ty_search_fields,
        name           TYPE name_komp,   " 搜索条件字段
        type           TYPE string,      " 参考数据类型
        text           TYPE string,      " 搜索条件文本
        obligatory     TYPE boole_d,     " 是否必输
        no_intervals   TYPE boole_d,     " 是否无间隔
        no_extension   TYPE boole_d,     " 是否无扩展,即多行
        ddic_shlp_name TYPE shlpname,    " 是否无扩展,即多行
        list_box       TYPE fpmgb_t_namevalue, " 下拉框值
      END OF ty_search_fields .
  types:
    tt_search_fields TYPE TABLE OF ty_search_fields .

  methods START_OF_SELECTION
    importing
      !FIELD_SELECTION type RCF_T_FIELD_SELECTION
    exporting
      !ET_MESSAGES type FPMGB_SEARCH_T_T100_MESSAGE
      !DATA type DATA .
  methods DATA_DEFINE_AND_SELECT_SCREEN
    exporting
      !SELECT_FIELDS type TT_SEARCH_FIELDS
      !FIELDCAT type LVC_T_FCAT
      !LAUOUT type TY_LAYOUT
      !OUT_TYPE_STRUC type STRING .
private section.
  data GO_LIST_TAB type ref to DATA .
  data GO_SEARCH_STRU type ref to DATA .
  data GT_SEARCH_FIELD_DESC type FPMGB_T_SEARCHFIELD_DESCR .
  data GT_FCAT type LVC_T_FCAT .
  data GS_LAYOUT type TY_LAYOUT .
  data MR_FPM type ref to IF_FPM .
  data GV_CONFIG_ID type WDY_CONFIG_ID .
  data GT_COMPS_SEARCH type ABAP_COMPONENT_TAB .

  methods ADD_COMP_BY_DATA
    importing
      !P_DATA type ANY
      !IV_NAME type STRING
      !IV_AS_INCLUDE type ABAP_BOOL optional
      !IV_SUFFIX type C optional
    changing
      !CT_COMP type ABAP_COMPONENT_TAB .
  methods ADD_COMP_BY_NAME
    importing
      !P_NAME type ANY
      !IV_NAME type STRING
      !IV_AS_INCLUDE type ABAP_BOOL optional
      !IV_SUFFIX type C optional
    changing
      !CT_COMP type ABAP_COMPONENT_TAB .
  methods CREATE_STRUCT
    importing
      !IT_COMP type ABAP_COMPONENT_TAB
    returning
      value(RO_DATA) type ref to DATA .
  methods GET_SEARCH_RANGE
    importing
      !IT_FPM_SEARCH_CRITERIA type FPMGB_T_SEARCH_CRITERIA
      !IO_SEARCH_CONVERSION type ref to IF_FPM_GUIBB_SEARCH_CONVERSION
    returning
      value(FIELD_SELECTION) type RCF_T_FIELD_SELECTION .
  methods ADD_SELECTION_OPTION
    importing
      !NAME type NAME_KOMP
      !TYPE type STRING
      !TEXT type STRING
      !OBLIGATORY type BOOLE_D optional
      !NO_INTERVALS type BOOLE_D optional
      !NO_EXTENSION type BOOLE_D optional
      !DDIC_SHLP_NAME type SHLPNAME optional
      !LIST_BOX type FPMGB_T_NAMEVALUE optional .
ENDCLASS.



CLASS ZCL_SAMPLE_REPORT_BASE IMPLEMENTATION.


* <SIGNATURE>---------------------------------------------------------------------------------------+
* | Instance Private Method ZCL_SAMPLE_REPORT_BASE->ADD_COMP_BY_DATA
* +-------------------------------------------------------------------------------------------------+
* | [--->] P_DATA                         TYPE        ANY
* | [--->] IV_NAME                        TYPE        STRING
* | [--->] IV_AS_INCLUDE                  TYPE        ABAP_BOOL(optional)
* | [--->] IV_SUFFIX                      TYPE        C(optional)
* | [<-->] CT_COMP                        TYPE        ABAP_COMPONENT_TAB
* +--------------------------------------------------------------------------------------</SIGNATURE>
  METHOD add_comp_by_data.

    DATA ls_comp LIKE LINE OF ct_comp.

    ls_comp-type        ?= cl_abap_typedescr=>describe_by_data(  p_data  = p_data ).
    ls_comp-name         = iv_name.
    ls_comp-as_include   = iv_as_include.
    ls_comp-suffix       = iv_suffix.
    APPEND ls_comp TO ct_comp.

  ENDMETHOD.


* <SIGNATURE>---------------------------------------------------------------------------------------+
* | Instance Private Method ZCL_SAMPLE_REPORT_BASE->ADD_COMP_BY_NAME
* +-------------------------------------------------------------------------------------------------+
* | [--->] P_NAME                         TYPE        ANY
* | [--->] IV_NAME                        TYPE        STRING
* | [--->] IV_AS_INCLUDE                  TYPE        ABAP_BOOL(optional)
* | [--->] IV_SUFFIX                      TYPE        C(optional)
* | [<-->] CT_COMP                        TYPE        ABAP_COMPONENT_TAB
* +--------------------------------------------------------------------------------------</SIGNATURE>
 METHOD add_comp_by_name.

    DATA ls_comp LIKE LINE OF ct_comp.
    DATA lo_type TYPE REF TO cl_abap_typedescr.

    cl_abap_typedescr=>describe_by_name( EXPORTING p_name  = p_name RECEIVING p_descr_ref = lo_type EXCEPTIONS type_not_found = 1 ).

    IF sy-subrc = 1." If P_NAME not exist, Using string type
      cl_abap_typedescr=>describe_by_name( EXPORTING p_name  = 'SMDSTRING'  RECEIVING p_descr_ref = lo_type EXCEPTIONS type_not_found = 1 ).
    ENDIF.

    ls_comp-type         ?= lo_type.
    ls_comp-name         = iv_name.
    ls_comp-as_include   = iv_as_include.
    ls_comp-suffix       = iv_suffix.
    APPEND ls_comp TO ct_comp.

  ENDMETHOD.


* <SIGNATURE>---------------------------------------------------------------------------------------+
* | Instance Private Method ZCL_SAMPLE_REPORT_BASE->ADD_SELECTION_OPTION
* +-------------------------------------------------------------------------------------------------+
* | [--->] NAME                           TYPE        NAME_KOMP
* | [--->] TYPE                           TYPE        STRING
* | [--->] TEXT                           TYPE        STRING
* | [--->] OBLIGATORY                     TYPE        BOOLE_D(optional)
* | [--->] NO_INTERVALS                   TYPE        BOOLE_D(optional)
* | [--->] NO_EXTENSION                   TYPE        BOOLE_D(optional)
* | [--->] DDIC_SHLP_NAME                 TYPE        SHLPNAME(optional)
* | [--->] LIST_BOX                       TYPE        FPMGB_T_NAMEVALUE(optional)
* +--------------------------------------------------------------------------------------</SIGNATURE>
  METHOD add_selection_option.

    DATA: ls_descr_attr TYPE fpmgb_s_searchfield_descr.
    DATA: lt_oper TYPE fpmgb_t_search_operator,
          ls_oper TYPE LINE OF fpmgb_t_search_operator.

    CLEAR: ls_descr_attr.
    ls_descr_attr-name            = name.
    ls_descr_attr-text            = text.
    ls_descr_attr-ddic_shlp_name  = ddic_shlp_name.
    ls_descr_attr-mandatory       = obligatory.
    ls_descr_attr-max_1_value     = no_extension.

    IF list_box IS NOT INITIAL.
      ls_descr_attr-enumeration     = list_box.
      ls_descr_attr-is_of_type = if_fpm_guibb_search=>gc_attribute_types-enumeration.
    ENDIF.

    ls_descr_attr-ignore_standard_operators = abap_true.

    IF no_intervals <> abap_true.
      CLEAR ls_oper.
      ls_oper-operator_id = if_fpm_guibb_search=>gc_operators-is_between.
      APPEND ls_oper TO lt_oper.
    ENDIF.

    CLEAR ls_oper.
    ls_oper-operator_id = if_fpm_guibb_search=>gc_operators-is.
    APPEND ls_oper TO lt_oper.

    ls_descr_attr-include_operators = lt_oper.
    APPEND ls_descr_attr to gt_search_field_desc.

    add_comp_by_name( EXPORTING p_name = type iv_name = CONV string( name ) CHANGING ct_comp = gt_comps_search ).

  ENDMETHOD.


* <SIGNATURE>---------------------------------------------------------------------------------------+
* | Instance Private Method ZCL_SAMPLE_REPORT_BASE->CREATE_STRUCT
* +-------------------------------------------------------------------------------------------------+
* | [--->] IT_COMP                        TYPE        ABAP_COMPONENT_TAB
* | [<-()] RO_DATA                        TYPE REF TO DATA
* +--------------------------------------------------------------------------------------</SIGNATURE>
  METHOD create_struct.

    DATA lr_struct TYPE REF TO cl_abap_structdescr.
    lr_struct = cl_abap_structdescr=>create( EXPORTING p_components = it_comp ) .
    CREATE DATA ro_data TYPE HANDLE lr_struct.

  ENDMETHOD.


* <SIGNATURE>---------------------------------------------------------------------------------------+
* | Instance Protected Method ZCL_SAMPLE_REPORT_BASE->DATA_DEFINE_AND_SELECT_SCREEN
* +-------------------------------------------------------------------------------------------------+
* | [<---] SELECT_FIELDS                  TYPE        TT_SEARCH_FIELDS
* | [<---] FIELDCAT                       TYPE        LVC_T_FCAT
* | [<---] LAUOUT                         TYPE        TY_LAYOUT
* | [<---] OUT_TYPE_STRUC                 TYPE        STRING
* +--------------------------------------------------------------------------------------</SIGNATURE>
  METHOD data_define_and_select_screen.
*----------------------------------------------------------------------*
*  SELECT_FIELDS 选择屏幕定义
*  FIELDCAT 报表字段属性,无定义由字段参考数据元素获取
*  LAUOUT 报表展示布局
*  OUT_TYPE_STRUC 报表展示数据结构 ===By Fireworks xie
*----------------------------------------------------------------------*

*    DATA: lt_list_box TYPE fpmgb_t_namevalue.
*
*    lt_list_box = VALUE #( ( name = '中国' value = 'CN' )
*                           ( name = '美国' value = 'US' )
*                           ( name = '德国' value = 'DE' ) ).
*
*    " 选择屏幕设置
*    APPEND VALUE #( name = 'BUKRS' type = 'BUKRS' text = '公司代码'  ) TO select_fields.
*    APPEND VALUE #( name = 'DATUM' type = 'DATUM' text = '日期'  ) TO select_fields.
*    APPEND VALUE #( name = 'LAND1' type = 'LAND1' text = '国家' list_box = lt_list_box ) TO select_fields.
*
*    " 报表展示字段及属性
*    APPEND VALUE #( fieldname = 'BUTXT' reptext = '公司名称' intlen = 40 ) TO fieldcat.
*
*    " 输出报表格式
*    lauout-title                  = 'Company'.
*    lauout-fit_to_table_width     = abap_true.
*    lauout-allow_personalization  = abap_true.
*    lauout-export_to_excel        = abap_true.
*
*    " 输出报表数据结构
*    out_type_struc = 'ZCL_SAMPLE_REPORT_SAMPLE01=>TY_OUT'.

  ENDMETHOD.


* <SIGNATURE>---------------------------------------------------------------------------------------+
* | Instance Private Method ZCL_SAMPLE_REPORT_BASE->GET_SEARCH_RANGE
* +-------------------------------------------------------------------------------------------------+
* | [--->] IT_FPM_SEARCH_CRITERIA         TYPE        FPMGB_T_SEARCH_CRITERIA
* | [--->] IO_SEARCH_CONVERSION           TYPE REF TO IF_FPM_GUIBB_SEARCH_CONVERSION
* | [<-()] FIELD_SELECTION                TYPE        RCF_T_FIELD_SELECTION
* +--------------------------------------------------------------------------------------</SIGNATURE>
  METHOD get_search_range.

    DATA: lt_fpm_search_criteria TYPE fpmgb_t_search_criteria,
          ls_crit                TYPE rcf_s_field_selection.

    DATA:  lr_range_tab_ref TYPE REF TO data.

    FIELD-SYMBOLS:
      <fpmgb_s_search_criteria> TYPE fpmgb_s_search_criteria,
      <lt_range>                TYPE ANY TABLE,
      <lv_value>                TYPE data,
      <ls_range>                TYPE data.

    lt_fpm_search_criteria = it_fpm_search_criteria.
    SORT lt_fpm_search_criteria STABLE BY search_attribute ASCENDING.

    CLEAR field_selection .
    LOOP AT lt_fpm_search_criteria ASSIGNING <fpmgb_s_search_criteria>.
      AT NEW search_attribute.
        "first: create reference for range
        io_search_conversion->create_abap_range_ref( EXPORTING iv_search_attribute = <fpmgb_s_search_criteria>-search_attribute
                                                     IMPORTING er_range_tab_ref    = lr_range_tab_ref ).

        "second: fill range
        io_search_conversion->fpm_attribute_into_abap_range( EXPORTING iv_search_attribute = <fpmgb_s_search_criteria>-search_attribute
                                                             IMPORTING et_range_tab_ref    = lr_range_tab_ref ).

        "third: create field ranges that are needed for function module below
        ASSIGN lr_range_tab_ref->* TO <lt_range>.
        LOOP AT <lt_range> ASSIGNING <ls_range>.
          CLEAR: ls_crit.
          ls_crit-fieldname = <fpmgb_s_search_criteria>-search_attribute.
          ASSIGN COMPONENT 'SIGN' OF STRUCTURE <ls_range> TO <lv_value>.
          CHECK sy-subrc = 0.
          ls_crit-sign = <lv_value>.
          ASSIGN COMPONENT 'OPTION' OF STRUCTURE <ls_range> TO <lv_value>.
          CHECK sy-subrc = 0.
          ls_crit-option = <lv_value>.
          ASSIGN COMPONENT 'LOW' OF STRUCTURE <ls_range> TO <lv_value>.
          IF sy-subrc = 0.
            ls_crit-low = <lv_value>.
          ENDIF.
          ASSIGN COMPONENT 'HIGH' OF STRUCTURE <ls_range> TO <lv_value>.
          IF sy-subrc = 0.
            ls_crit-high = <lv_value>.
          ENDIF.
          APPEND ls_crit TO field_selection .
        ENDLOOP.

      ENDAT.
    ENDLOOP.

  ENDMETHOD.


* <SIGNATURE>---------------------------------------------------------------------------------------+
* | Instance Public Method ZCL_SAMPLE_REPORT_BASE->IF_FPM_GUIBB_DYNAMIC_CONFIG~HAS_DYNAMIC_CONFIGURATION
* +-------------------------------------------------------------------------------------------------+
* | [<-()] RV_HAS_DYNAMIC_CONFIGURATION   TYPE        ABAP_BOOL
* +--------------------------------------------------------------------------------------</SIGNATURE>
  METHOD if_fpm_guibb_dynamic_config~has_dynamic_configuration.
    rv_has_dynamic_configuration  = abap_true.
  ENDMETHOD.


* <SIGNATURE>---------------------------------------------------------------------------------------+
* | Instance Public Method ZCL_SAMPLE_REPORT_BASE->IF_FPM_GUIBB_LIST~CHECK_CONFIG
* +-------------------------------------------------------------------------------------------------+
* | [--->] IO_LAYOUT_CONFIG               TYPE REF TO IF_FPM_GUIBB_LIST_CONFIG
* | [<---] ET_MESSAGES                    TYPE        FPMGB_T_MESSAGES
* +--------------------------------------------------------------------------------------</SIGNATURE>
  METHOD if_fpm_guibb_list~check_config.
  ENDMETHOD.


* <SIGNATURE>---------------------------------------------------------------------------------------+
* | Instance Public Method ZCL_SAMPLE_REPORT_BASE->IF_FPM_GUIBB_LIST~FLUSH
* +-------------------------------------------------------------------------------------------------+
* | [--->] IT_CHANGE_LOG                  TYPE        FPMGB_T_CHANGELOG
* | [--->] IT_DATA                        TYPE REF TO DATA
* | [--->] IV_OLD_LEAD_SEL                TYPE        I(optional)
* | [--->] IV_NEW_LEAD_SEL                TYPE        I(optional)
* +--------------------------------------------------------------------------------------</SIGNATURE>
  METHOD if_fpm_guibb_list~flush.
  ENDMETHOD.


* <SIGNATURE>---------------------------------------------------------------------------------------+
* | Instance Public Method ZCL_SAMPLE_REPORT_BASE->IF_FPM_GUIBB_LIST~GET_DATA
* +-------------------------------------------------------------------------------------------------+
* | [--->] IV_EVENTID                     TYPE REF TO CL_FPM_EVENT
* | [--->] IT_SELECTED_FIELDS             TYPE        FPMGB_T_SELECTED_FIELDS(optional)
* | [--->] IV_RAISED_BY_OWN_UI            TYPE        BOOLE_D(optional)
* | [--->] IV_VISIBLE_ROWS                TYPE        I(optional)
* | [--->] IV_EDIT_MODE                   TYPE        FPM_EDIT_MODE(optional)
* | [--->] IO_EXTENDED_CTRL               TYPE REF TO IF_FPM_LIST_ATS_EXT_CTRL(optional)
* | [<---] ET_MESSAGES                    TYPE        FPMGB_T_MESSAGES
* | [<---] EV_DATA_CHANGED                TYPE        BOOLE_D
* | [<---] EV_FIELD_USAGE_CHANGED         TYPE        BOOLE_D
* | [<---] EV_ACTION_USAGE_CHANGED        TYPE        BOOLE_D
* | [<---] EV_SELECTED_LINES_CHANGED      TYPE        BOOLE_D
* | [<---] EV_DND_ATTR_CHANGED            TYPE        BOOLE_D
* | [<---] EO_ITAB_CHANGE_LOG             TYPE REF TO IF_SALV_ITAB_CHANGE_LOG
* | [<-->] CT_DATA                        TYPE        DATA
* | [<-->] CT_FIELD_USAGE                 TYPE        FPMGB_T_FIELDUSAGE
* | [<-->] CT_ACTION_USAGE                TYPE        FPMGB_T_ACTIONUSAGE
* | [<-->] CT_SELECTED_LINES              TYPE        RSTABIXTAB
* | [<-->] CV_LEAD_INDEX                  TYPE        SYTABIX
* | [<-->] CV_FIRST_VISIBLE_ROW           TYPE        I
* | [<-->] CS_ADDITIONAL_INFO             TYPE        FPMGB_S_ADDITIONAL_INFO(optional)
* | [<-->] CT_DND_ATTRIBUTES              TYPE        FPMGB_T_DND_DEFINITION(optional)
* +--------------------------------------------------------------------------------------</SIGNATURE>
  METHOD if_fpm_guibb_list~get_data.

    FIELD-SYMBOLS <fs_table> TYPE STANDARD TABLE.

    ASSIGN go_list_tab->* TO <fs_table>.

    IF ct_data <> <fs_table>.
      ct_data = <fs_table>.
      ev_data_changed = abap_true.
    ENDIF.

  ENDMETHOD.


* <SIGNATURE>---------------------------------------------------------------------------------------+
* | Instance Public Method ZCL_SAMPLE_REPORT_BASE->IF_FPM_GUIBB_LIST~GET_DEFAULT_CONFIG
* +-------------------------------------------------------------------------------------------------+
* | [--->] IO_LAYOUT_CONFIG               TYPE REF TO IF_FPM_GUIBB_LIST_CONFIG
* +--------------------------------------------------------------------------------------</SIGNATURE>
  METHOD if_fpm_guibb_list~get_default_config.

    DATA: lv_column_id  TYPE fpm_element_id,
          lv_index      TYPE i,
          lv_fix        TYPE fpmgb_list_ats_fixation,
          lv_visibility TYPE fpmgb_column_visibility.

    IF io_layout_config IS NOT INITIAL.
      LOOP AT gt_fcat INTO DATA(ls_fcat).
        lv_index = lv_index + 1.

        IF ls_fcat-fix_column = abap_true.
          lv_fix = '02'.
        ELSE.
          lv_fix = '01'.
        ENDIF.

        IF ls_fcat-no_out = 'X'.
          lv_visibility = '01'.
        ELSE.
          lv_visibility = ''.
        ENDIF.

        TRY.
            lv_column_id = io_layout_config->add_column(
               EXPORTING
                 iv_name         = ls_fcat-fieldname
                 iv_display_type = 'TV'
                 iv_index        = lv_index
                 iv_header       = CONV string( ls_fcat-reptext )
                 iv_width        = CONV string( ls_fcat-intlen )
                 iv_tooltip      = CONV string( ls_fcat-scrtext_l )
                 iv_visibility   = lv_visibility
                 iv_fixed        = lv_fix
                 ).
          CATCH cx_fpm_configuration .
        ENDTRY.

      ENDLOOP.

    ENDIF.

    CALL METHOD io_layout_config->set_settings
      EXPORTING
        iv_visible_row_counts    = gs_layout-visible_row_counts
        iv_allow_personalization = gs_layout-allow_personalization
        iv_allow_sorting         = gs_layout-allow_sorting
        iv_allow_filtering       = gs_layout-allow_filtering
        iv_allow_grouping        = gs_layout-allow_grouping
        iv_scroll_mode           = gs_layout-scroll_mode
        iv_export_to_excel       = gs_layout-export_to_excel
        iv_is_search_result_list = abap_true
        iv_fit_to_table_width    = gs_layout-fit_to_table_width
        iv_allow_search          = abap_true.

    mr_fpm->set_application_title( gs_layout-title ).

  ENDMETHOD.


* <SIGNATURE>---------------------------------------------------------------------------------------+
* | Instance Public Method ZCL_SAMPLE_REPORT_BASE->IF_FPM_GUIBB_LIST~GET_DEFINITION
* +-------------------------------------------------------------------------------------------------+
* | [<---] EO_FIELD_CATALOG               TYPE REF TO CL_ABAP_TABLEDESCR
* | [<---] ET_FIELD_DESCRIPTION           TYPE        FPMGB_T_LISTFIELD_DESCR
* | [<---] ET_ACTION_DEFINITION           TYPE        FPMGB_T_ACTIONDEF
* | [<---] ET_SPECIAL_GROUPS              TYPE        FPMGB_T_SPECIAL_GROUPS
* | [<---] ES_MESSAGE                     TYPE        FPMGB_S_T100_MESSAGE
* | [<---] EV_ADDITIONAL_ERROR_INFO       TYPE        DOKU_OBJ
* | [<---] ET_DND_DEFINITION              TYPE        FPMGB_T_DND_DEFINITION
* | [<---] ET_ROW_ACTIONS                 TYPE        FPMGB_T_ROW_ACTION
* | [<---] ES_OPTIONS                     TYPE        FPMGB_S_LIST_OPTIONS
* +--------------------------------------------------------------------------------------</SIGNATURE>
  METHOD if_fpm_guibb_list~get_definition.

*&---------------------------------------------------------------------*
*&  1. 定义页面元素,按钮等
*&---------------------------------------------------------------------*
    DATA: ls_field_description TYPE fpmgb_s_formfield_descr,
          ls_action            TYPE fpmgb_s_actiondef,
          lt_component         TYPE abap_compdescr_tab,
          ls_component         TYPE abap_compdescr,
          lo_struc             TYPE REF TO cl_abap_structdescr,
          ls_field_descr       LIKE LINE OF et_field_description.

    DEFINE mcr_actions.
      ls_action-id      = &1.
      ls_action-text    = &2.
      ls_action-enabled = abap_true.
      APPEND ls_action TO et_action_definition.
      CLEAR ls_action.
    END-OF-DEFINITION.

    eo_field_catalog ?= cl_abap_typedescr=>describe_by_data_ref( go_list_tab ).
    lo_struc         ?= eo_field_catalog->get_table_line_type( ).
    IF lo_struc->components IS NOT INITIAL.
      et_field_description = VALUE #( FOR <ls_struc_component> IN lo_struc->components
        (
            name          = <ls_struc_component>-name
            allow_sort    = abap_true
            allow_filter  = abap_true
        )
      ).
    ENDIF.

  ENDMETHOD.


* <SIGNATURE>---------------------------------------------------------------------------------------+
* | Instance Public Method ZCL_SAMPLE_REPORT_BASE->IF_FPM_GUIBB_LIST~PROCESS_EVENT
* +-------------------------------------------------------------------------------------------------+
* | [--->] IO_EVENT                       TYPE REF TO CL_FPM_EVENT
* | [--->] IV_RAISED_BY_OWN_UI            TYPE        BOOLE_D(optional)
* | [--->] IV_LEAD_INDEX                  TYPE        SYTABIX
* | [--->] IV_EVENT_INDEX                 TYPE        SYTABIX
* | [--->] IT_SELECTED_LINES              TYPE        RSTABIXTAB
* | [--->] IO_UI_INFO                     TYPE REF TO IF_FPM_LIST_ATS_UI_INFO(optional)
* | [<---] EV_RESULT                      TYPE        FPM_EVENT_RESULT
* | [<---] ET_MESSAGES                    TYPE        FPMGB_T_MESSAGES
* +--------------------------------------------------------------------------------------</SIGNATURE>
  METHOD if_fpm_guibb_list~process_event.
  ENDMETHOD.


* <SIGNATURE>---------------------------------------------------------------------------------------+
* | Instance Public Method ZCL_SAMPLE_REPORT_BASE->IF_FPM_GUIBB_SEARCH~CHECK_CONFIG
* +-------------------------------------------------------------------------------------------------+
* | [--->] IO_LAYOUT_CONFIG               TYPE REF TO IF_FPM_GUIBB_SEARCH_CONFIG
* | [<---] ET_MESSAGES                    TYPE        FPMGB_T_MESSAGES
* +--------------------------------------------------------------------------------------</SIGNATURE>
  METHOD if_fpm_guibb_search~check_config.
  ENDMETHOD.


* <SIGNATURE>---------------------------------------------------------------------------------------+
* | Instance Public Method ZCL_SAMPLE_REPORT_BASE->IF_FPM_GUIBB_SEARCH~FLUSH
* +-------------------------------------------------------------------------------------------------+
* | [--->] IT_FPM_SEARCH_CRITERIA         TYPE        FPMGB_T_SEARCH_CRITERIA
* | [--->] IV_MAX_NUM_RESULTS             TYPE        I
* | [--->] IT_SELECTED_LINES_OF_RESULT    TYPE        T_RESULT
* | [--->] IV_RESULT_LEAD_SEL             TYPE        I(optional)
* | [--->] IO_SEARCH_CONVERSION           TYPE REF TO IF_FPM_GUIBB_SEARCH_CONVERSION(optional)
* +--------------------------------------------------------------------------------------</SIGNATURE>
  METHOD if_fpm_guibb_search~flush.
  ENDMETHOD.


* <SIGNATURE>---------------------------------------------------------------------------------------+
* | Instance Public Method ZCL_SAMPLE_REPORT_BASE->IF_FPM_GUIBB_SEARCH~GET_DATA
* +-------------------------------------------------------------------------------------------------+
* | [--->] IO_EVENT                       TYPE REF TO CL_FPM_EVENT
* | [--->] IV_RAISED_BY_OWN_UI            TYPE        BOOLE_D
* | [--->] IT_VISIBLE_ATTRIBUTES          TYPE        FPMGB_T_SELECTED_FIELDS
* | [--->] IT_SELECTED_COLUMNS_OF_RESULT  TYPE        FPMGB_T_SELECTED_FIELDS
* | [--->] IT_SELECTED_SEARCH_ATTRIBUTES  TYPE        FPMGB_T_SELECTED_FIELDS
* | [--->] IO_SEARCH_CONVERSION           TYPE REF TO IF_FPM_GUIBB_SEARCH_CONVERSION(optional)
* | [<---] ET_MESSAGES                    TYPE        FPMGB_SEARCH_T_T100_MESSAGE
* | [<---] EV_SEARCH_CRITERIA_CHANGED     TYPE        BOOLE_D
* | [<---] ET_RESULT_LIST                 TYPE        DATA
* | [<---] EV_RESULT_LIST_TITLE           TYPE        STRING
* | [<---] EV_FIELD_USAGE_CHANGED         TYPE        WDY_BOOLEAN
* | [<-->] CT_FPM_SEARCH_CRITERIA         TYPE        FPMGB_T_SEARCH_CRITERIA
* | [<-->] CT_FIELD_USAGE                 TYPE        FPMGB_T_SEARCH_FIELDUSAGE(optional)
* +--------------------------------------------------------------------------------------</SIGNATURE>
  METHOD if_fpm_guibb_search~get_data.
  ENDMETHOD.


* <SIGNATURE>---------------------------------------------------------------------------------------+
* | Instance Public Method ZCL_SAMPLE_REPORT_BASE->IF_FPM_GUIBB_SEARCH~GET_DEFAULT_CONFIG
* +-------------------------------------------------------------------------------------------------+
* | [--->] IO_LAYOUT_CONFIG               TYPE REF TO IF_FPM_GUIBB_SEARCH_CONFIG
* +--------------------------------------------------------------------------------------</SIGNATURE>
  METHOD if_fpm_guibb_search~get_default_config.

    DATA: lv_index TYPE i,
          lv_colum TYPE fpm_element_id.

    IF io_layout_config IS NOT INITIAL.
      LOOP AT gt_search_field_desc INTO DATA(ls_search_field_desc).
        lv_index = lv_index + 1.

        lv_colum = io_layout_config->add_attribute(
          EXPORTING
            iv_name             = ls_search_field_desc-name
            iv_index            = lv_index
            iv_text             = ls_search_field_desc-text
            )
            .

      ENDLOOP.

      CALL METHOD io_layout_config->set_settings
        EXPORTING
          iv_number_of_query_lines     = 6
          iv_show_button_reset         = '01'
          iv_show_max_num_result_field = '01'
          iv_allow_personalization     = '01'
          iv_check_mandatory           = 'X'
          iv_allow_easy_search         = abap_true.

    ENDIF.

  ENDMETHOD.


* <SIGNATURE>---------------------------------------------------------------------------------------+
* | Instance Public Method ZCL_SAMPLE_REPORT_BASE->IF_FPM_GUIBB_SEARCH~GET_DEFINITION
* +-------------------------------------------------------------------------------------------------+
* | [<---] EO_FIELD_CATALOG_ATTR          TYPE REF TO CL_ABAP_STRUCTDESCR
* | [<---] ET_FIELD_DESCRIPTION_ATTR      TYPE        FPMGB_T_SEARCHFIELD_DESCR
* | [<---] EO_FIELD_CATALOG_RESULT        TYPE REF TO CL_ABAP_TABLEDESCR
* | [<---] ET_FIELD_DESCRIPTION_RESULT    TYPE        FPMGB_T_SEARCHRESULT_DESCR
* | [<---] EV_RESULT_TABLE_SELECTION_MODE TYPE        WDUI_TSMODE
* | [<---] ES_MESSAGE                     TYPE        FPMGB_S_T100_MESSAGE
* | [<---] EV_ADDITIONAL_ERROR_INFO       TYPE        DOKU_OBJ
* | [<---] ES_OPTIONS                     TYPE        FPMGB_S_SEARCH_OPTIONS
* | [<---] ET_ACTION_DEFINITION           TYPE        FPMGB_T_ACTIONDEF
* | [<---] ET_SPECIAL_GROUPS              TYPE        FPMGB_T_SPECIAL_GROUPS
* +--------------------------------------------------------------------------------------</SIGNATURE>
  METHOD if_fpm_guibb_search~get_definition.

    eo_field_catalog_attr ?= cl_abap_structdescr=>describe_by_data_ref( go_search_stru ).
    et_field_description_attr = gt_search_field_desc.

  ENDMETHOD.


* <SIGNATURE>---------------------------------------------------------------------------------------+
* | Instance Public Method ZCL_SAMPLE_REPORT_BASE->IF_FPM_GUIBB_SEARCH~PROCESS_EVENT
* +-------------------------------------------------------------------------------------------------+
* | [--->] IO_EVENT                       TYPE REF TO CL_FPM_EVENT
* | [--->] IT_FPM_SEARCH_CRITERIA         TYPE        FPMGB_T_SEARCH_CRITERIA
* | [--->] IV_RAISED_BY_OWN_UI            TYPE        BOOLE_D
* | [--->] IV_MAX_NUM_RESULTS             TYPE        I
* | [--->] IO_SEARCH_CONVERSION           TYPE REF TO IF_FPM_GUIBB_SEARCH_CONVERSION(optional)
* | [<---] ET_MESSAGES                    TYPE        FPMGB_SEARCH_T_T100_MESSAGE
* | [<---] EV_RESULT                      TYPE        FPM_EVENT_RESULT
* +--------------------------------------------------------------------------------------</SIGNATURE>
  METHOD if_fpm_guibb_search~process_event.

    DATA: lt_field_selection TYPE rcf_t_field_selection .

    FIELD-SYMBOLS: <fs_data> TYPE STANDARD TABLE.

    ASSIGN go_list_tab->* TO <fs_data>.

    get_search_range(
      EXPORTING
        it_fpm_search_criteria = it_fpm_search_criteria
        io_search_conversion   = io_search_conversion
      RECEIVING
        field_selection        = lt_field_selection
        ).

    CALL METHOD me->start_of_selection
      EXPORTING
        field_selection = lt_field_selection
      IMPORTING
        et_messages     = et_messages
        data            = <fs_data>.

    READ TABLE et_messages TRANSPORTING NO FIELDS with KEY severity = 'E'.
    IF SY-SUBRC = 0.
      ev_result = 'FAILED'.
    ENDIF.

  ENDMETHOD.


* <SIGNATURE>---------------------------------------------------------------------------------------+
* | Instance Public Method ZCL_SAMPLE_REPORT_BASE->IF_FPM_GUIBB~GET_PARAMETER_LIST
* +-------------------------------------------------------------------------------------------------+
* | [<-()] RT_PARAMETER_DESCR             TYPE        FPMGB_T_PARAM_DESCR
* +--------------------------------------------------------------------------------------</SIGNATURE>
  METHOD if_fpm_guibb~get_parameter_list.
  ENDMETHOD.


* <SIGNATURE>---------------------------------------------------------------------------------------+
* | Instance Public Method ZCL_SAMPLE_REPORT_BASE->IF_FPM_GUIBB~INITIALIZE
* +-------------------------------------------------------------------------------------------------+
* | [--->] IT_PARAMETER                   TYPE        FPMGB_T_PARAM_VALUE
* | [--->] IO_APP_PARAMETER               TYPE REF TO IF_FPM_PARAMETER(optional)
* | [--->] IV_COMPONENT_NAME              TYPE        FPM_COMPONENT_NAME(optional)
* | [--->] IS_CONFIG_KEY                  TYPE        WDY_CONFIG_KEY(optional)
* | [--->] IV_INSTANCE_ID                 TYPE        FPM_INSTANCE_ID(optional)
* +--------------------------------------------------------------------------------------</SIGNATURE>
  METHOD if_fpm_guibb~initialize.

    DATA: lt_select_fields  TYPE tt_search_fields,
          lt_fieldcat        TYPE lvc_t_fcat,
          ls_lauout          TYPE ty_layout,
          lv_out_type_struc  TYPE string.

    DATA: lr_tabdescr  TYPE REF TO cl_abap_tabledescr,
          lr_strudescr TYPE REF TO cl_abap_structdescr,
          lt_dfies     TYPE ddfields,
          ls_dfies     TYPE dfies,
          ls_fieldcat  TYPE lvc_s_fcat.

    CHECK go_search_stru IS INITIAL AND go_list_tab IS INITIAL.

    CLEAR: gt_comps_search,gt_fcat,gt_search_field_desc,gv_config_id,gs_layout.

    IF mr_fpm IS INITIAL.
      mr_fpm = cl_fpm=>get_instance( ).
    ENDIF.

    " 1. 搜索条件字段
    " 2. 报表字段结构及属性,fieldcat 中没设置属性的字段,使用参考数据对象属性
    " 3. 报表展示格式
    data_define_and_select_screen(
        IMPORTING
          select_fields  = lt_select_fields
          fieldcat       = lt_fieldcat
          lauout         = ls_lauout
          out_type_struc = lv_out_type_struc
          ).

    LOOP AT lt_select_fields INTO DATA(ls_select_fields).
      CALL METHOD me->add_selection_option
        EXPORTING
          name           = ls_select_fields-name
          type           = ls_select_fields-type
          text           = ls_select_fields-text
          obligatory     = ls_select_fields-obligatory
          no_intervals   = ls_select_fields-no_intervals
          no_extension   = ls_select_fields-no_extension
          ddic_shlp_name = ls_select_fields-ddic_shlp_name
          list_box       = ls_select_fields-list_box.
    ENDLOOP.

    gs_layout = ls_lauout.

    go_search_stru = create_struct( it_comp = gt_comps_search ).

    CREATE DATA go_list_tab TYPE STANDARD TABLE OF (lv_out_type_struc).
    lr_tabdescr   ?= cl_abap_tabledescr=>describe_by_data_ref( go_list_tab ).
    lr_strudescr  ?= lr_tabdescr->get_table_line_type( ).
    lt_dfies = cl_salv_data_descr=>read_structdescr( lr_strudescr ).
    LOOP AT lt_dfies INTO ls_dfies.
      CLEAR ls_fieldcat.
      READ TABLE lt_fieldcat INTO ls_fieldcat WITH KEY fieldname = ls_dfies-fieldname.
      IF sy-subrc = 0.

      ELSE.
        MOVE-CORRESPONDING ls_dfies TO ls_fieldcat.
        ls_fieldcat-reptext = ls_dfies-fieldtext.
      ENDIF.
      APPEND ls_fieldcat TO gt_fcat.
    ENDLOOP.

    IF io_app_parameter IS NOT INITIAL.
      io_app_parameter->get_value( EXPORTING iv_key = 'SAP-WD-CONFIGID' IMPORTING ev_value = gv_config_id ).
    ENDIF.

  ENDMETHOD.


* <SIGNATURE>---------------------------------------------------------------------------------------+
* | Instance Protected Method ZCL_SAMPLE_REPORT_BASE->START_OF_SELECTION
* +-------------------------------------------------------------------------------------------------+
* | [--->] FIELD_SELECTION                TYPE        RCF_T_FIELD_SELECTION
* | [<---] ET_MESSAGES                    TYPE        FPMGB_SEARCH_T_T100_MESSAGE
* | [<---] DATA                           TYPE        DATA
* +--------------------------------------------------------------------------------------</SIGNATURE>
  METHOD start_of_selection.
*----------------------------------------------------------------------*
* Sample 实际使用中填充报表逻辑 ---By Fireworks xie 
*----------------------------------------------------------------------*
*
*    DATA: lt_out TYPE TABLE OF ty_out.
*
*    DATA: lt_bukrs TYPE RANGE OF bukrs,
*          ls_bukrs LIKE LINE OF lt_bukrs,
*          lt_land1 TYPE RANGE OF land1,
*          ls_land1 LIKE LINE OF lt_land1.
*
*    LOOP AT field_selection INTO DATA(ls_selection).
*      CASE ls_selection-fieldname.
*        WHEN 'BUKRS'.
*          MOVE-CORRESPONDING ls_selection TO ls_bukrs.
*          APPEND ls_bukrs TO lt_bukrs.
*        WHEN 'LAND1'.
*          MOVE-CORRESPONDING ls_selection TO ls_land1.
*          APPEND ls_land1 TO lt_land1.
*        WHEN OTHERS.
*      ENDCASE.
*    ENDLOOP.
*
*    SELECT bukrs , CAST( '20230101' AS DATS ) AS datum , land1 , butxt
*      FROM t001
*      INTO TABLE @lt_out
*      WHERE bukrs IN @lt_bukrs
*      AND   land1 IN @lt_land1.
*
*    data =   lt_out.

  ENDMETHOD.
ENDCLASS.
CLASS zcl_sample_report_sample01 DEFINITION
  PUBLIC
  INHERITING FROM zcl_sample_report_base
  FINAL
  CREATE PUBLIC .

  PUBLIC SECTION.

    TYPES: BEGIN OF ty_out,
             bukrs TYPE bukrs,
             datum TYPE datum,
             land1 TYPE land1,
             butxt TYPE butxt,
           END OF ty_out .
protected section.

  methods START_OF_SELECTION
    redefinition .
  methods DATA_DEFINE_AND_SELECT_SCREEN
    redefinition .
private section.
ENDCLASS.



CLASS ZCL_SAMPLE_REPORT_SAMPLE01 IMPLEMENTATION.


* <SIGNATURE>---------------------------------------------------------------------------------------+
* | Instance Protected Method ZCL_SAMPLE_REPORT_SAMPLE01->DATA_DEFINE_AND_SELECT_SCREEN
* +-------------------------------------------------------------------------------------------------+
* | [<---] SELECT_FIELDS                  TYPE        TT_SEARCH_FIELDS
* | [<---] FIELDCAT                       TYPE        LVC_T_FCAT
* | [<---] LAUOUT                         TYPE        TY_LAYOUT
* | [<---] OUT_TYPE_STRUC                 TYPE        STRING
* +--------------------------------------------------------------------------------------</SIGNATURE>
  METHOD data_define_and_select_screen.

    DATA: lt_list_box TYPE fpmgb_t_namevalue.

    lt_list_box = VALUE #( ( name = '中国' value = 'CN' )
                           ( name = '美国' value = 'US' )
                           ( name = '德国' value = 'DE' ) ).

    " 选择屏幕设置
    APPEND VALUE #( name = 'BUKRS' type = 'BUKRS' text = '公司代码'  ) TO select_fields.
    APPEND VALUE #( name = 'DATUM' type = 'DATUM' text = '日期'  ) TO select_fields.
    APPEND VALUE #( name = 'LAND1' type = 'LAND1' text = '国家' list_box = lt_list_box ) TO select_fields.

    " 报表展示字段及属性
    APPEND VALUE #( fieldname = 'BUTXT' reptext = '公司名称' intlen = 40 ) TO fieldcat.

    " 输出报表格式
    lauout-title                  = 'Company'.
    lauout-fit_to_table_width     = abap_true.
    lauout-allow_personalization  = abap_true.
    lauout-export_to_excel        = abap_true.

    " 输出报表数据结构
    out_type_struc = 'ZCL_SAMPLE_REPORT_SAMPLE01=>TY_OUT'.

  ENDMETHOD.


* <SIGNATURE>---------------------------------------------------------------------------------------+
* | Instance Protected Method ZCL_SAMPLE_REPORT_SAMPLE01->START_OF_SELECTION
* +-------------------------------------------------------------------------------------------------+
* | [--->] FIELD_SELECTION                TYPE        RCF_T_FIELD_SELECTION
* | [<---] ET_MESSAGES                    TYPE        FPMGB_SEARCH_T_T100_MESSAGE
* | [<---] DATA                           TYPE        DATA
* +--------------------------------------------------------------------------------------</SIGNATURE>
  METHOD start_of_selection.

    DATA: lt_out TYPE TABLE OF ty_out.

    DATA: lt_bukrs TYPE RANGE OF bukrs,
          ls_bukrs LIKE LINE OF lt_bukrs,
          lt_land1 TYPE RANGE OF land1,
          ls_land1 LIKE LINE OF lt_land1.

    LOOP AT field_selection INTO DATA(ls_selection).
      CASE ls_selection-fieldname.
        WHEN 'BUKRS'.
          MOVE-CORRESPONDING ls_selection TO ls_bukrs.
          APPEND ls_bukrs TO lt_bukrs.
        WHEN 'LAND1'.
          MOVE-CORRESPONDING ls_selection TO ls_land1.
          APPEND ls_land1 TO lt_land1.
        WHEN OTHERS.
      ENDCASE.
    ENDLOOP.

    SELECT bukrs , CAST( '20230101' AS DATS ) AS datum , land1 , butxt
      FROM t001
      INTO TABLE @lt_out
      WHERE bukrs IN @lt_bukrs
      AND   land1 IN @lt_land1.

    data =   lt_out.

  ENDMETHOD.
ENDCLASS.
PS:本文内容为初版,欢迎大家评论提出改进意见

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:/a/574909.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

Spring Boot | Spring Boot “自定义“ Redis缓存 “序列化机制“

目录: Spring Boot "自定义" Redis缓存 "序列化机制" &#xff1a;一、基于 "注解" 的 "Redis缓存管理" 的 "默认序列化机制" 和 "自定义序列化机制"1.1 基于 "注解" 的 "Redis缓存管理" 的 …

基于OpenCV的人脸签到系统

效果图 目录文件 camerathread.h 功能实现全写在.h里了 class CameraThread : public QThread {Q_OBJECT public:CameraThread(){//打开序号为0的摄像头m_cap.open(0);if (!m_cap.isOpened()) {qDebug() << "Error: Cannot open camera";}//判断是否有文件,人脸…

Unity 实现原神中的元素反应

一、元素反应 原神中共有七种元素&#xff0c;分别是水、火、冰、岩、风、雷、草。这七种元素能互相作用 Demo下载&#xff1a;Download 元素反应表格图示&#xff0c;可能不够精准 /火水雷冰草岩风绽放原激化火/蒸发超载融化燃烧结晶扩散烈绽放/水蒸发/感电冻结/碎冰绽放结晶…

数据分析:甲基化分析-从DNA methylation的IDAT文件到CpG site的Beta values

介绍 DNA Methylation和疾病的发生发展存在密切相关&#xff0c;它一般通过CH3替换碱基5‘碳的H原子&#xff0c;进而调控基因的转录。常用的DNA methylation是Illumina Infinium methylation arrays&#xff0c;该芯片有450K和850K&#xff08;也即是EPIC&#xff09;。 该脚…

【canvas】前端创造的图片粒子动画效果:HTML5 Canvas 技术详解

前端创造的图片粒子动画效果&#xff1a;HTML5 Canvas 技术详解 我们将深入探讨如何通过 HTML5 的 Canvas 功能&#xff0c;将上传的图片转换成引人入胜的粒子动画效果。这种效果将图片分解成小粒子&#xff0c;并在用户与它们交互时产生动态变化。我们将分步骤详细解析代码&a…

LabVIEW专栏九、类的应用

一、类的应用 接上一章"类" 类在项目中&#xff0c;一般会在类的私有成员簇内&#xff0c;包含一个数据类型为参数类的队列。 例如网口类&#xff0c;里面实际会包含很多信息&#xff0c;有IP地址和端口等等参数。这些参数如果不放在队列引用中缓存下来&#xff0c;…

DevOps(十四)怎么实现Gitlab更新后Jenkins自动发布

目录 1、在 Jenkins 中安装 GitLab 插件 2、在 GitLab 中创建一个访问令牌(Access Token) 3、在 Jenkins 中配置 GitLab 连接 4、在 Jenkins 中创建一个新的任务(Job) 5、在 GitLab 中配置 Webhook 6、以下是一些补充说明和建议 持续集成的一个特点就是开发可以随时提交&…

微服务组件-反向代理(Nginx)

微服务组件-反向代理(Nginx) Nginx 基本概念 1、nginx是什么&#xff1f; ①、Nginx (engine x) 是一个高性能的HTTP和反向代理web服务器同时也提供了IMAP/POP3/SMTP服务。它是一款轻量级的Web服务器/反向代理服务器及电子邮件&#xff08;IMAP/POP3&#xff09;代理服务器&a…

TiDB 6.x 新特性解读 | Collation 规则

对数据库而言&#xff0c;合适的字符集和 collation 规则能够大大提升使用者运维和分析的效率。TiDB 从 v4.0 开始支持新 collation 规则&#xff0c;并于 TiDB 6.0 版本进行了更新。本文将深入解读 Collation 规则在 TiDB 6.0 中的变更和应用。 引 这里的“引”&#xff0c;…

Oracle 监控 SQL 精选 (一)

Oracle数据库的监控通常涉及性能、空间、会话、对象、备份、安全等多个层面。 有效的监控可以帮助 DBA 及时发现和解决问题&#xff0c;提高数据库的稳定性和性能&#xff0c;保障企业的数据安全和业务连续性。 常用的监控指标有&#xff1a; 性能指标&#xff1a; 查询响应时间…

产品推荐 | BittWare基于Altera Agilex“M FPGA的lA-860m加速卡

01 产品概述 BittWare的lA-860m是一款Altera Agilex“M系列FPGA卡&#xff0c;针对吞吐量和内存密集型应用进行了优化。M 系列 FPGA 具有广泛的内存层次结构&#xff0c;包括集成高带宽存储器 &#xff08;HBM2e&#xff09; 和硬内存片上网络 &#xff08;NoC&#xff09;&am…

【QT】ROS2 Humble联合使用QT教程

【QT】ROS2 Humble联合使用QT教程 文章目录 【QT】ROS2 Humble联合使用QT教程1. 安装ROSProjectManager插件2. 创建ROS项目3.一个快速体验的demoReference 环境的具体信息如下&#xff1a; ubunt 22.04ros2 humbleQt Creator 13.0.0ROS ProjectManager 13.0.0 本文建立在已经…

Vivado-IP-DDS and Testbench Learning

DDS内部结构 实现流程 首先新建一个工程&#xff0c;创建bd文件&#xff0c;添加DDS Compiler核&#xff0c;此处不多赘述 Block Design 在观测输出的信号时&#xff0c;需要将最高位符号位的信号取反&#xff0c;这样才能输出正弦波&#xff0c;否则输出的波形如下图所示 将t…

OpenStack云计算(十)——OpenStack虚拟机实例管理,增加一个计算节点并进行实例冷迁移,增加一个计算节点的步骤,实例冷迁移的操作方法

项目实训一 本实训任务对实验环境要求较高&#xff0c;而且过程比较复杂&#xff0c;涉及的步骤非常多&#xff0c;有一定难度&#xff0c;可根据需要选做。可以考虑改为直接观看相关的微课视频 【实训题目】 增加一个计算节点并进行实例冷迁移 【实训目的】 熟悉增加一个…

实验 1--SQL Server2008数据库开发环境

文章目录 实验 1--SQL Server2008数据库开发环境2.4.1 实验目的2.4.2 实验准备2.4.3 实验内容1.利用 SSMS 访问系统自带的Report Server 数据库。2.熟悉了解 SMSS对象资源管理器树形菜单相关选择项的功能。(1)右键单击数据库Report Server&#xff0c;查看并使用相关功能;(2)选…

K8s: 部署 kubernetes dashboard

部署 Dashboard K8s 官方有一个项目叫 dashboard&#xff0c;通过这个项目更方便监控集群的状态 官方地址: https://github.com/kubernetes/dashboard 通常我们通过命令行 $ kubectl get po -n kube-system 能够查看到集群所有的组件&#xff0c;但这样的方式比较不太直观 …

算法学习002-填数游戏 中小学算法思维学习 信奥算法解析 c++实现

目录 C填数游戏 一、题目要求 1、编程实现 2、输入输出 二、算法分析 三、程序编写 四、程序说明 五、运行结果 六、考点分析 七、推荐资料 C填数游戏 一、题目要求 1、编程实现 在小学奥数中经常会看到一些填数字的游戏&#xff0c;如下图所示&#xff0c;其中每个…

【Web】第三次

【Web】第三次 1.完成学校官方网站页面制作2.使用动画完成过渡变换效果 1.完成学校官方网站页面制作 2.使用动画完成过渡变换效果 1.完成学校官方网站页面制作 html&#xff1a; <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://…

OpenCV 实现重新映射

返回:OpenCV系列文章目录&#xff08;持续更新中......&#xff09; 上一篇&#xff1a;OpenCV 实现霍夫圆变换 下一篇 :OpenCV实现仿射变换 目标 在本教程中&#xff0c;您将学习如何&#xff1a; 一个。使用 OpenCV 函数 cv&#xff1a;&#xff1a;remap 实现简单的重新…

Socket编程实验

文章目录 服务端&#xff1a;客户端&#xff1a;使用说明&#xff1a;封装后服务端&#xff1a;封装后客户端 听学弟学妹们反馈&#xff0c;好像老师发的socket编程实验指导里的代码跑不起来。 今天花了一大把时间写了下socket编程代码 现在附上能跑的c代码&#xff1a; 最重要…