BI 7.0 New Features - Transformation - Object oriented ABAP

本文对比了BI3.5与BI7.0环境下ABAP编程的不同之处,特别是在内部表处理方面的变化。介绍了在BI7.0环境中如何定义结构和内部表,并展示了从内部表读取数据的具体方法。此外,还提供了调试转换例程及验证自动生成例程有效性的建议。

In BI 7.0 environment, transformation (formerly called Update/Transfer rules) requires object oriented ABAP and here are some difference worth noting down between Object oriented ABAP and ABAP which would help you in working with BI 7.0.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

BI 3.5

BI 7.0

Internal Table

DATA: BEGIN OF INT_EBELN OCCURS 0,
OI_EBELN
LIKE /BI0/POI_EBELN-OI_EBELN,
/BIC/ZMEXPDGRP
LIKE /BI0/POI_EBELN-/BIC/ZMEXPDGRP,
/BIC/ZMPOVERNO
LIKE /BI0/POI_EBELN-/BIC/ZMPOVERNO,
/BIC/ZMPURSTAT
LIKE /BI0/POI_EBELN-/BIC/ZMPURSTAT,
/BIC/ZMPORLSON
LIKE /BI0/POI_EBELN-/BIC/ZMPORLSON,
/BIC/ZMVALD_PO
LIKE /BI0/POI_EBELN-/BIC/ZMVALD_PO,
END OF INT_EBELN.

It's 2 step process in BI <?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /><chsdate w:st="on" isrocdate="False" islunardate="False" day="30" month="12" year="1899">7.0. 1</chsdate>st step declare the structure and in 2nd step declare Internal table referring to the above structure
TYPES: BEGIN OF INT_EBELN_STRU,
OI_EBELN
TYPE /BI0/POI_EBELN-OI_EBELN,
/BIC/ZMEXPDGRP
TYPE /BI0/POI_EBELN-/BIC/ZMEXPDGRP,
/BIC/ZMPOVERNO
TYPE /BI0/POI_EBELN-/BIC/ZMPOVERNO,
/BIC/ZMPURSTAT
TYPE /BI0/POI_EBELN-/BIC/ZMPURSTAT,
/BIC/ZMPORLSON
TYPE /BI0/POI_EBELN-/BIC/ZMPORLSON,
/BIC/ZMVALD_PO
TYPE /BI0/POI_EBELN-/BIC/ZMVALD_PO,
END OF INT_EBELN_STRU.
DATA: INT_EBELN TYPE TABLE OF INT_EBELN_STRU.

Reading data from Internal Table

READ TABLE INT_EBELN INTO WA_PO WITH KEY
OI_EBELN = DATA_PACKAGE-OI_EBELN BINARY SEARCH.
IF SY-SUBRC = 0.
DATA_PACKAGE-/BIC/ZMVALD_PO = WA_PO-/BIC/ZMVALD_PO.
DATA_PACKAGE-/BIC/ZMEXPDGRP = WA_PO-/BIC/ZMEXPDGRP.
DATA_PACKAGE-/BIC/ZMPORLSON = WA_PO-/BIC/ZMPORLSON.
DATA_PACKAGE-/BIC/ZMPURSTAT = WA_PO-/BIC/ZMPURSTAT.

1st define a Work area and read from there.
WA_PO LIKE LINE OF INT_EBELN à Work Area
READ TABLE INT_EBELN INTO WA_PO WITH KEY
OI_EBELN =
WA_DATA_PACKAGE-OI_EBELN BINARY SEARCH.
IF SY-SUBRC = 0.
WA_DATA_PACKAGE-/BIC/ZMVALD_PO = WA_PO-/BIC/ZMVALD_PO.
WA_DATA_PACKAGE-/BIC/ZMEXPDGRP = WA_PO-/BIC/ZMEXPDGRP.
WA_DATA_PACKAGE-/BIC/ZMPORLSON = WA_PO-/BIC/ZMPORLSON.
WA_DATA_PACKAGE-/BIC/ZMPURSTAT = WA_PO-/BIC/ZMPURSTAT.

Data Package

Data: DATA_PACKAGE type table of _ty_s_SC_1,
WA_DATA_PACKAGE LIKE LINE OF DATA_PACKAGE.

<place w:st="on"><span lang="EN-US" style="FONT-SIZE: 8.5pt; COLOR: blue; FONT-FAMILY: Tahoma; mso-font-kerning: 0pt">Loop</span></place> Statement

LOOP AT DATA_PACKAGE.

LOOP AT DATA_PACKAGE INTO WA_DATA_PACKAGE

Some points for consideration

1) We need to familiarize ourselves with transformation as well as DTP and the integration of both in the process chain. These are dependent once we perform data loads in production.

2) Check the validity of the routines generated from the auto transformation. You may also want to improve the existing routines or the overall transformation flow as well.

3) To debug a transformation routines you can use DTP (Tab: Execute >processing mode> serially in the Dialog Process (for debugging).

And Finally, Below is a very useful link from SAP BI help library which describes in a step-by-step how to migrate your data flow to the new concept (transformations and DTP's):

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值