End Routine

*---------------------------------------------------------------------*
* CLASS routine DEFINITION
*---------------------------------------------------------------------*
*
*---------------------------------------------------------------------*
CLASS lcl_transform DEFINITION.
PUBLIC SECTION.
* Attributs
DATA:
p_check_master_data_exist
TYPE RSODSOCHECKONLY READ-ONLY,
*- Instance for getting request runtime attributs;
* Available information: Refer to methods of
* interface 'if_rsbk_request_admintab_view'
p_r_request
TYPE REF TO if_rsbk_request_admintab_view READ-ONLY.
PRIVATE SECTION.
TYPE-POOLS: rsd, rstr.
* Rule specific types
TYPES:
BEGIN OF _ty_s_TG_1,
* Field: RECORD.
RECORD TYPE RSARECORD,
* InfoObject: 0BILL_NUM Billing document.
BILL_NUM TYPE /BI0/OIBILL_NUM,
* InfoObject: 0BILL_ITEM Billing item.
BILL_ITEM TYPE /BI0/OIBILL_ITEM,
* InfoObject: 0RECORDMODE BW Delta Process: Update Mode.
RECORDMODE TYPE RODMUPDMOD,
* InfoObject: 0BILL_TYPE Billing Type.
BILL_TYPE TYPE /BI0/OIBILL_TYPE,
* InfoObject: 0BILL_DATE Date for invoice/billing index and printou
*t.
BILL_DATE TYPE /BI0/OIBILL_DATE,
* InfoObject: ZJBUKRS 公司.
/BIC/ZJBUKRS TYPE /BIC/OIZJBUKRS,
* InfoObject: ZJKUNNR 客户.
/BIC/ZJKUNNR TYPE /BIC/OIZJKUNNR,
* InfoObject: 0SOLD_TO Sold-to party.
SOLD_TO TYPE /BI0/OISOLD_TO,
* InfoObject: 0SHIP_TO Ship-To Party.
SHIP_TO TYPE /BI0/OISHIP_TO,
* InfoObject: 0PAYER Payer.
PAYER TYPE /BI0/OIPAYER,
* InfoObject: 0BILLTOPRTY Bill-to party.
BILLTOPRTY TYPE /BI0/OIBILLTOPRTY,
* InfoObject: 0BILL_CAT Billing category.
BILL_CAT TYPE /BI0/OIBILL_CAT,
* InfoObject: 0SALES_OFF Sales Office.
SALES_OFF TYPE /BI0/OISALES_OFF,
* InfoObject: 0SALES_GRP Sales group.
SALES_GRP TYPE /BI0/OISALES_GRP,
* InfoObject: 0SALESORG Sales Organization.
SALESORG TYPE /BI0/OISALESORG,
* InfoObject: 0DISTR_CHAN Distribution Channel.
DISTR_CHAN TYPE /BI0/OIDISTR_CHAN,
* InfoObject: 0INV_QTY Billing Quantity in Sales Units.
INV_QTY TYPE /BI0/OIINV_QTY,
* InfoObject: 0MATL_GROUP Material group.
MATL_GROUP TYPE /BI0/OIMATL_GROUP,
* InfoObject: ZJMATNR 物料.
/BIC/ZJMATNR TYPE /BIC/OIZJMATNR,
* InfoObject: 0NETVAL_INV Net Value of Billing Item in Document Cur
*rency.
NETVAL_INV TYPE /BI0/OINETVAL_INV,
* InfoObject: 0SALES_UNIT Sales unit.
SALES_UNIT TYPE /BI0/OISALES_UNIT,
* InfoObject: 0DOC_CURRCY Document currency.
DOC_CURRCY TYPE /BI0/OIDOC_CURRCY,
* InfoObject: 0ITEM_CATEG Sales document item category.
ITEM_CATEG TYPE /BI0/OIITEM_CATEG,
* InfoObject: ZJWERKS 工厂.
/BIC/ZJWERKS TYPE /BIC/OIZJWERKS,
* InfoObject: 0DOC_NUMBER Sales document.
DOC_NUMBER TYPE /BI0/OIDOC_NUMBER,
* InfoObject: 0S_ORD_ITEM Sales document item.
S_ORD_ITEM TYPE /BI0/OIS_ORD_ITEM,
* InfoObject: 0DOC_TYPE Sales document type.
DOC_TYPE TYPE /BI0/OIDOC_TYPE,
* InfoObject: 0DOC_CATEG Sales Document Category.
DOC_CATEG TYPE /BI0/OIDOC_CATEG,
* InfoObject: 0FISCVARNT Fiscal year variant.
FISCVARNT TYPE /BI0/OIFISCVARNT,
* InfoObject: 0CALDAY Calendar Day.
CALDAY TYPE /BI0/OICALDAY,
* InfoObject: 0CALWEEK Calendar Year/Week.
CALWEEK TYPE /BI0/OICALWEEK,
* InfoObject: 0CALMONTH Calendar Year/Month.
CALMONTH TYPE /BI0/OICALMONTH,
* InfoObject: 0CALMONTH2 Calendar month.
CALMONTH2 TYPE /BI0/OICALMONTH2,
* InfoObject: 0CALQUARTER Calendar year/quarter.
CALQUARTER TYPE /BI0/OICALQUARTER,
* InfoObject: 0CALQUART1 Quarter.
CALQUART1 TYPE /BI0/OICALQUART1,
* InfoObject: 0CALYEAR Calendar Year.
CALYEAR TYPE /BI0/OICALYEAR,
* InfoObject: 0FISCPER Fiscal year / period.
FISCPER TYPE /BI0/OIFISCPER,
* InfoObject: 0FISCPER3 Posting period.
FISCPER3 TYPE /BI0/OIFISCPER3,
* InfoObject: 0FISCYEAR Fiscal year.
FISCYEAR TYPE /BI0/OIFISCYEAR,
END OF _ty_s_TG_1.
TYPES:
_ty_t_TG_1 TYPE STANDARD TABLE OF _ty_s_TG_1
WITH NON-UNIQUE DEFAULT KEY.
*$*$ begin of global - insert your declaration only below this line *-*
... "insert your code here
*$*$ end of global - insert your declaration only before this line *-*
METHODS
new_record__end_routine
IMPORTING
source_segid type rstran_segid
source_record type sytabix
EXPORTING
record_new type sytabix.
METHODS
end_routine
IMPORTING
request type rsrequest
datapackid type rsdatapid
EXPORTING
monitor type rstr_ty_t_monitors
CHANGING
RESULT_PACKAGE type _ty_t_TG_1
RAISING
cx_rsrout_abort.
METHODS
inverse_end_routine
IMPORTING
i_th_fields_outbound TYPE rstran_t_field_inv
i_r_selset_outbound TYPE REF TO cl_rsmds_set
i_is_main_selection TYPE rs_bool
i_r_selset_outbound_complete TYPE REF TO cl_rsmds_set
i_r_universe_inbound TYPE REF TO cl_rsmds_universe
CHANGING
c_th_fields_inbound TYPE rstran_t_field_inv
c_r_selset_inbound TYPE REF TO cl_rsmds_set
c_exact TYPE rs_bool.
ENDCLASS. "routine DEFINITION
*$*$ begin of 2nd part global - insert your code only below this line *
... "insert your code here
*$*$ end of 2nd part global - insert your code only before this line *
*---------------------------------------------------------------------*
* CLASS routine IMPLEMENTATION
*---------------------------------------------------------------------*
*
*---------------------------------------------------------------------*
CLASS lcl_transform IMPLEMENTATION.
*----------------------------------------------------------------------*
* Method end_routine
*----------------------------------------------------------------------*
* Calculation of result package via end routine
* Note: Update of target fields depends on rule assignment in
* transformation editor. Only fields that have a rule assigned,
* are updated to the data target.
*----------------------------------------------------------------------*
* <-> result package
*----------------------------------------------------------------------*
METHOD end_routine.
*=== Segments ===
FIELD-SYMBOLS:
<RESULT_FIELDS> TYPE _ty_s_TG_1.
DATA:
MONITOR_REC TYPE rstmonitor.
*$*$ begin of routine - insert your code only below this line *-*
... "insert your code here
*-- fill table "MONITOR" with values of structure "MONITOR_REC"
*- to make monitor entries
... "to cancel the update process
* raise exception type CX_RSROUT_ABORT.
DATA:t_docinfo TYPE TABLE OF _ty_s_TG_1.
DATA:wa_docinfo TYPE _ty_s_TG_1.
**=======调试使用
Data: t_zjzjtest TYPE TABLE OF zjzjtest .
DATA wa_zjzjtest type zjzjtest.
**=======end
SELECT DOC_NUMBER s_ord_item doc_type doc_categ
INTO CORRESPONDING FIELDS OF TABLE t_docinfo
FROM /bic/azjsd_d2100 FOR ALL ENTRIES IN RESULT_PACKAGE
WHERE doc_number = RESULT_PACKAGE-doc_number and s_ord_item =
RESULT_PACKAGE-s_ord_item.
sort t_docinfo by DOC_NUMBER s_ord_item ASCENDING.
LOOP AT RESULT_PACKAGE ASSIGNING <RESULT_FIELDS> .
READ TABLE t_docinfo WITH key DOC_NUMBER = <RESULT_FIELDS>-DOC_NUMBER
s_ord_item = <RESULT_FIELDS>-S_ORD_ITEM BINARY SEARCH INTO
wa_docinfo.
<RESULT_FIELDS>-doc_type = wa_docinfo-doc_type.
<RESULT_FIELDS>-doc_categ = wa_docinfo-doc_categ.
**=======调试使用
CONCATENATE wa_docinfo-DOC_NUMBER wa_docinfo-s_ord_item
wa_docinfo-doc_type wa_docinfo-doc_categ
INTO wa_zjzjtest-f1 SEPARATED BY ` `.
APPEND wa_zjzjtest to t_zjzjtest.
**=======end
ENDLOOP.
**=======调试使用
DELETE FROM zjzjtest.
MODIFY zjzjtest from TABLE t_zjzjtest.
**=======end
*$*$ end of routine - insert your code only before this line *-*
ENDMETHOD. "end_routine
*----------------------------------------------------------------------*
* Method inverse_end_routine
*----------------------------------------------------------------------*
*
* This subroutine needs to be implemented only for direct access
* (for better performance) and for the Report/Report Interface
* (drill through).
* The inverse routine should transform a projection and
* a selection for the target to a projection and a selection
* for the source, respectively.
* If the implementation remains empty all fields are filled and
* all values are selected.
*
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
METHOD inverse_end_routine.
*$*$ begin of inverse routine - insert your code only below this line*-*
... "insert your code here
*$*$ end of inverse routine - insert your code only before this line *-*
ENDMETHOD. "inverse_end_routine
METHOD new_record__end_routine.
***** IMPLEMENTATION is only visible in generated program *****
ENDMETHOD.
ENDCLASS. "routine IMPLEMENTATION
End Routine的更多相关文章
- What is the difference between routine , method , procedure , function ? please explain it with example?
a method is named and attached to an object. so, for example, a method is like a function but is con ...
- Routine Problem(数学)
Routine Problem time limit per test 1 second memory limit per test 256 megabytes input standard inp ...
- ABAP中Conversion Routine示例
在SAP的Domain定义中,Output Length下面有个Convers. routine的标识,这是SAP用来进行输入输出转换的.我们知道,屏幕上的I/O字段都是字符串形式的,而数 ...
- 用完成例程(Completion Routine)实现的重叠I/O模型
/// 用完成例程(Completion Routine)实现的重叠I/O模型 /// 异步IO模型 /// 用完成例程来实现重叠I/O比用事件通知简单得多.在这个模型中,主线程只用不停的接受连接 / ...
- mysql存储过程出现OUT or INOUT argument 10 for routine
OUT or INOUT argument 10 for routine * is not a variable or NEW pseudo-variable 我查网上很多出现在call的时候没有添加 ...
- mysql存储过程 OUT or INOUT argument 3 for routine
mysql存储过程出现: OUT or INOUT argument 3 for routine gotask.UserLogin is not a variable or NEW pseudo-va ...
- 十字链表 Codeforces Round #367 E Working routine
// 十字链表 Codeforces Round #367 E Working routine // 题意:给你一个矩阵,q次询问,每次交换两个子矩阵,问最后的矩阵 // 思路:暴力肯定不行.我们可以 ...
- SAP BW 例程(Routine)【开始例程、关键值或特性的例程、结束例程】
定义 可以使用例程定义关键值或特性的复杂的转换规则. 例程是本地 ABAP 类,它们包括预定义的定义和实施范围.进站和出站参数的 TYPES及方法签名都存储在定义范围中.实际例程创建于实施范围中.使用 ...
- mysql create routine 权限的一些说明
1.如果用户有create routine 权限那么他就可以创建procedure | function . 2.如果用户创建了procedure | function 那么mysql 会自动赋予它对 ...
随机推荐
- php课程---JavaScript与Jquery的区别
使用Jquery必须在页面内引入一个Jquery包 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" ...
- codeforces480E Parking Lot
题目大意:给一个点阵,其中有的地方没有点,操作是去掉某个点,并询问当前点阵中最大的正方形 若没有修改的话,裸dp 加上修改,可以考虑时光倒流,这样答案就是递增的 可以用并查集维护点的连通性,O^2的 ...
- Python2.x和3.x主要差异总结
本文部分转载自http://my.oschina.net/chihz/blog/123437,部分来自自身修改 开始使用Python之后就到处宣扬Python如何如何好,宣传工作的一大重要诀窍就是做对 ...
- Python格式化字符串
在编写程序的过程中,经常需要进行格式化输出,每次用每次查.干脆就在这里整理一下,以便索引. 格式化操作符(%) "%"是Python风格的字符串格式化操作符,非常类似C语言里的pr ...
- JS之原型对象
1.__proto__ 每个对象都有一个__proto__属性,指向该对象的原型对象 <script> var person = function(name,city){ this.nam ...
- 优化SQL Sever查询语句的几个要点
1.不要在Where子句中的“=”左边进行函数.算术运算或其他表达式运算,否则系统将可能无法正确使用索引. 2.尽量不要在Where条件中使用函数,否则将不能利用索引. 3.在Where条件中使用明确 ...
- centos7 yum安装mysql5.7并在root密码忘记的情况下重设密码
CentOS7的yum源中默认好像是没有mysql的.为了解决这个问题,我们要先下载mysql的repo源. 1. 下载mysql的repo源 1 $ wget http://repo.mysql ...
- rabbitmq redis
RabbitMQ RabbitMQ是一个在AMQP基础上完整的,可复用的企业消息系统. 对于RabbitMQ来说,生产和消费不再针对内存里的一个Queue对象,而是某台服务器上的RabbitMQ Se ...
- ios - 文件保存路径的获取
"应用程序包": 这里面存放的是应用程序的源文件,包括资源文件和可执行文件. 获取方式: NSString *path = [[NSBundle mainBundle] bundl ...
- 字节流和字符流(InputStream类和OutputStream类)
java流包括字节流和字符流,字节流通过I/O设备以字节数据的方式读入,而字符流则是通过字节流读入数据转换成字符"流"的形式由用户驱使. InputStream是所有字节输入流的父 ...