SAP ABAP 选择屏幕加按钮

示例:

 

SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE TEXT-002.
SELECTION-SCREEN:BEGIN OF LINE,
               PUSHBUTTON 1(15) sel USER-COMMAND sel,
               PUSHBUTTON 17(15) unsel USER-COMMAND unsel,
             END OF LINE.

SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: c01 TYPE char1 AS CHECKBOX  DEFAULT 'X'."科目
SELECTION-SCREEN COMMENT 3(15)  TEXT-c01 FOR FIELD c01.
PARAMETERS: c02 TYPE char1 AS CHECKBOX  DEFAULT 'X'."供应商
SELECTION-SCREEN COMMENT 21(15)  TEXT-c02 FOR FIELD c02.
SELECTION-SCREEN END OF LINE.

INITIALIZATION

  "设置文件选择按钮图标及文字说明
  CALL FUNCTION 'ICON_CREATE'
    EXPORTING
      name   = icon_select_all
      text   = '全选选择'
    IMPORTING
      result = sel
    EXCEPTIONS
      OTHERS = 0.
  CALL FUNCTION 'ICON_CREATE'
    EXPORTING
      name   = icon_deselect_all
      text   = '全选取消'
    IMPORTING
      result = unsel
    EXCEPTIONS
      OTHERS = 0.

 

posted @ 2024-09-10 10:57  年轻的小菜鸟  阅读(78)  评论(0编辑  收藏  举报