简单输入框
代码
DATA:TAB TYPE TABLE OF SVAL WITH HEADER LINE ,CODE TYPE C .
TAB-TABNAME = 'ZTAB_XX'."表
TAB-FIELDNAME = 'XXXX'."字段
TAB-FIELDTEXT = '条码扫描' ."说明
APPEND TAB.
"弹出填写数据的框
CALL FUNCTION 'POPUP_GET_VALUES_USER_HELP'
EXPORTING
POPUP_TITLE = '扫描'"标题
IMPORTING
RETURNCODE = CODE
TABLES
FIELDS = TAB.
IF CODE = '' .
READ TABLE TAB INDEX 1 ."TAB-VALUE 值
ENDIF.
屏幕选择条件框
代码
定义:
SELECTION-SCREEN BEGIN OF SCREEN 500 TITLE ABC AS WINDOW.
SELECT-OPTIONS R_CDATE FOR SY-DATUM OBLIGATORY.
SELECTION-SCREEN END OF SCREEN 500.
应用:
IF R_CDATE-LOW = '' OR R_CDATE-LOW = '00000000'.
R_CDATE-LOW = SY-DATUM.
R_CDATE-SIGN = 'I'.
R_CDATE-OPTION = 'EQ'.
APPEND R_CDATE.
ENDIF.
CALL SELECTION-SCREEN '0500' STARTING AT 10 10.
IF SY-SUBRC <> 0.
EXIT.
ENDIF.