只有显示年月,但要有日期的search help
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
PARAMETERS: P_MONTH LIKE ZSDE0010-ZYEMON MEMORY ID MON OBLIGATORY. AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_MONTH. PERFORM FRM_GET_MONTH CHANGING P_MONTH. FORM FRM_GET_MONTH CHANGING P_MONTH. *需求:只有显示年月,但要有日期的search help DATA:L_DATE TYPE SY-DATUM. CALL FUNCTION'F4_DATE' EXPORTING DATE_FOR_FIRST_MONTH = SY-DATUM IMPORTING SELECT_DATE = L_DATE EXCEPTIONS CALENDAR_BUFFER_NOT_LOADABLE = 1 DATE_AFTER_RANGE = 2 DATE_BEFORE_RANGE = 3 DATE_INVALID = 4 FACTORY_CALENDAR_NOT_FOUND = 5 HOLIDAY_CALENDAR_NOT_FOUND = 6 PARAMETER_CONFLICT = 7 OTHERS = 8. IF SY-SUBRC <> 0. MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. ENDIF. P_MONTH = L_DATE+0(6). ENDFORM. " FRM_GET_MONTH |