ABAP中年月搜索帮助的实现

parameters p_yrmn1 type isellist-month.

at selection-screen on value-request for p_yrmn1.
  perform yrmn_help_f4 changing p_yrmn1.

*&---------------------------------------------------------------------*
*&      Form  YRMN_HELP_F4
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->PA_YRMN    text
*----------------------------------------------------------------------*
form yrmn_help_f4 changing pa_yrmn.
  data l_date type isellist-month.
  l_date = sy-datum+0(6).
  call function 'POPUP_TO_SELECT_MONTH'
    exporting
      actual_month               = l_date
    importing
      selected_month             = pa_yrmn
    exceptions
      factory_calendar_not_found = 1
      holiday_calendar_not_found = 2
      month_not_found            = 3
      others                     = 4.
  if sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  endif.

endform.                    "YRMN_HELP_F4

posted @ 2010-12-15 15:58  Kaming's SAP  阅读(478)  评论(0编辑  收藏  举报