You are on page 1of 14

www.sap-press.

com 1
ABAP Development for SAP BWUser Exits and BAdIs
Dirk Herzog
Contents
1 Introduction ................................................ 3
2 Performance ................................................ 5
2.1 Table Types in ABAP ............................. 5
2.2 Loops and Read Accesses to Tables .... 7
2.3 Field Symbols ........................................ 7
2.4 Database Accesses and Cache .............. 8
3 User Exits and BAdIs in the
Extraction Process .................................... 11
3.1 Usage Options ...................................... 11
3.2 Generic Extractors ................................ 11
3.3 User Exit RSAP0001 ............................. 14
Use ........................................................ 15
Structured Composition of
the ZXRSAU01 Include ......................... 16
Implementing the User Exit EXIT_
SAPLRSAP_001 for Currency
Extraction .............................................. 19
Using the Hierarchy Exit ....................... 20
Surrogate for the Generic Hierarchy
Extractor ............................................... 22
Transferring Parameters to the
User Exit ................................................ 22
3.4 BAdI RSU5_SAPI_BADI ......................... 22
Advantages and Disadvantages ............ 23
4 User Exits in Data Import
Processes ...................................................... 25
4.1 Transformation ...................................... 25
Deriving Characteristics ........................ 26
Deriving Key Figures ............................. 29
Start Routine in the Transformation ..... 32
End Routine in the Transformation ...... 35
Expert Routine in the Transformation .. 35
4.2 Importing a Hierarchy from an
Unstructured Excel Sheet .................... 43
Creating the DataStore Object ............. 44
Creating the DataSource ...................... 45
Creating the Transformation ................. 46
Creating the Start Routine .................... 46
Creating the End Routine ..................... 48
Creating a DTP ..................................... 52
Creating a Query .................................. 53
Implementation in SAP BW 3.x ............ 55
4.3 Transfer Rules in SAP BW 3.x ............... 55
Start Routine in the Transfer Rule ........ 56
Routine for InfoObject Derivation ....... 59
Implementing the InfoObject
Derivation ............................................. 63
4.4 Update Rules in SAP BW 3.x ................ 65
Start Routine ........................................ 66
Example ................................................ 67
Characteristic Calculation .................... 68
Key Figure Derivation ........................... 69
Unit Calculation ................................... 70
Return Table .......................................... 72
5 User Exits and BAdls in Reporting .... 73
5.1 Variable Exit RSR00001 ........................ 73
Interface of Function Module EXIT_
SAPLRSR0_001 ..................................... 74
Implementation for I_STEP = 1 ............ 76
Implementation for I_STEP = 2 ............ 79
Implementation for I_STEP = 0 ............ 81
Implementation for I_STEP = 3 ........... 82
2 Galileo Press 2007. All rights reserved.
Contents
Validating an Individual Variable .......... 83
Checking Characteristic Combinations
in Step 3 ............................................... 83
5.2 Virtual Key Figures and
Characteristics ...................................... 86
Advantages and Disadvantages ............ 86
Implementation .................................... 87
Other Useful Information ..................... 93
Transferring Variable Values to
the BAdI ................................................ 94
5.3 VirtualProviders ................................... 94
Creating a Virtual Provider ................... 95
Dos and Don'ts for the Implementation
of the Service ........................................ 97
5.4 BAdI SMOD_RSR00004 ...................... 99
6 Summary ...................................................... 103
A Appendix ...................................................... 105
A.1 Other BAdIs and User Exits in
SAP NetWeaver BI ................................ 105
A.2 Generated Tables and Objects in
SAP NetWeaver BI ................................ 106
Index .............................................................. 109
www.sap-press.com 25
4 User Exits in Data Import Processes
Whereas the adjustment of extractor results predomi-
nantly occurs only with selected DataSources , most data
import processes in SAP NetWeaver BI involve a user exit
that is run through between the DataSource and the Info-
Provider . This may be done for conversion purposes, for
the derivation of new characteristics , or for data cleansing .
Because the entire logic of SAP NetWeaver Business Intel-
ligence has been changed signicantly in SAP NetWeaver
2004s , Section 4.1 provides a detailed description of
the transformation options that have been newly imple-
mented. Compared to the options available in the transfer
and update rules, the transformation options have been
extended substantially and provide new features.
The only disadvantage is that methods are generated
instead of form routines, which is why the code of the
exit itself is checked for the more rigid syntax of ABAP
Objects . However, those of you who want to become
more engaged in this subject matter will probably con-
sider this an advantage, as it enables you to employ a
clean and consistent way of programming. And those of
you who still don't want to be involved still have the
chance to call a function module and thus return to the
good old ABAP syntax.
4.1 Transformation
The method of transformation was newly introduced for
SAP NetWeaver 2004s . It standardizes the transfer and
update rules taken from SAP BW 3.x. While the transfer
rules were only applied between DataSources and Info-
Sources and the update rules only between InfoSources
and InfoProviders
1
, the transformation can be used to
link any data source to the data targets.
1 Technically speaking, an InfoSource is also included during a
data update from a DataStore object into an InfoProvider. You
can see that by displaying the generated objects in the Admin-
istrator Workbench.
In addition, you have the option to display the rules
graphically. Figure 4.1 shows the graphical display of the
transformation in SAP NetWeaver 2004s. The data source
and target are specied in the header next to the name
of the transformation. Below the header, the graphic dis-
plays a section of the data source structure, while the
right-hand part of the graphic displays a section of a rule
group. The rule group is a structure that corresponds to
the structure of the data target. It is supposed to enable
you to derive several data records in the data target from
one source record, as is possible in SAP BW 3.x. The
arrows displayed in the graphic indicate which elds of
the data source are transformed into the corresponding
elds of the data target.
Along with the improved exit implementation options,
you should also use the transformation option for newly
created objects in SAP NetWeaver 2004s. It depends on
each individual case whether it is worthwhile to convert
the old data ows . In any event, you should consider this
in cases where only InfoObject assignments are used in
the update or transfer rules and where you can delete the
InfoSource being used. In all other cases, it is only worth
the effort if you want to revise the rule completely, ben-
et from the advantages provided by the new routines,
or if you have to standardize the routines in order to keep
a clear overview of SAP NetWeaver BI. The last issue is
especially necessary in enterprise data warehouses , and
I'd say that anyone who has carried out at least three
different projects with three different project teams will
agree that it is absolutely necessary to implement a cer-
tain structure.
26 Galileo Press 2007. All rights reserved.
4 User Exits in Data Import Processes
The transformation contains a total of ve exits:

