ABAP--如何将月份转化为对应文本(代码摘抄)

*&---------------------------------------------------------------------*
*& Form GET_NAME_MONTH
*&---------------------------------------------------------------------*
* Get the name of the month passed as parameter
*----------------------------------------------------------------------*
* -->P_INT_MONTH_WA_MONTH Month's Number
* <--P_MONTH_NAME Month's Name
*----------------------------------------------------------------------*
form get_name_month using p_int_month_wa_month like t247-mnr
changing p_month_name like t247-ltx.
*
data: names_month like t247 occurs 0 with header line,
subrc like sy-subrc.
*

call function 'MONTH_NAMES_GET'
exporting
language = sy-langu
importing
return_code = subrc
tables
month_names = names_month
exceptions
month_names_not_found = 1
others = 2.
if sy-subrc ne 0.
retcode_r = 21.
endif.

if subrc ne pve00_ok.
clear p_month_name.
else.
loop at names_month where mnr = p_int_month_wa_month. endloop.
if sy-subrc ne pve00_ok.
clear p_month_name.
else.
p_month_name = names_month-ltx.
endif.
endif.
endform. " GET_NAME_MONTH

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值