PARAMETERS: p_year TYPE mard-lfgja DEFAULT sy-datum+0(4),
p_month TYPE mard-lfmon.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_month.
DATA: actual_month LIKE isellist-month,
selected_month LIKE isellist-month,
return_code TYPE sy-subrc.
CONCATENATE p_year sy-datum+4(2) INTO actual_month.
CALL FUNCTION ‘POPUP_TO_SELECT_MONTH’
EXPORTING
actual_month = actual_month "传入年份
factory_calendar = ’ ’ "工厂日历 ID
holiday_calendar = ’ ’ "假日日历 ID
language = sy-langu "当前系统语言
start_column =10 "弹出框屏幕位置
start_row = 8 "弹出框屏幕位置
IMPORTING
selected_month = selected_month "返回用户输入月份
return_code = return_code "返回 sy-subrc
EXCEPTIONS
factory_calendar_not_found = 1
holiday_calendar_not_found = 2
month_not_found = 3
OTHERS = 4.
IF return_code = 0.
p_year = selected_month+0(4).
p_month = selected_month+4(2).
ENDIF.
效果: