ABAP中年月搜索帮助的实现

本文介绍了一个 ABAP 程序中实现的月历选择器,通过使用参数 p_yrmn1 和调用 'POPUP_TO_SELECT_MONTH' 函数,用户可以方便地选择月份。当用户请求值时,会触发 F4 帮助函数 yrmn_help_f4,显示月历供用户选择。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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

转载于:https://www.cnblogs.com/andyfurong/archive/2010/12/15/1906882.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值