选择屏幕随单选按钮变化

需求


创建预留
查看历史

随着单选框更改屏幕

SELECTION-SCREEN: FUNCTION KEY 1,BEGIN OF BLOCK XYY.
SELECTION-SCREEN BEGIN OF BLOCK BLK WITH FRAME TITLE TEXT-001.
PARAMETERS:P_WERKS LIKE ZTYLP-WERKS MODIF ID CJ, " MEMORY ID M1 MODIF ID M1. "文件上载
           P_LGORT LIKE ZTYLP-LGORT MODIF ID CJ,
           P_BWART LIKE ZTYLP-BWART MODIF ID CJ.
SELECT-OPTIONS: S_WERKS FOR ZTYLP-WERKS MODIF ID CK,
                S_LGORT FOR ZTYLP-LGORT  MODIF ID CK,
                S_BWART FOR ZTYLP-BWART  MODIF ID CK,
                S_IDATE FOR ZTYLP-IDATE,
                S_UNAME FOR ZTYLP-UNAME MODIF ID CK,
                S_EQUNR FOR ZTYLP-EQUNR  MODIF ID CK,
                S_MATNR FOR ZTYLP-MATNR  MODIF ID CK.

SELECTION-SCREEN END OF BLOCK  BLK.

SELECTION-SCREEN BEGIN OF BLOCK BLK1 WITH FRAME TITLE TEXT-002. "设置一个标题
PARAMETERS P_SPZT1 RADIOBUTTON GROUP GP1  DEFAULT 'X' USER-COMMAND CJ.
PARAMETERS P_SPZT3 RADIOBUTTON GROUP GP1 .
PARAMETERS P_SPZT2 RADIOBUTTON GROUP GP1 .
SELECTION-SCREEN END OF BLOCK BLK1.

SELECTION-SCREEN END OF BLOCK XYY.

INITIALIZATION.

AT SELECTION-SCREEN OUTPUT.
  IF P_SPZT1 = 'X' OR  P_SPZT3 = 'X'.
    LOOP AT SCREEN.
      IF  SCREEN-GROUP1 = 'CK'.
        SCREEN-ACTIVE = '0'.
      ENDIF.
      MODIFY SCREEN.
    ENDLOOP.
  ELSEIF P_SPZT2 = 'X'.
    LOOP AT SCREEN.
      IF  SCREEN-GROUP1 = 'CJ'.
        SCREEN-ACTIVE = '0'.
      ENDIF.
      MODIFY SCREEN.
    ENDLOOP.
  ENDIF.

AT SELECTION-SCREEN.

START-OF-SELECTION.

为每个单选按钮将要展示的字段分配ID :MODIF ID CK
分配完ID,给一个时间 MODIF ID CK(跟在默认为X的单选按钮上)
避免点击单选按钮直接执行接下来的代码,而不是先改变屏幕保持以下顺序

INITIALIZATION.
AT SELECTION-SCREEN OUTPUT.
AT SELECTION-SCREEN.
START-OF-SELECTION.

你可能感兴趣的:(选择屏幕随单选按钮变化)