ABAP 选择屏幕控件隐藏
*-----------------------------------------------------------------------*
* 选择屏幕
*-----------------------------------------------------------------------*
SELECTION-SCREEN BEGIN OF BLOCK BK01 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS S_WERKS FOR EKPO-WERKS .
SELECT-OPTIONS S_LIFNR FOR EKKO-LIFNR .
SELECT-OPTIONS S_EKGRP FOR EKKO-EKGRP .
SELECT-OPTIONS S_EBELN FOR EKKO-EBELN .
SELECT-OPTIONS S_BSART FOR EKKO-BSART .
SELECT-OPTIONS S_PSTYP FOR EKPO-PSTYP .
SELECT-OPTIONS S_MATNR FOR EKPO-MATNR .
SELECT-OPTIONS S_EINDT FOR EKET-EINDT .
SELECT-OPTIONS S_AEDAT FOR EKKO-AEDAT .
SELECT-OPTIONS S_ERNAM FOR EKKO-ERNAM .
SELECT-OPTIONS S_LOEKZ FOR EKPO-LOEKZ.
SELECT-OPTIONS S_ZTSRQ FOR ZMMT001A-ZTSRQ MODIF ID SP1.
PARAMETERS P_NOPUSH RADIOBUTTON GROUP RD USER-COMMAND UC1 DEFAULT 'X'.
PARAMETERS P_PUSH RADIOBUTTON GROUP RD.
PARAMETERS P_ALL RADIOBUTTON GROUP RD.
SELECTION-SCREEN END OF BLOCK BK01.
**********************************************************************PROGRAM*********************************************************************
*---------------------------------------------------------------------*
* INITIALIZATION *
*---------------------------------------------------------------------*
INITIALIZATION.
*--设置字段目录
PERFORM SET_ALV_FIELDCAT.
*--设置布局属性
PERFORM SET_LAYOUT.
*---------------------------------------------------------------------*
* AT SELECTION-SCREEN *
*---------------------------------------------------------------------*
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF P_NOPUSH = 'X'.
SCREEN-ACTIVE = '1'."显示
MODIFY SCREEN.
ELSEIF P_PUSH = 'X'.
SCREEN-ACTIVE = '1'.
MODIFY SCREEN.
ELSEIF SCREEN-GROUP1 = 'SP1'.
SCREEN-ACTIVE = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
AT SELECTION-SCREEN.
CLEAR SY-UCOMM.
*-----------------------------------------------------------------------*
* ALVL逻辑流
*-----------------------------------------------------------------------*
START-OF-SELECTION.
*--获取数据
PERFORM FRM_GET_DATA.
IF sy-subrc <> 0.
MESSAGE s001(zmm01).
RETURN.
ENDIF.
*---------------------------------------------------------------------*
* END-OF-SELECTION *
*---------------------------------------------------------------------*
END-OF-SELECTION.
*--ALV显示
PERFORM DISPALY_ALV.
设置MODIF ID
设置USER-COMMAND