matinal:SAP ABAP-SM30添加搜索帮助

2024-05-26 18:25:33 浏览数 (1)

代码语言:javascript复制
 PROCESS ON VALUE-REQUEST .
   "FIELD   表-字段 MODULE 子例程"
   FIELD ztwms14_lifnr-bwart MODULE frm_bwart_list .

子例程例子

代码语言:javascript复制
MODULE frm_bwart_list INPUT.

  DATA:
    BEGIN OF lt_bwart OCCURS 0,
      bwart TYPE t156t-bwart,
      btext TYPE t156t-btext,
    END OF lt_bwart.

  CLEAR lt_bwart[].

  SELECT
    bwart
    btext
    FROM t156t
    INTO TABLE lt_bwart[]
    WHERE spras = '1'
    AND sobkz = ''
    AND kzbew = 'B'
    AND kzzug = ''
    AND kzvbr = ''.

  SORT lt_bwart[] BY bwart.
  DELETE ADJACENT DUPLICATES FROM lt_bwart[].

  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
      retfield        = 'BWART'
      dynpprog        = sy-repid
      dynpnr          = sy-dynnr
      dynprofield     = 'BWART'
      value_org       = 'S'
    TABLES
      value_tab       = lt_bwart[]
    EXCEPTIONS
      parameter_error = 1
      no_values_found = 2
      OTHERS          = 3.

ENDMODULE.                 " FRM_BWART_LIST  INPUT

怎么样,在了解此篇文章有何感想?

0 人点赞