REPORT ZCSDN_LION_ALV07.
"选择屏幕设计,第一个框架:"
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
SELECTION-SCREEN COMMENT 1(20) TXT01.
PARAMETERS:
PA TYPE C RADIOBUTTON GROUP G1 DEFAULT 'X' USER-COMMAND FLAG ,"这里很关键,user-command xxx 表示这个组件改变时发出事件信息。"
PB TYPE C RADIOBUTTON GROUP G1.
SELECTION-SCREEN END OF BLOCK B1.
"第二个框架"
SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002.
SELECTION-SCREEN:BEGIN OF LINE ,
COMMENT 1(8) TXT02 FOR FIELD P1 .
PARAMETER P1 TYPE C LENGTH 20 MODIF ID IN2.
"这里是第二个关键,使用modif id xxx,注意这里不是modify 不要混淆,还有id名最多为三位,比如inp,如果超过三位会报错。P1即物料号,这里ID IN2。"
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN SKIP 1.
SELECTION-SCREEN:BEGIN OF LINE,
COMMENT 1(8) TXT03.
PARAMETER P2 TYPE C LENGTH 30 MODIF ID IN2.
"P2也就是物料描述,和P1一样modif id