POPUP_TITLE : 设置弹出框标题
START_COLUMN:设置弹出框开始列位置
START_ROW :设置弹出框开始行位置
FIELDS :设置弹出框界面字段信息
代码样例:
代码语言:javascript复制DATA: lt_value TYPE TABLE OF sval,
ls_value TYPE sval.
CLEAR: lt_value,
ls_value.
ls_value-tabname = 'T001W'.
ls_value-fieldname = 'WERKS'.
ls_value-field_obl = 'X'.
APPEND ls_value TO lt_value.
CLEAR: ls_value.
"弹出输入框,用于创建工单时的工厂信息
CALL FUNCTION 'POPUP_GET_VALUES'
EXPORTING
* NO_VALUE_CHECK = ' '
popup_title = '输入工厂'
* START_COLUMN = '5'
* START_ROW = '5'
* IMPORTING
* RETURNCODE =
TABLES
fields = lt_value
EXCEPTIONS
error_in_fields = 1
OTHERS = 2.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
READ TABLE lt_value INTO ls_value INDEX 1.
IF ls_value-value is not initial.
* Implement something
ENDIF.
注意:输入框如果设置为必输,可以通过FIELD_OBL字段设置,设置值为X的时候表示必输,为空的时候则不需要必输