在ABAP语言中要检查输入日期是否合法可以调用以下封装过程:
FORM CHECK_SELECTION_SCREEN.
IF S_BUDAT-HIGH < S_BUDAT-LOW
OR S_BUDAT-HIGH > SY-DATUM
OR S_BUDAT-HIGH = SY-DATUM.
* MESSAGE E999 WITH '输入非法日期'.
S_BUDAT-HIGH = SY-DATUM.
MODIFY S_BUDAT INDEX 1.
ENDIF.
ENDFORM. "check_selection_screen
阅读(3057) | 评论(0) | 转发(0) |