Exit for determining the key gures and data elds


2

Exit for determining the characteristics and key elds


3

Start routine

End routine

Expert routine
The expert routine completely replaces the graphical
modeling process and enables you to convert each data
package from the source into the target structure in a
single routine. In SAP NetWeaver 2004s , the end routine
and the expert routine have been newly implemented in
the transformation, while the transfer and update rules
in SAP BW 3.x only contained the rst three exits. In the
2 If you update into an InfoCube, only the key gures are cal-
culated, whereas if you update into a DataStore object (in
SAP BW 3.x: ODS object) all data elds are calculated. In an
InfoObject it is the attributes and texts that are calculated.
3 Similarly, in this exit the characteristics are determined in an
InfoCube, the key elds in a DataStore, while the value of an
InfoObject and of compounded characteristics, if available,
and are determined in an InfoObject.
following sections, you'll see how much the end routine
and the expert routine can improve your life as a pro-
grammer.
Deriving Characteristics
The derivation of characteristics and key elds is certainly
the simplest type of derivation in the context of BW exits
because it contains the fewest variants. The characteris-
tic derivation is required in many different scenarios: for
instance, if elds from the source system are not deliv-
ered, if the elds in the source system have a different
structure than those in SAP NetWeaver BI, if a conversion
needs to be performed, or if time characteristics must
be converted for which no standard conversion has been
implemented.
1. To create a routine for deriving characteristics, dou-
ble-click on the characteristic for which you want to
create the routine. This takes you to the Rule Details
dialog.
Figure 4.1 Graphical Display of a Transformation
www.sap-press.com 27
2. Here you must select the item Routine in the Rule
Type eld. Then you can create the routine by click-
ing on the Create button next to the eld (see Figure
4.2).
Figure 4.2 Creating a Routine
SAP NetWeaver BI then generates a main class that
will contain only the implementation. Listing 4.1
shows the generated code. The data input consists of
the record number, the number of data records, the
source structure of the current data record, and some
information on the status of the data import process.
The required output should contain the characteristic
value and some status information.
PROGRAM trans_routine.
*---------------------------------------*
* CLASS routine DEFINITION
*---------------------------------------*
*
*---------------------------------------*
CLASS routine DEFINITION.
PUBLIC SECTION.
TYPES:
BEGIN OF _ty_s_SC_1,
* InfoObject: 0METYPE Key Figure Type.
METYPE TYPE /BI0/OIMETYPE,
END OF _ty_s_SC_1.
TYPES:
BEGIN OF _ty_s_TG_1,
* InfoObject: 0METYPE Key Figure Type.
METYPE TYPE /BI0/OIMETYPE,
END OF _ty_s_TG_1.
PRIVATE SECTION.
TYPE-POOLS: rsd, rstr.
*$*$ 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
compute_0METYPE
IMPORTING
request TYPE rsrequest
datapackid TYPE rsdatapid
SOURCE_FIELDS TYPE _ty_s_SC_1
EXPORTING
RESULT TYPE _ty_s_TG_1-METYPE
monitor TYPE rstr_ty_t_monitor
RAISING
cx_rsrout_abort
cx_rsrout_skip_record.
ENDCLASS. "routine DEFINITION
*---------------------------------------*
* CLASS routine IMPLEMENTATION
*---------------------------------------*
*
*---------------------------------------*
CLASS routine IMPLEMENTATION.
METHOD compute_0METYPE.
DATA:
MONITOR_REC TYPE rsmonitor.
*$*$ 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.
... "to skip a record
* raise exception type
* CX_RSROUT_SKIP_RECORD.
* result value of the routine
RESULT = .
*$*$ end of routine - insert your code
* only before this line *-*
ENDMETHOD. "compute_0METYPE
ENDCLASS. "routine IMPLEMENTATION
Listing 4.1 Generated Characteristic Derivation Method
4.1 Transformation
28 Galileo Press 2007. All rights reserved.
4 User Exits in Data Import Processes
If you are not yet familiar with object-oriented program-
ming, you shouldn't panic. Because the main class is pre-
dened, you can focus entirely on implementing the logic
and don't need to bother about inheritance, interfaces,
attributes, and so on. At this point that's much easier
even than implementing a Business Add-In.
But let's take a detailed look at Listing 4.1. At the
beginning, two types are dened: _ty_s_SC_1 and _ty_
s_TG_1. The contents of both types depend on the elds
you want to link to each other in the graphical model-
ing process. In the most simple case, which is the one
described above, it is only the eld 0METYPE of the data
source that is linked to the eld 0METYPE of the data tar-
get. Therefore, both types obtain exactly this eld.
In the subsequent section, you can dene global data
objects. All data denitions that you make here occur in
all routines created in this transformation so that you can
transfer data from one routine into another.
The next section of the listing contains the denition
of the method. ABAP Objects distinguishes between the
denition and the implementation of the method, which
is why the interface is rst dened at this stage. In addition
to the request and data-package numbers, the interface
contains the structure SOURCE_FIELDS as import param-
eter. The type of this structure is _ty_s_SC_1 dened
above and contains the selected elds of the source
structure. The only available export parameters are the
RESULT eld for the result and the MONITOR table for he
error messages. The RETURNCODE and ABORT ags that are
available in SAP BW 3.x are now replaced by correspond-
ing exceptions. To skip the data record, you should insert
the statement RAISE cx_rsrout_skip_record, whereas
RAISE cx_rsrout_abort enables you to abort the entire
processing of the data package. The new development
can be regarded as a signicant step forward, given that
the handling of the RETURNCODE parameter was not very
intuitive in SAP BW 3.x. It used to behave differently in
the transfer rules, where it didn't cause any error mes-
sage, and in the update rules, where it actually did pro-
duce errors.
Apart from that, the implementation is almost identi-
cal to that of the transfer and update rules in SAP BW 3.x
despite the fact that some parameter names have been
slightly changed. This means that you don't need to learn
anything new and can simply copy the existing code in
almost all cases.
The only restriction is that the more rigid ABAP
Objects syntax is checked here. But those of you who
simply cannot do without the tables and headers and all
those other precious gadgets in ABAP just need to call a
function module at this point to have the entire range of
ABAP relics at your disposal again.
Example: Removing Special Characters
A typical problem that regularly occurs when importing
data from external systems is that input elds such as
family names and addresses can contain special char-
acters, for instance in foreign addresses or incorrect
entries. The best way to catch them is to use a rou-
tine. In Listing 4.2, all special characters are replaced
by blank space characters in an InfoObject called NAME
that has the type CHAR(60).
Simple routines like this one signicantly increase the
stability of the import processes and thus reduce the
maintenance requirements.
METHOD compute_NAME.
DATA:
MONITOR_REC TYPE rsmonitor.
*$*$ begin of routine - insert your code only below this line *-*
DATA: l_d_offset LIKE sy-index.
CONSTANTS: c_allowed(100) TYPE c
value 'ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_'.
RESULT = SOURCE_FIELDS-/BIC/NAME.
* Only capitals are permitted, hence convert to capitals.
TRANSLATE RESULT TO UPPER CASE.
DO 60 TIMES.
l_d_offset = sy-index 1.
Listing 4.2 Method for Removing Special Characters (Contd.)
www.sap-press.com 29
Deriving Key Figures
The derivation of key gures and data elds occurs almost
as often as the derivation of characteristics and key elds.
For example, it is used for simple calculations (invoice
amount = catalog price + extras discount). However,
characteristics derivations do also occur here if the char-
acteristics are contained in the data component of Data-
Store objects.
The derivation of key gures and data elds in the
transformation can be as simple as the derivation of char-
acteristics; it even uses exactly the same routine. There is
one little difference, and that's the calculation of units in
the routine. Here is how that now works.
1. You must select a key gure in your data target and
double-click on it to open the Rule Details dialog
you are already familiar with (see Figure 4.3).
2. Then you can select the Routine with Unit entry
under the Rule Type item.
3. Click on the Change button next to the rule type to
open the ABAP Editor. The system then automatically
generates the code shown in Listing 4.3.
You can use the key gure calculation with unit output for
two different types of units: quantity units and curren-
cies. While you should calculate currencies using a cor-
responding currency conversion key, the above routine is
the only way to perform a quantity unit conversion .
IF RESULT+l_d_offset(1) CO c_allowed.
* Character allowed, don't do anything
ELSE.
* Character not allowed, replace with blank space character
RESULT+l_d_offset(1) = ' '.
ENDIF.
ENDDO.
*$*$ end of routine - insert your code only before this line *-*
ENDMETHOD. "compute_NAME
Listing 4.2 Method for Removing Special Characters (Contd.)
PROGRAM trans_routine.
*---------------------------------------*
* CLASS routine DEFINITION
*---------------------------------------*
*
*---------------------------------------*
CLASS routine DEFINITION.
PUBLIC SECTION.
TYPES:
BEGIN OF _ty_s_SC_1,
* InfoObject: 0AMOUNT Amount.
AMOUNT TYPE /BI0/OIAMOUNT,
* InfoObject: 0CURRENCY Curr. Key.
CURRENCY TYPE /BI0/OICURRENCY,
END OF _ty_s_SC_1.
TYPES:
BEGIN OF _ty_s_TG_1,
* InfoObject: 0AMOUNT Amount.
AMOUNT TYPE /BI0/OIAMOUNT,
Listing 4.3 Key Figure Calculation with Unit Output (Contd.)
4.1 Transformation
30 Galileo Press 2007. All rights reserved.
4 User Exits in Data Import Processes
* InfoObject: 0CURRENCY Curr. Key.
CURRENCY TYPE /BI0/OICURRENCY,
END OF _ty_s_TG_1.
PRIVATE SECTION.
TYPE-POOLS: rsd, rstr.
*$*$ 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
compute_0AMOUNT
IMPORTING
request TYPE rsrequest
datapackid TYPE rsdatapid
SOURCE_FIELDS TYPE _ty_s_SC_1
EXPORTING
RESULT TYPE _ty_s_TG_1-AMOUNT
CURRENCY TYPE _ty_s_TG_1-CURRENCY
monitor TYPE rstr_ty_t_monitor
RAISING
cx_rsrout_abort
cx_rsrout_skip_record.
ENDCLASS. "routine DEFINITION
*---------------------------------------*
* CLASS routine IMPLEMENTATION
*---------------------------------------*
*
*---------------------------------------*
CLASS routine IMPLEMENTATION.
METHOD compute_0AMOUNT.
DATA:
MONITOR_REC TYPE rsmonitor.
*$*$ 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.
... "to skip a record
* raise exception type CX_RSROUT_SKIP_RECORD.
* result values of the routine
RESULT = .
CURRENCY = .
*$*$ end of routine - insert your code only before this line *-*
ENDMETHOD. "compute_0AMOUNT
ENDCLASS. "routine IMPLEMENTATION
Listing 4.3 Key Figure Calculation with Unit Output (Contd.)
www.sap-press.com 31
It can be necessary to convert currencies, as otherwise
the process terminates because data records are imported
that don't contain any information on the amount or
source currency. In that case, you should perform the
currency conversion by yourself. Listing 4.4 shows you
how to do that.
CLASS routine IMPLEMENTATION.
METHOD compute_0AMOUNT.
* Here the provided currency is
* converted into Euro. If no currency
* is delivered, 0 Euro is returned.
DATA:
MONITOR_REC TYPE rsmonitor.
*$*$ 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.
... "to skip a record
* raise exception type
* CX_RSROUT_SKIP_RECORD.
* result values of the routine
IF SOURCE_FIELDS-CURRENCY IS INITIAL.
RESULT = 0.
CURRENCY = 'EUR'.
ELSE.
CALL FUNCTION
'CONVERT_TO_LOCAL_CURRENCY'
EXPORTING
DATE = sy-date
Figure 4.3 Creating a Routine with Unit Calculation
4.1 Transformation
32 Galileo Press 2007. All rights reserved.
4 User Exits in Data Import Processes
FOREIGN_AMOUNT =
SOURCE_FIELDS-amount
FOREIGN_CURRENCY =
SOURCE_FIELDS-currency
LOCAL_CURRENCY = 'EUR'
TYPE_OF_RATE = 'M'
IMPORTING
LOCAL_AMOUNT = RESULT
EXCEPTIONS
OTHERS = 1.
IF sy-subrc = 0.
CURRENCY = 'EUR'.
ELSE.
RESULT = SOURCE_FIELDS-amount.
CURRENCY = SOURCE_FIELDS-currency.
ENDIF.
*$*$ end of routine - insert your code
* only before this line *-*
ENDMETHOD. "compute_0AMOUNT
ENDCLASS. "routine IMPLEMENTATION
Listing 4.4 Currency Conversion in the Transformation
A somewhat easier alternative would be to set the cur-
rency 0CURRENCY to EUR in the start routine. However,
if the currency is updated into an additional eld, it can
make an important difference if you update Euro or no-
currency data.
The only routine that's missing in the transformation
compared to the old update rules is the routine contain-
ing the return table. In most cases, this routine can be
replaced with the end routine described in Listing 4.5,
while in some rare cases you have to revert to the expert
routine . Even though this may require some additional
work, SAP's decision to avoid the routine was certainly
right. Regarding the return table, it was always unclear in
which sequence the individual exits would be called, and
this could be very confusing.
Start Routine in the Transformation
The start routine is primarily used to format the source
data. You should use the start routine whenever the
source system delivers the data in a different form than is
expected by SAP NetWeaver BI.
For example, you should carry out conversions if cost
types are delivered without alpha conversion or if the
date format is 01.05.06. Moreover, at this point you can
already delete data records from the source system that
aren't needed in SAP NetWeaver BI.
In general, it is more efcient to carry out several data
operations in the start routine instead of splitting them
up into single routines, especially if those routines require
the same intermediate results for their calculations. What
you can also do very well and efciently in the start rou-
tine is to scale down the data package. Since the entire
data package is contained in an internal table, you can
reduce the data quantity rather efciently by using the
DELETE SOURCE_PACKAGE WHERE ... statement. Using an
exception in the characteristic routine for the same pur-
pose is much less efcient, as the data records would rst
have to be specically formatted for the characteristic
calculationa time-consuming task.
You can create the start routine either through the
transformation menu by selecting Insert Create start
routine or by clicking on the relevant button (see Figure
4.4).
Figure 4.4 Button for Creating a Start Routine
PROGRAM trans_routine.
*---------------------------------------*
* CLASS routine DEFINITION
*---------------------------------------*
*
*---------------------------------------*
Listing 4.5 Example of a Start Routine Including Generated Method (Contd.)
www.sap-press.com 33
CLASS routine DEFINITION.
PUBLIC SECTION.
TYPES:
BEGIN OF _ty_s_SC_1,
* InfoObject: 0CO_AREA Contr. area.
CO_AREA TYPE /BI0/OICO_AREA,
* InfoObject: 0CO_DOC_NO CO Doc.No.
CO_DOC_NO TYPE /BI0/OICO_DOC_NO,
* ...
END OF _ty_s_SC_1.
TYPES:
_ty_t_SC_1
TYPE STANDARD TABLE OF _ty_s_SC_1
WITH NON-UNIQUE DEFAULT KEY.
PRIVATE SECTION.
TYPE-POOLS: rsd, rstr.
*$*$ begin of global - insert your declaration only below this line *-*
DATA: g_t_costcenter
TYPE /bi0/qcostcenter
WITH UNIQUE KEY
co_area
costcenter
objvers
dateto.
*$*$ end of global - insert your declaration only before this line *-*
METHODS
start_routine
IMPORTING
request TYPE rsrequest
datapackid TYPE rsdatapid
EXPORTING
monitor TYPE rstr_ty_t_monitors
CHANGING
SOURCE_PACKAGE TYPE _ty_t_SC_1
RAISING
cx_rsrout_abort.
ENDCLASS. "routine DEFINITION
*---------------------------------------*
* CLASS routine IMPLEMENTATION
*---------------------------------------*
*
*---------------------------------------*
CLASS routine IMPLEMENTATION.
*---------------------------------------*
* Method start_routine
*---------------------------------------*
Listing 4.5 Example of a Start Routine Including Generated Method (Contd.)
4.1 Transformation
34 Galileo Press 2007. All rights reserved.
4 User Exits in Data Import Processes
The importing parameters of the start routine are the
request and the data package ID; its exporting parameter
is the table containing the error records. The most impor-
tant parameter, however, is the actual SOURCE_PACK-
AGE table that contains the data records and is dened
as a changing parameter.
* Calculation of source package via
* start routine
*---------------------------------------*
* <-> source package
*---------------------------------------*
METHOD start_routine.
*=== Segments ===
FIELD-SYMBOLS:
<SOURCE_FIELDS> TYPE _ty_s_SC_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
* First delete thos lines that have an order as partner objects.
DELETE SOURCE_PACKAGE WHERE
PIOBJSV = '0COR'.
* Then initialize the cost center table.
DATA: r_cctr TYPE RANGE OF
/bi0/oicostcenter, "Ranges table for cost centers
w_cctr LIKE LINE OF r_cctr. "Header for r_cctr
CLEAR w_cctr.
w_cctr-sign = 'I'. "Including selection
w_cctr-option = 'EQ'. "Query similarity
* A ranges table containing all cost centers is built up in the following loop.
LOOP AT source_package
ASSIGNING <SOURCE_FIELDS>.
w_cctr-low = <SOURCE_FIELDS>-costcenter.
COLLECT w_cctr into r_cctr.
ENDLOOP.
* Then those cost centers are imported into the global table that are also available
* in the data package.
SELECT * FROM /bi0/qcostcenter
INTO TABLE g_t_costcenter
WHERE costcenter IN r_cctr
AND objvers = 'A'.

