zoukankan      html  css  js  c++  java
  • ABAP alv输出的方式

    1. FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'

    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
        EXPORTING
          i_callback_program       = sy-repid
          is_layout_lvc            = gs_layout
          it_fieldcat_lvc          = gt_fieldcat[]
    *     i_grid_settings          = ls_glay
           i_callback_pf_status_set    = 'FM_SET_STATUS'
          i_callback_user_command  = 'FRM_UCOMM'
          i_default                = 'X'
          i_save                   = 'A'
          it_excluding             = it_exclude
          it_event_exit            = gt_event_exit[]
    *     i_grid_title             = r_title
          is_variant                  = gs_alv_variant
        TABLES
          t_outtab                 = gt_out
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 2.

    2. FUNCTION 'REUSE_ALV_GRID_DISPLAY'

    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
    * I_INTERFACE_CHECK = ' '
    * I_BYPASSING_BUFFER = ' '
    * I_BUFFER_ACTIVE = ' '

    i_callback_program = sy-repid

    i_callback_pf_status_set = 'FM_FULLSCREEN'

    i_callback_user_command = 'ALV_COMMADN'

    * I_CALLBACK_TOP_OF_PAGE = ' '
    * I_CALLBACK_HTML_TOP_OF_PAGE = ' '

    * I_CALLBACK_HTML_END_OF_LIST = ' '
    * I_STRUCTURE_NAME =
    * I_BACKGROUND_ID = ' '
    * I_GRID_TITLE =
    * I_GRID_SETTINGS =
    is_layout = lt_layo
    it_fieldcat = t_zsdr059
    it_excluding = it_exclude
    * IT_SPECIAL_GROUPS =
    * IT_SORT =
    * IT_FILTER =
    * IS_SEL_HIDE = * I_DEFAULT = 'X'
    i_save = 'A'
    * IS_VARIANT =
    it_events = git_events
    * IT_EVENT_EXIT =
    * IS_PRINT =
    * IS_REPREP_ID =
    * I_SCREEN_START_COLUMN = 0
    * I_SCREEN_START_LINE = 0
    * I_SCREEN_END_COLUMN = 0
    * I_SCREEN_END_LINE = 0
    * I_HTML_HEIGHT_TOP = 0
    * I_HTML_HEIGHT_END = 0
    * IT_ALV_GRAPHICS =
    * IT_HYPERLINK =
    * IT_ADD_FIELDCAT =
    * IT_EXCEPT_QINFO =
    * IR_SALV_FULLSCREEN_ADAPTER =
    * IMPORTING
    * E_EXIT_CAUSED_BY_CALLER =
    * ES_EXIT_CAUSED_BY_USER =
    TABLES
    t_outtab = it_zsdr059
    EXCEPTIONS
    program_error = 1
    OTHERS = 2.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.

    一般调用:

    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_structure_name   = 'KKBCS'
          it_fieldcat        = lt_field
          is_layout          = gs_layout
          i_callback_program = sy-repid
          i_grid_title       = ''
        TABLES
          t_outtab           = gt_kkbcs[]

    3.OO方式的alv:set_table_for_first_display

    ls_variant-report = sy-repid.
     
    CALL METHOD gc_alvgrid->set_table_for_first_display
        EXPORTING
          is_layout       = ls_layout
          i_save          = 'A'          "设置成A
           is_variant       = ls_variant   "这个参数也必须输入
        CHANGING
          it_outtab       = git_item[]
          it_fieldcatalog = git_fieldcat[].

    4.FUNCTION 'LVC_FIELDCATALOG_MERGE' 根据表结构生成fieldcat

    CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
          i_structure_name       = 'ZSSD028'
        CHANGING
          ct_fieldcat            = gt_fieldcatalog[]
        EXCEPTIONS
          inconsistent_interface = 1
          program_error          = 2
          OTHERS                 = 3.
  • 相关阅读:
    webpack从零的实践(新手良药)
    throttle和debounce
    call(),apply(),bind() 区别和用法
    vue 路由钩子。
    vue 兄弟组件之间的传值
    JS 面向对象封装 无限轮播 插件。
    element-ui 解决 table 里包含表单验证的问题!
    Vue.nextTick 的原理和用途
    JavaScript中基本数据类型和引用数据类型的区别
    PS批量修改照片大小
  • 原文地址:https://www.cnblogs.com/ybinlog/p/11174994.html
Copyright © 2011-2022 走看看