ABAP选择屏幕变量赋值
运行效果:
代码:
*&---------------------------------------------------------------------* *& Report ZMMRTEST *&---------------------------------------------------------------------* *& *&---------------------------------------------------------------------* REPORT ZMMRTEST. DATA: LASTDATE TYPE D. "第一天 DATA: FIRSTDAY TYPE D. "最后一天 SELECT-OPTIONS:S_DATE FOR SY-DATUM. INITIALIZATION. CALL FUNCTION 'FIMA_DATE_CREATE' EXPORTING I_DATE = SY-DATUM I_MONTHS = '-1' I_SET_LAST_DAY_OF_MONTH = 'X' IMPORTING E_DATE = LASTDATE. CONCATENATE LASTDATE+0(6) '01' INTO FIRSTDAY." S_DATE-SIGN = 'I'. S_DATE-OPTION = 'BT'. S_DATE-LOW = FIRSTDAY. S_DATE-HIGH = LASTDATE. APPEND S_DATE.CLEAR S_DATE. START-OF-SELECTION. WRITE:/ S_DATE-LOW,S_DATE-HIGH.