... "to cancel the update process
* raise exception type
* CX_RSROUT_ABORT.
*$*$ end of routine - insert your code only before this line *-*
ENDMETHOD. "start_routine
ENDCLASS. "routine IMPLEMENTATION
Listing 4.5 Example of a Start Routine Including Generated Method (Contd.)
www.sap-press.com 109
Index
0AMOUNT 41
0CURRENCY 32
0QUANTITY 41
A
ABAP Objects 23, 25, 28
ABAP query 12
Account model 41
Adding data records in the extractor 17
Application component 12
Application component hierarchy 12
ASSIGN 8
Attribute derivation 8
Authorization check 15
B
BAdI 22
BAPI_INFOCUBE_READ_
REMOTE_DATA 96
BI hierarchy 44
BW_SCHEDULER 105
C
Cache 9
Characteristic 99
Characteristic calculation 68
Characteristic derivation 26, 35
Characteristic value 97
CL_RSBM_LOG_CURSOR_STEP 37
CL_RSDRV_REMOTE_IPROV_SRV 96
Communication structure 56, 58, 66, 69,
72, 87, 88, 91
COMPUTE 88, 91, 92, 93
CONSTRUCTOR 93
Conversion 15, 25
CONVERT_TO_FOREIGN_CURRENCY 70
CONVERT_TO_LOCAL_CURRENCY 70
Currency conversion 35
D
DATA_TRANSFORM 23
Data cleansing 25, 35
Dataflows 25
Data mart interface 98
Data model 55, 65
Data package 9, 13, 14, 16, 26, 57,
58, 67
Data record deletions 35
Data selection 96
DataSource 15, 23, 25, 35, 45, 55, 97
Create 45
Export 22
DataStore 44, 46, 98
Data target 41, 55
Data target structure 72
Data transfer process 44, 52, 53, 55
Data volume 5
Default value 63
DEFINE 88, 89, 91
Delta upload 13
Derivation of characteristics 25
Displaying activated program 67
E
Elimination of intercompany sales 94
End routine 26, 32, 35, 37, 44, 48, 55
Enterprise data warehouse 25
Error handling 67
Error message 58, 85
EXIT_SAPLRRS0_001 73, 92, 94
EXIT_SAPLRSAP_001 15, 16
EXIT_SAPLRSAP_002 15
EXIT_SAPLRSAP_003 15
EXIT_SAPLRSAP_004 15, 22
EXIT_SAPLRSBBS_001 99, 100
EXIT_SAPLRSBBS_002 99
EXPERT_ROUTINE 41
Expert routine 32, 35, 37, 41, 43
Export DataSource 22
Extraction 11, 23
Extractor 16
Extractor checker 14
Extract structure 22
F
FIELD-SYMBOLS 8
Field extension 14
Field symbols 5, 7
Filling the extract structure 17
FOX formula 105
Full upload 13
G
Generic DataSource 12
Generic delta 13
Generic extractor 11, 13, 14, 22
Graphical modeling 26
H
HASHED TABLE 6
Hashed table 6, 9, 57
HIER_TRANSFORM 23
Hierarchy 12, 15, 20, 23, 43
Hierarchy exit 22
Hierarchy extractor 22
History of the transformation 37
I
I_STEP 73, 74, 76, 79, 81, 82
Import process 28
InfoCube 35, 37, 72, 94, 98, 99, 105
InfoObject derivation 59, 63
InfoPackage 52, 53, 58, 66
110 Galileo Press 2007. All rights reserved.
Index
InfoProvider 25, 35, 55, 56, 86, 87,
94, 95, 99
InfoSource 25, 35, 55, 67
INITIALIZATION 88, 91
Initialization 35
Instance attributes 90
INVERSE_EXPERT_ROUTINE 41
INVERSE_EXPERT_SELECTION 41
K
Key figure 97, 99
Key figure derivation 69
Key figure model 41
L
Line items report 41
LISTCUBE 99
Loading process 5
Log 43
LOOP AT tab ASSIGNING 8
LOOP AT TABLE WHERE 7
M
Mapping 99, 100
Masking 15
Master data attributes 6, 15
Master data table 98
Master data texts 15
Message 58
Message class 58
Message collector 85
MultiProvider 86, 99
N
Navigation attribute 96
Node ID 43
O
ODS object 44
OLAP processor 96
O notation 7
OPENHUB_TRANSFORM 105
P
Performance 5, 7, 37, 41, 62, 65, 86, 94
Process chain 105
Process types 105
Q
Quantity unit conversion 29
Query 97
R
READ TABLE INDEX 7
READ TABLE tab ASSIGNING 8
READ TABLE WITH KEY 7
READ TABLE WITH TABLE KEY 7
RemoteCube 41, 63, 94
Removing special characters 28
Report-report interface 41, 99, 100
Return table 72
RFC packing 95, 97
Routine with unit 29
RRMS_MESSAGE_HANDLING 85, 86
RSA3 14
RSAP0001 14, 15, 22
RSAR_CONNECTOR 105
RSBBS 99
RSDBC_SQL_STATEMENT 105
RSDRI_INFOPROV_READ 98
RSO2 12
RSOD_DOC_BADI 105
RSOD_ITEM_DOC 105
RSOD_ITEM_DOC_LIST 105
RSOD_WWW_DOC_MAINT 105
RSR_OLAP_AUTH_GEN 105
RSR_OLAP_BADI 87, 88
RSR00001 73
RSR00002 87
RSR00004 99
RSRA_ALERT 105
RSU5_SAPI_BADI 22, 23
S
SAP BW-BPS 105
SAP NetWeaver 2004s 25, 26, 35,
43, 44, 45, 52, 55, 87, 94
SE19 87
SE91 86
Selection field 13, 22
SEMBPS01 105
SEMBPS02 105
SID support 95, 97
SMOD_RSR00004 99
Sorted hierarchy 43
SORTED TABLE 5
Sorted table 5
SOURCE_PACKAGE 34
Source structure 43
Source system 11, 41, 55, 62, 63
Standard extractor 11, 14
STANDARD TABLE 5
Standard table 5
Start routine 26, 32, 35, 37, 44, 55, 56,
57, 62, 66, 67, 72
create 46
of the transfer rules 14
T
Table 12
Table types 5
Target structure 43
TCURR 12
Transaction data 15
Transfer rule 25, 55, 56, 57, 62
Transfer structure 57, 62
Transformation 25, 32, 35, 37, 43
Transport 37
U
Unit calculation 29, 70
Update rule 25, 32, 55, 62, 65, 66, 67,
68, 69, 70, 72
Upload 6
User exit 15, 20, 22
V
Validation 74, 83
Variable 73
Variable combinations 83
Variable exit 73
Variable handling 82
Variable strategy 82
Variable values 94
View 12
Virtual key figures and characteristics
86, 87, 93, 94
VirtualProvider 41, 94, 95, 98, 99
Z
ZXRSAU01 16
ZXRSRU01 73, 76

You might also like