ABAP--如何将月份转化为对应文本(代码摘抄)
2007-10-30 15:49
363 查看
*&---------------------------------------------------------------------*
*& 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
*& 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
相关文章推荐
- ABAP--如何将月份转化为对应文本(代码摘抄)
- ABAP--如何将月份转化为对应文本(代码摘抄)
- ABAP--如何将月份转化为对应文本(代码摘抄)
- ABAP--如何将月份转化为对应文本(代码摘抄)
- 【abap】SE24维护类、接口interface(如何看懂CO03事务码对应的abap代码)
- abap:如何将数字转化为文本?
- Excel-如何将含有对应值得单元格高亮显示的代码摘抄
- MyEclipse在哪里查看JSP转化为Servlet时的对应Java代码?
- EDITOR-CALL语句的使用:修改abap内表的内容(代码摘抄)
- 论--如何通过代码解析plist文件创建对应的控制器,以及控制器中的控件
- 获取当年年份 月份判断星期几 如何写个程序计算出每个月的第一个星期一对应的日期
- ABAP--如何写动态台账统计表(简单代码)
- 如何根据Kernel Oops中的地址找到对应的代码行
- 音视频技术--H.264代码与标准如何对应
- Microsoft Visual studio2013如何编写文本代码
- xamarin android 在代码中如何设置文本颜色
- 如何使用代码动态设置水晶报表中的文本,字段等对象呢?
- 如何快速找出网页中事件对应的js代码片段
- 如何隐藏你写的ABAP代码
- js中如何把字符串转化为对象、数组示例代码