BW DTP过滤器中的程序使用
2013-07-05 16:37
155 查看
BW DTP过滤器中的程序使用
*&---------------------------------------------------------------------*
*& Include RSBC_SEL_ROUTINE_TPL
*&---------------------------------------------------------------------*
program conversion_routine.
* Type pools used by conversion program
type-pools: rsarc, rsarr, rssm.
tables: rssdlrange.
* Global code used by conversion rules
*$*$ begin of global - insert your declaration only below this line *-*
* TABLES: ...
* DATA: ...
*$*$ end of global - insert your declaration only before this line *-*
* -------------------------------------------------------------------
* Fieldname = CALMONTH
* data type = NUMC
* length = 000006
* -------------------------------------------------------------------
form compute_CALMONTH
tables l_t_range structure rssdlrange
using i_r_request type ref to IF_RSBK_REQUEST_ADMINTAB_VIEW
i_fieldnm type RSFIELDNM
changing p_subrc like sy-subrc.
* Insert source code to current selection field
*$*$ begin of routine - insert your code only below this line *-*
*程序开始
-----------------------------------------------------------------------------------------------------------------------
data: l_idx like sy-tabix.
read table l_t_range with key
fieldname = 'CALMONTH'.
l_idx = sy-tabix.
data: lastmonthday type sy-datum.
=====以下两行比较重要,一般测试不起作用就是因为这两行没有添加=========
l_t_range-iobjnm = '0CALMONTH'.
l_t_range-fieldname = 'CALMONTH'.
===============================================================
l_t_range-sign = 'I'.
l_t_range-option = 'BT'.
*取上月日期
CALL FUNCTION 'ZCCM_GO_BACK_MONTHS'
EXPORTING
CURRDATE = sy-datum
BACKMONTHS = '1'
IMPORTING
newdate = lastmonthday.
l_t_range-low = lastmonthday+0(6).
l_t_range-high = sy-datum+0(6).
*....
if l_idx <> 0.
modify l_t_range index l_idx.
else.
append l_t_range.
endif.
p_subrc = 0.
*$*$ end of routine - insert your code only before this line *-*
endform.
*&---------------------------------------------------------------------*
*& Include RSBC_SEL_ROUTINE_TPL
*&---------------------------------------------------------------------*
program conversion_routine.
* Type pools used by conversion program
type-pools: rsarc, rsarr, rssm.
tables: rssdlrange.
* Global code used by conversion rules
*$*$ begin of global - insert your declaration only below this line *-*
* TABLES: ...
* DATA: ...
*$*$ end of global - insert your declaration only before this line *-*
* -------------------------------------------------------------------
* Fieldname = CALMONTH
* data type = NUMC
* length = 000006
* -------------------------------------------------------------------
form compute_CALMONTH
tables l_t_range structure rssdlrange
using i_r_request type ref to IF_RSBK_REQUEST_ADMINTAB_VIEW
i_fieldnm type RSFIELDNM
changing p_subrc like sy-subrc.
* Insert source code to current selection field
*$*$ begin of routine - insert your code only below this line *-*
*程序开始
-----------------------------------------------------------------------------------------------------------------------
data: l_idx like sy-tabix.
read table l_t_range with key
fieldname = 'CALMONTH'.
l_idx = sy-tabix.
data: lastmonthday type sy-datum.
=====以下两行比较重要,一般测试不起作用就是因为这两行没有添加=========
l_t_range-iobjnm = '0CALMONTH'.
l_t_range-fieldname = 'CALMONTH'.
===============================================================
l_t_range-sign = 'I'.
l_t_range-option = 'BT'.
*取上月日期
CALL FUNCTION 'ZCCM_GO_BACK_MONTHS'
EXPORTING
CURRDATE = sy-datum
BACKMONTHS = '1'
IMPORTING
newdate = lastmonthday.
l_t_range-low = lastmonthday+0(6).
l_t_range-high = sy-datum+0(6).
*....
if l_idx <> 0.
modify l_t_range index l_idx.
else.
append l_t_range.
endif.
p_subrc = 0.
*$*$ end of routine - insert your code only before this line *-*
endform.
相关文章推荐
- 过滤器[登录+编码]filter在程序中的使用
- 过滤器[登录+编码]filter在程序中的使用
- BW:DTP过滤器的例程
- QT学习之阻拦退出程序函数以及事件过滤器的使用,以及文件的操作。
- BW DTP过滤器的例程
- 使用c#创建一个可以监视全局鼠标位置的程序
- 使用profile来得到程序运行信息
- 改善C#程序的50种方法 条款6:明辨值类型和引用类型的使用场合
- C#如何限制程序内存使用的大小
- 改善C#程序的建议6:在线程同步中使用信号量
- 如何在MFC程序中使用Open Inventor
- 使用MFC编写绘图程序的总结
- 端口扫描程序nmap使用手册
- SAP物料清单导入(生成程序后可直接使用)
- 使用Settings Bundle为程序添加设置项
- 程序编写规范、优化时使用的关键字含义
- SPEC benchmark 测试程序使用教程
- 一个使用JAVA编写的类似按键精灵的程序,支持脚本文件编写(含源代码)
- 使用Android开发打电话程序
- C#程序安装.net服务(不使用InstallUtil.exe)