FPM 快速报表开发

news2024/12/23 16:20:58
背景:

        使用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:本文内容为初版,欢迎大家评论提出改进意见

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

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

大模型微调之 使用 LLaMA-Factory 微调 Llama3

大模型微调之 使用 LLaMA-Factory 微调 Llama3 使用 LLaMA Factory 微调 Llama-3 中文对话模型 安装 LLaMA Factory 依赖 %cd /content/ %rm -rf LLaMA-Factory !git clone https://github.com/hiyouga/LLaMA-Factory.git %cd LLaMA-Factory %ls !pip install "unsloth…

力扣数据库题库学习(4.25日)

1484. 按日期分组销售产品 问题链接 思路与分析 编写解决方案找出每个日期、销售的不同产品的数量及其名称。 每个日期的销售产品名称应按词典序排列。 返回按 sell_date 排序的结果表。我来分析一下&#xff0c;这里的题目要求其实就是统计不同日期下的销售产品数&#xf…

excel文件导入dbeaver中文乱码

1.将excel文件进行另存为&#xff0c;保存类型选择【CSV】 2.选择【工具】–>【web选项】–> 【编码】–> 【简体中文&#xff08;GB18030&#xff09;】 3.在DBeaver进行数据导入 直接导入应该就可以&#xff0c;如果不行的话按下面处理。 选择【导入数据——选择cs…

【3GPP】【核心网】【4G】LTE中S1-MME流程字段分析(二)

1. 欢迎大家订阅和关注&#xff0c;精讲3GPP通信协议&#xff08;2G/3G/4G/5G/IMS&#xff09;知识点&#xff0c;专栏会持续更新中.....敬请期待&#xff01; 承接上文 目录 6. PDN Connectivity 7. PDN Disconnection 8. EPS Bearer resource allocation 9. EPS Bearer r…

Gin+WebSocket实战——在线聊天室WebSocketDemo详细使用教程

文章目录 仓库地址项目简介如何使用 仓库地址 Github&#xff1a;https://github.com/palp1tate/WebsocketDemo 欢迎star&#xff01;&#x1f60e; 项目简介 利用 GinWebSocket 实现的在线聊天室Demo项目&#xff0c;支持加入/离开聊天室广播、给其他用户发送消息等。 如何…

sqlplus / as sysdba登陆失败,(ORA-01017)

周一上班检查alert log&#xff0c;看到某个库报出大量的错误 提示无法连接到ASM实例&#xff0c;这是某知名MES厂商DBA创建的11G RAC刚刚​转交到我手上的&#xff0c;这又是给我挖了什么坑&#xff1f; 报错为ORA-01017​用户名密码不对&#xff1f;​what&#xff1f; 登陆o…

【线性代数 C++】求逆矩阵

对于 n n n阶矩阵 A A A&#xff0c;如果有 n n n阶矩阵 B B B&#xff0c;使 A B B A E ABBAE ABBAE&#xff0c;则说 A A A是可逆的&#xff0c;并把 B B B称为 A A A的逆矩阵. A A A的逆矩阵记作 A − 1 A^{-1} A−1&#xff0c;则 B A − 1 BA^{-1} BA−1.若 ∣ A ∣ ≠…

如何3分钟,快速开发一个新功能

背景 关于为什么做这个代码生成器&#xff0c;其实主要有两点: 参与的项目中有很多分析报表需要展示给业务部门&#xff0c;公司使用的商用产品&#xff0c;或多或少有些问题&#xff0c;这部分可能是历史选型导致的&#xff0c;这里撇开不不谈&#xff1b;项目里面也有很多C…

【白盒测试】单元测试的理论基础及用例设计技术(6种)详解

目录 &#x1f31e;前言 &#x1f3de;️1. 单元测试的理论基础 &#x1f30a;1.1 单元测试是什么 &#x1f30a;1.2 单元测试的好处 &#x1f30a;1.3 单元测试的要求 &#x1f30a;1.4 测试框架-Junit4的介绍 &#x1f30a;1.5 单元测试为什么要mock &#x1f3de;️…

【自然语言处理】InstructGPT、GPT-4 概述

InstructGPT官方论文地址&#xff1a;https://arxiv.org/pdf/2203.02155.pdf GPT-4 Technical Report&#xff1a;https://arxiv.org/pdf/2303.08774.pdf GPT-4&#xff1a;GPT-4 目录 1 InstructGPT 2 GPT-4 1 InstructGPT 在了解ChatGPT之前&#xff0c;我们先看看Instr…

线性代数-行列式-p1 矩阵的秩

目录 1.定义 2. 计算矩阵的秩 3. 矩阵的秩性质 1.定义 2. 计算矩阵的秩 3. 矩阵的秩性质

Apache Doris 2.x 版本【保姆级】安装+使用教程

Doris简介 Apache Doris 是一个基于 MPP 架构的高性能、实时的分析型数据库&#xff0c;以极速易用的特点被人们所熟知&#xff0c;仅需亚秒级响应时间即可返回海量数据下的查询结果&#xff0c;不仅可以支持高并发的点查询场景&#xff0c;也能支持高吞吐的复杂分析场景。基于…

数据挖掘实验一

一、实验环境及背景 使用软件&#xff1a; Anaconda3 Jupyter Notebook 实验内容&#xff1a; 1.使用Tushare或者其他手段获取任意两支股票近三个月的交易数据。做出收盘价的变动图像。2.使用Pandas_datareader获取世界银行数据库中美国&#xff08;USA&#xff09;、瑞典&…

Linux系统安全与应用【一】

目录 1.账号安全控制 1.1 系统账号清理 1.2 密码安全控制 1.3 命令历史限制 1.4 命令总结 2.系统引导和登录控制 2.1 使用su命令切换用户 2.2 限制使用su命令的用户 3.可插拔式认证模块PAM 3.1 linux中的PAM安全认证 3.2 PAM认证原理​编辑 3.3 PAM认证的构成 3.4 P…

UEFI安全启动模式下安装Ubuntu的NVIDIA显卡驱动

UEFI安全启动模式下安装ubuntu的nvidia显卡驱动 实践设备&#xff1a;华硕FX-PRO&#xff08;NVIDIA GeForce GTX 960M&#xff09; 一、NVIDIA官网下载驱动 1.1在浏览器地址栏输入https://www.nvidia.cn/drivers/lookup/进入网站&#xff0c;接着手动驱动搜索&#xff0c;并…

GPB | RegVar:基于深度神经网络的非编码区突变功能预测新方法

Genomics, Proteomics & Bioinformatics &#xff08;GPB&#xff09;发表了由军事医学研究院辐射医学研究所张成岗研究员、周钢桥研究员和卢一鸣副研究员团队完成的题为“RegVar: Tissue-specific Prioritization of Noncoding Regulatory Variants”的方法文章。我们的“…

Linux常用监控命令(笔试面试常考)

1.、free命令 [rootRocky8-node1 ~]# free -htotal used free shared buff/cache available Mem: 1.7Gi 1.1Gi 69Mi 31Mi 554Mi 436Mi Swap: 2.0Gi 258Mi 1.7Gi free命令是Linux系统中用…

paddle ocr v4 微调训练文字识别模型实践

识别步骤参考&#xff1a;https://github.com/PaddlePaddle/PaddleOCR/blob/main/doc/doc_ch/recognition.md 微调步骤参考:https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.7.1/doc/doc_ch/finetune.md 训练必要性 原始模型标点符号和括号容易识别不到 数据准备…

【C++】---STL之list的模拟实现

【C】---STL之list的模拟实现 一、list模拟实现思路二、结点类的实现三、list迭代器的实现1、ListIterator类2、构造函数3、operator*运算符重载5、operator->运算符重载6、operator&#xff01;运算符重载7、operator运算符重载8、前置9、后置10、前置--11、后置-- 四、lis…

JavaScript云LIS系统概述 前端框架JQuery+EasyUI+Bootstrap医院云HIS系统源码 开箱即用

云LIS系统概述JavaScript前端框架JQueryEasyUIBootstrap医院云HIS系统源码 开箱即用 云LIS&#xff08;云实验室信息管理系统&#xff09;是一种结合了计算机网络化信息系统的技术&#xff0c;它无缝嵌入到云HIS&#xff08;医院信息系统&#xff09;中&#xff0c;用于连…