You are on page 1of 49

IBM Global Business Services

Use of ABAP In BW Enhancement [Day 2]

ABAP Handbook for BW Developer April 08


© Copyright IBM Corporation 2007
IBM Global Business Services

Overview

The second day will consist of the following broad level topics

 ABAP In ECC Data Sources


 Use of ABAP in BW Backend Objects
 Use of ABAP in BEx Reports
 Case Study

2 ABAP Handbook for BW Developer | Sep 11, 2022 © Copyright IBM Corporation 2007
IBM Global Business Services

ABAP In ECC Data Sources

ABAP Handbook for BW Developer April 08


© Copyright IBM Corporation 2007
IBM Global Business Services

Creating Generic Data Source: RSO2 Overview

Generic Data Sources can be of 3 Types: 1. Transactional Data


2. Master Data Attributes
3. Master Data Texts

A generic Data Source can be created on Three Types of Sources


View/ Table
Infoset
Function Modules

4 ABAP Handbook for BW Developer | Sep 11, 2022 © Copyright IBM Corporation 2007
IBM Global Business Services

Generic Delta On A Custom Data Source


 Delta Pointer Can be: 1. Time Stamp
2. Calendar Day
3. Numeric Pointer
 Mention the Name of the field in the
‘Field Nm’ text box on which the Delta is
required to be extracted.

Delta Type determines how extracted data is to be interpreted in BW, and into which data targets
it can be posted.
1. Additive Delta:
The key figures for extracted data are added up in BW. Data Sources with this delta
type can supply data to ODS objects and Info Cubes.

2. New Status for Changed Records:


Each record to be loaded delivers the new status for the key figures and
characteristics. Data Sources with this delta type can write to ODS objects or master data tables.

5 ABAP Handbook for BW Developer | Sep 11, 2022 © Copyright IBM Corporation 2007
IBM Global Business Services

Safety Interval Limits On Generic Delta

Safety Interval Upper Limit:

 This field is used by Data Sources that determine their delta generically using a repetitively-increasing
field in the extract structure.
 The field contains the discrepancy between the current maximum when the delta or delta init extraction
took place and the data that has actually been read.
 Leaving the value blank increases the risk that the system could not extract records arising during
extraction.
 The safety margin between read and transferred data must always be larger than the maximum length of
time that it takes to create a record for this Data Source (With a Time Stamp Delta), or it must display an
interval that is sufficiently large (for determining delta using a serial number).

Safety Interval Lower Limit:


 This field contains the value taken from the highest value of the previous delta extraction to determine
the lowest value of the time stamp for the next delta extraction.

Real Time:
 The 'real time enabled' indicator determines whether a delta-enabled Data Source can be used as a
supplier of data for a real-time daemon.

6 ABAP Handbook for BW Developer | Sep 11, 2022 © Copyright IBM Corporation 2007
IBM Global Business Services

Data Source Creation Using View/ Table

 Mention the Name of the View or Table.


 Mention appropriate Application Component
 Give Proper Descriptions (Short, Medium, Long)
 Once You are done with the Data Source
 Creation, Click on the Save Button to go the
 Field Property Screen.
At this stage the name of the Custom
Extract Structure gets generated.
 Mark Fields as ‘Selection’, ‘Hide Field’, ‘Inversion’,
 ‘Field Only’ based on business requirements.
 Save your Data Source in a Proper Transport.
 If the data source is required to be Delta Capable,
 give proper settings to ‘Generic Delta’ Tab

7 ABAP Handbook for BW Developer | Sep 11, 2022 © Copyright IBM Corporation 2007
IBM Global Business Services

Introduction To Info Set


Use Transaction Codes SQ02 for building Custom Info Set and SQ01 for Info Set Queries.

 An Info Set is a special view of a dataset (logical


database, table join, table, sequential file) and is
used by SAP Query as a data source.

 In most cases, Info Sets are based on logical


databases.

 While creating an Info Set, a data source in an


application system is selected. SAP Query is
relevant for the Business Information Warehouse
because it allows to define the extract structure by
selecting fields in a logical database, table join or
other datasets in the form of an Info Set. Thus, the
generic data extraction function for master or
transaction data from any Info Set is possible.

 A query is created for an Info Set that retrieves data


and transfers it to the generic extractor.

8 ABAP Handbook for BW Developer | Sep 11, 2022 © Copyright IBM Corporation 2007
IBM Global Business Services

Joins in Info Set


 Take relevant fields from table in the
Info Set.
 If the participant wants the relevant
text for the fields uncheck ‘No
Automatic Text Recognition’ in the
initial screen.
 Use Left Outer Join in Joining
condition to take all data from one
table.
 Field Groups can be created in
SQ03 to for grouping of Info Set
Fields. It can have all table fields/ key
fields/ custom set of fields based on
user’s choice.

9 ABAP Handbook for BW Developer | Sep 11, 2022 © Copyright IBM Corporation 2007
IBM Global Business Services

Data Source Creation Using Info Set

 Mention Info Set name in the


‘Info Set’ Tab in RSO2 and follow
the same methodology of Data
Source Creation.

 Choose the ‘Extraction from


Query’.

 Mention Delta Field in Generic


Delta Field if Data Source is
required to be Delta Capable.

10 ABAP Handbook for BW Developer | Sep 11, 2022 © Copyright IBM Corporation 2007
IBM Global Business Services

Data Source Creation Using Function Module


 Use Delivered FM Template
RSAX_BIW_GET_DATA_SIMPLE
and create custom version of FM
implementing business specific logic.
 Click on ‘Extraction by FM’.
 the Programmer then creates a
Custom FM name along with suitable
Extract Structure Name created in
SE11.

 The data has to be copied from the


function module to an interface table
E_T_DATA which is of the
structure of ‘Extract Struct’
[Here BW_STRUCTURE_MDSM].

11 ABAP Handbook for BW Developer | Sep 11, 2022 © Copyright IBM Corporation 2007
IBM Global Business Services

When To Use Custom Function Module

 If extraction is more complicated than just a view or a table, it is preferred


to use function modules for extraction.

 You may want to implement a delta method on your Generic Data Source
that cannot be implemented by using the generic delta functionality
(timestamp, date,..)

 You have to extract data from several DB tables and Using a view is not
possible because of insufficient JOIN. Only some fields of these tables are
relevant Data has to be enriched with information not available in the BW
system

12 ABAP Handbook for BW Developer | Sep 11, 2022 © Copyright IBM Corporation 2007
IBM Global Business Services

The Function Module is called up several times during an


extraction Process

1. Initialization call:
Only the request parameters are transferred from the module here. It cannot transfer
data at this point.

2. First Read call:


The extractor delivers the data typed with the extraction structure to an interface
table. The number of rows expected is specified in a request parameter (I_MAXSIZE).

3. Further Read calls:


The extractor delivers the data connected to the last package, again in a package with
I_MAXSIZE rows.

4. Last call:
The function module is now called until the exception NO_MORE_DATA is produced. No
more data can be transferred in the call in which the exception is produced.

13 ABAP Handbook for BW Developer | Sep 11, 2022 © Copyright IBM Corporation 2007
IBM Global Business Services

ABAP In BW Backend Object Enhancements

ABAP Handbook for BW Developer April 08


© Copyright IBM Corporation 2007
IBM Global Business Services

Stages of Writing ABAP in BW: Data Flow Diagram

CUBE2 Data Mart


Interface

CUBE1

ODS1
ODS2
Transformation (Here we can write
Start /End Routine as well as Field
Level Routine for the Data Target
i.e. Cube/DSO) Transformation

(I) Transformation (Here we can write


Routines to transform the data)

PSA Persistent Staging Area

BW

R/3
R/3 Data Source
(DS1)

15 ABAP Handbook for BW Developer | Sep 11, 2022 © Copyright IBM Corporation 2007
IBM Global Business Services

InfoPackage and Data Transfer Process

Data Transfer Process is an object


used to execute the transformation
and load data from a Source (PSA
or another Info provider ) to a
target Info provider

Transformation
5)Data Transfer
Process
InfoPackage is used to
request data from a source system.

Data Source (PSA)

4)InfoPackage

Source System-1

16 ABAP Handbook for BW Developer | Sep 11, 2022 © Copyright IBM Corporation 2007
IBM Global Business Services

Transformation Routines

The different types of routines that are available within Transformations


are listed below:

 Start Routine
 Routine for updating Characteristics / Key Figures : Field Routine
 End Routine
 Expert Routine

17 ABAP Handbook for BW Developer | Sep 11, 2022 © Copyright IBM Corporation 2007
IBM Global Business Services

Use of ABAP in Transformation – Start Routine

18 ABAP Handbook for BW Developer | Sep 11, 2022 © Copyright IBM Corporation 2007
IBM Global Business Services

Use of ABAP in Transformation – End Routine

19 ABAP Handbook for BW Developer | Sep 11, 2022 © Copyright IBM Corporation 2007
IBM Global Business Services

Use of ABAP in Transformation – Field Routine

20 ABAP Handbook for BW Developer | Sep 11, 2022 © Copyright IBM Corporation 2007
IBM Global Business Services

Start Routine Vs. Field Level Routine

  Start Routine Field Level Routine

Bulk data Operation. The whole operation is fired


only once for all the data to be manipulated the This is a Record wise data operation and is
1 target Structure. fired every time a new data record arrives

Packet wise operation. Data Arrives in BW in Packet wise operation. Data Arrives in BW in
Data Packets (discreet amounts) which are Data Packets (discreet amounts) which are
2 manipulated. manipulated.

The Start Routine is executed first. Then the


resultant data is manipulated through field levels
3 (if any) Fires after the Start Routine.

Less performance intensive than Field levels as More performance intensive than start
4 they are fired for all rows. routines.

21 ABAP Handbook for BW Developer | Sep 11, 2022 © Copyright IBM Corporation 2007
IBM Global Business Services

Flat File Loading

Selecting files for Flat File DataSources

 Advantages of loading flat files from Application Server:


 Data load in batch mode is possible.
 Path is physically equal to all administrators

 Dynamic Filename Scenario:


 Transaction data is delivered monthly by flat file
 The naming convention includes the name of the month within the filename
 Directory paths are maintained for every year

22 ABAP Handbook for BW Developer | Sep 11, 2022 © Copyright IBM Corporation 2007
IBM Global Business Services

An ABAP program Can Help Here

On the External Data tab


in the Info Package, you
can place a routine to
dynamically determine the
file name to load.
Coding:
Concatenate
 Directory path
 Actual year
 Actual month

23 ABAP Handbook for BW Developer | Sep 11, 2022 © Copyright IBM Corporation 2007
IBM Global Business Services

Dynamic Data Selection in Info Package

 Data selection in the Selection tab of InfoPackage can be dynamic


(change with each InfoPackage load) or fixed (only company code
1000 for year 1999).

 For dynamic selection – e.g., to extract only the current fiscal period -
then two options exist: OLAP Variables or an ABAP Routine to fill
in the value of the selected data at extraction time.

 SAP-supplied variables can also be used e.g. for determining the


current month, but when determining other characteristic values with
more complex logic, you would need your custom ABAP code.

24 ABAP Handbook for BW Developer | Sep 11, 2022 © Copyright IBM Corporation 2007
IBM Global Business Services

Info Package ABAP Routine

 L_T_RANGE internal table is populated with the InfoPackage selection values.


 The main target of writing such routine is to populate the ‘From Value’ and ‘To
Value’ with values which are determined at run time of the program. This can be
achieved using range type variables and populating its HIGH and LOW values.
 Exclusion of values is NOT possible in Info Package operation.

25 ABAP Handbook for BW Developer | Sep 11, 2022 © Copyright IBM Corporation 2007
IBM Global Business Services

Start Routine: Lookup from Master Data


 Declare an internal table as a placeholder of Master Data
 Write a Select Statement to lookup from Master Data and fill the declared internal table
 Sort the table. Delete Adjacent Duplicates if necessary.
 Loop at incoming Data Package and populate values.

26 ABAP Handbook for BW Developer | Sep 11, 2022 © Copyright IBM Corporation 2007
IBM Global Business Services

Start Routine: Lookup from DSO


DSO Active Table Name:
Custom DSO: /BIC/A<DSO Name>00
Delivered DSO: /BI0/A<DSO Name>00

Lookup logic is similar to master data in general.

27 ABAP Handbook for BW Developer | Sep 11, 2022 © Copyright IBM Corporation 2007
IBM Global Business Services

Start Routine: Lookup from Cube


Use Function Module 'RSDRI_INFOPROV_READ‘.
Example Showing Lookup ACTION TYPE from 0PA_C01

28 ABAP Handbook for BW Developer | Sep 11, 2022 © Copyright IBM Corporation 2007
IBM Global Business Services

Using Parallel Cursor


Using a loop within another loop in not recommended in ABAP. Instead use Parallel Cursor
Concept. This method employs searching a table from where it left off earlier.
Ex: Searching Name of all Models of Cars which are RED in color from Table below.

System Color Car Table sorted by Color :


Index
1 Blue Zen System Color Car
Index
2 Yellow Alto
1 Black Scorpio
3 Red 800
2 Blue Zen
4 Black Scorpio
3 Red 800
5 Red SX4
4 Red SX4
5 Yellow Alto

General Pseudo Code For Searching On the Sorted Table:


LOOP AT SOURCE_PACKAGE.
LOOP AT <SORTED TABLE> WHERE COLOUR = ‘Red’.
< Read the Description of the Car>.
ENDLOOP.
ENDLOOP.

The ABAP Compiler will search the whole table row by row. Even after reaching the row with index 3 it
will start its next search aging from row 1 in the next iteration.

29 ABAP Handbook for BW Developer | Sep 11, 2022 © Copyright IBM Corporation 2007
IBM Global Business Services

Parallel Cursor (Contd.)


Parallel Cursor Algorithm searches using the System index (SY-TABIX) and once it finds
the required rows (‘Red’ in this case) it does not start from the begin but goes forward from
that index value.

LOOP AT SOURCE_PACKAGE.
READ TABLE < SORTED TABLE >
WITH KEY COLOUR = ‘Red’
BINARY SEARCH.
IF SY-SUBRC = 0.
“Match is found
L_TABIX = SY-TABIX.
LOOP AT < SORTED TABLE > FROM L_TABIX.
“Reading from pos. 3
IF < TABLE 7.3 >-COLOUR = ‘Red’.

< Read the Description of the


Car>
ELSE.
EXIT.
ENDIF.
ENDLOOP.
ENDIF.
ENDLOOP.

Parallel cursor Technique is used to avoid nested loop processing.

30 ABAP Handbook for BW Developer | Sep 11, 2022 © Copyright IBM Corporation 2007
IBM Global Business Services

Algorithm For Parallel Cursor

SORT ITAB2 BY <Required Field1> .


LOOP AT ITAB1.

READ TABLE ITAB2 WHERE <Required Field2> = ITAB1-<Required Field1>


BINARY SEARCH.

IF sy-subrc = 0.
L_TABIX = SY-TABIX.

LOOP AT ITAB2 FROM L_TABIX.


IF ITAB2-<Required Field2> NE ITAB1-<Required Field1> .
EXIT.
ELSE.
<<Processing of ITAB2 >>.
ENDIF.

ENDLOOP.
ENDIF.
ENDLOOP

31 ABAP Handbook for BW Developer | Sep 11, 2022 © Copyright IBM Corporation 2007
IBM Global Business Services

Conversion Routine Overview

 Using a conversion Routine characteristic values (key) of an Info Object can be


displayed or used in a different format to how they are stored in the database.

 For Example, If cost center 1000, the long value with left-hand zeros 0000001000
(from the database) is not to be entered, but just to enter 1000, Conversion
routines can be linked to characteristics.

 Conversion routines ALPHA, NUMCV, and GJAHR check whether data exists in
the correct internal format before it is updated.

 A conversion occurs according to the data type of the field when changing the
content of a field from the display format into the SAP-internal format and vice
versa, as well as for output using the ABAP WRITE instruction.

32 ABAP Handbook for BW Developer | Sep 11, 2022 © Copyright IBM Corporation 2007
IBM Global Business Services

ALPHA Conversion:

 The most important conversion routine - due to its common use - is the
ALPHA routine that converts purely numeric user input like ‘1234' into '001234'
(assuming that the characteristic value is 6 characters long).

 If a value is not purely numeric like ‘1234A' it is left unchanged.

 In customers systems there are quite often characteristics using a conversion


routine like ALPHA that have values on the data base which are not in
internal format, e.g. one might find ‘1234' instead of '001234' on the data base.
It could even happen that there is also a value '01234', or ' 1234' (leading
space).

 This possibly results in data inconsistencies, also for query selection; i.e. if
you select ‘1234', this is converted into '001234', so '01234' won't be selected.

33 ABAP Handbook for BW Developer | Sep 11, 2022 © Copyright IBM Corporation 2007
IBM Global Business Services

ABAP In Process Chains

34 ABAP Handbook for BW Developer | Sep 11, 2022 © Copyright IBM Corporation 2007
IBM Global Business Services

Process Chain Variant

35 ABAP Handbook for BW Developer | Sep 11, 2022 © Copyright IBM Corporation 2007
IBM Global Business Services

Variant in Details

Program runs on the


same server on which
Scheduled program
the chain is scheduled
waits for an event on
the target server

Program with or
without variant

36 ABAP Handbook for BW Developer | Sep 11, 2022 © Copyright IBM Corporation 2007
IBM Global Business Services

Virtual Characteristics And Key Figure


 A Virtual Characteristic / Key Figure can be used to derive values at query run time.

 The Virtual Characteristic / Key Figure must be added to the cube as an Info Object but
not mapped in update rules or transfer rules.

 During reporting the Cache is not used. Thus performance is impacted.

 The inputs by the user during query runtime can be used in the virtual characteristic and
key figure exits.

 Exits used for Virtual Characteristic / Key Figure:

BADI - RSR_OLAP_BADI (Virtual Characteristics and Key Figures) & Exit –


RSR00002.
EXIT_SAPMRSRU_001 - BW: Definition of Virtual Characteristic.
ZXRSRTOP – Global Variable Definition Section.
ZXRSRU02 – Specify if info object should be read or populated during exit.
ZXRSRZZZ – Enhancement Coding (Update Logic).

 Transaction RSRT can be used to troubleshoot/ debug virtual characteristics like other
reporting exits.

37 ABAP Handbook for BW Developer | Sep 11, 2022 © Copyright IBM Corporation 2007
IBM Global Business Services

Flow Diagram For a Typical Solution on Virtual:


Source Query MDX query BADI Target Query
based on Implemented
source Through Class

DEFINE
Defining query
characteristics
and KF as
attributes of Class

INITIALIZE
BADI Read data from
MDX using FM and
Class populate the
internal table.

COMPUTE
Compare runtime
data of target
query with the
internal table and
populate virtual.

• Detailed use of ABAP in Virtual Characteristics and KF discussed in Case Study

38 ABAP Handbook for BW Developer | Sep 11, 2022 © Copyright IBM Corporation 2007
IBM Global Business Services

ABAP In BEX Query Enhancements

ABAP Handbook for BW Developer April 08


© Copyright IBM Corporation 2007
IBM Global Business Services

Enhancements in BEx Query: CMOD Overview

The CMOD Enhancement is different from the R/3 Enhancement for BEx. Reports.

40 ABAP Handbook for BW Developer | Sep 11, 2022 © Copyright IBM Corporation 2007
IBM Global Business Services

The Input and Output Parameters of the Exit.

The main parameters which we will look into in this scope are:

I_VNAM - It is the variable name of the Customer Exit in the BEx. Report.
I_T_VAR_RANGE - This is an internal table .This table contains the Input data to the B.Ex. Query which
was supplied by the User.
E_T_RANGE - This is a Range which is the Output value of the variable as mentioned in
I_VNAM.
I_STEP - This is a variable which can assume four values 0/1/2/3 depending on which the
Customer variable manipulation is done.
I_S_RKB1D-COMPID - The Report Name which is being executed.

41 ABAP Handbook for BW Developer | Sep 11, 2022 © Copyright IBM Corporation 2007
IBM Global Business Services

I_T_VAR_RANGE & E_T_RANGE

I_T_VAR_RANGE     E_T_RANGE  
This is the technical This field states whether the range
name of the variable in is Inclusive (I) or Exclusive (E) for
the Selection Screen of the given values i.e. it includes or
VNAM the B.Ex Report.   SIGN excludes the values provided.
This is the mathematical
This is the name of the operation, i.e. whether the variable
Info object on which the will be equal to (EQ) the value in
variable name in VNAM the Range or Less than (LE) the
IOBJNM was created.   OPT value in the range and so on.
The Lower value of the Range .If
we are using the Range to Restrict
to one single instead of multiple
then we give that single value here
      LOW and leave high as initial.
The Higher value of the Range .If
we are using the Range to Restrict
to one single instead of multiple
      HIGH then we leave this as initial.

42 ABAP Handbook for BW Developer | Sep 11, 2022 © Copyright IBM Corporation 2007
IBM Global Business Services

I_STEP’ s In B.Ex Query Variables


I_STEP = 1 :
Call up takes place directly before variable entry. This is mainly used to pre-calculate
values and show them as default values in the variable screen.

I_STEP = 2 :
Call up takes place directly after variable entry. This is mainly used for manipulating the
user input values which were given in the variable screen.

I_STEP = 3 :
In this call up, the values of the variables can be checked. Triggering an exception
(RAISE) causes the variable screen to appear once more. Afterwards, I_STEP=2 is
also called up again.

I_STEP = 0 :
The enhancement is not called from the variable screen. The call up can come
from the authorization check or from the Monitor.

43 ABAP Handbook for BW Developer | Sep 11, 2022 © Copyright IBM Corporation 2007
IBM Global Business Services

BEx Variables: The Main Program Flow


<Global Variable Declarations>
CASE I_VNAM.
When ‘L_VAR1’.
<Local Data Declaration for the Exit on L_VAR1>
If I_STEP = <1/2>.
<Logic for population of L_VAR1>
Endif.
.
.
.
When ‘L_VAR (n-1)’.
< Local Declaration for the Exit on L_VAR (n-1)>
If I_STEP = <1/2>.
<Logic for population of L_VAR (n-1)>
Endif.
When ‘L_VARn’.
< Local Declaration for the Exit on L_VARn>
If I_STEP = <1/2>.
<Logic for population of L_VARn>
Endif.
ENDCASE.

If i_STEP = 3.
< Local Declaration>
<Logic to be followed for this case >
Endif.

44 ABAP Handbook for BW Developer | Sep 11, 2022 © Copyright IBM Corporation 2007
IBM Global Business Services

Include ZXRSRU01
 I_STEP = 1 Example (Calculating all data starting  I_STEP = 2 Example (CODE for Entering months (in Numeric value)
with CAT) and displaying the data for Enter Year - 1)

Data: l_int_tab type standard table of /bi0/pacttype


Data : l_curr_year type /bi0/oifiscyear,
initial size 0,
l_prev_year type /bi0/oifiscyear.
l_wa type /bi0/pacttype.
Constants: c_init type char3 value 'CAT'. When 'ZOSFYR_1'.

When 'ZOMACTTY'. If i_step = 2. “After Selection Screen pops up


If i_step = 1. clear loc_var_range.
clear: l_s_range.
Read table i_t_var_range into loc_var_range with key
select * from /bi0/pacttype into table l_int_tab vnam = 'ZOSFYR'
iobjnm = '0FISCYEAR'.
where objvers ='A' .
sort l_int_tab by acttype.
If sy-subrc = 0.
delete adjacent duplicates from l_int_tab l_curr_year = loc_var_range-low.
comparing acttype objveRS .
l_prev_year = l_curr_year - 1.
clear l_s_range.
Loop at l_int_tab into l_wa where acttype+0(3) = l_s_range-sign = 'I'.
c_init .
l_s_range-opt = 'EQ'.
clear l_s_range. l_s_range-low = l_prev_year.
l_s_range-low = l_wa-acttype. append l_s_range to e_t_range.
l_s_range-sign = 'I'. Endif.
l_s_range-opt = 'EQ'. Endif.
append l_s_range to e_t_range.
Endloop.
Endif.

45 ABAP Handbook for BW Developer | Sep 11, 2022 © Copyright IBM Corporation 2007
IBM Global Business Services

Include ZXRSRU01

I_STEP = 3 Example (If Fiscal Period range entered by user exceeds two quarters, show Error message)

CASE I_VNAM.
WHEN 'ZS_J2ODS'.
IF I_STEP = 2.
READ TABLE I_T_VAR_RANGE INTO LOC_VAR_RANGE WITH KEY VNAM = '0I_FYPER'.
….. Logic to check whether Fiscal Period range entered by user exceeds two quarters.
ADD 1 TO C_RECORD_COUNT. “For each Quarter
ENDIF.
IF I_STEP = 3.

IF C_RECORD_COUNT > 2.
CALL FUNCTION 'rrms_message_handling'
EXPORTING
I_CLASS = 'RSBBS'
I_TYPE = 'E'
I_NUMBER = '000'
I_MSGV1 = 'Fiscal period range can not exceed two quarters'.
RAISE NO_REPLACEMENT.
ENDIF.
ENDIF.

46 ABAP Handbook for BW Developer | Sep 11, 2022 © Copyright IBM Corporation 2007
IBM Global Business Services

Using STATIC Variable in CMOD Exit


STATICS Variable can be used to pass values between two RRI queries .
Declaration:
STATICS: Var1 TYPE <Data Element>

47 ABAP Handbook for BW Developer | Sep 11, 2022 © Copyright IBM Corporation 2007
IBM Global Business Services

Work With Text Variable in CMOD Exit


IOBJNM will be ‘1TEXT’ for a Text Variable

Work With Virtual Characteristics in CMOD Exit


Pass values in I_STEP = 3.
Pass Value of Variable in ‘Filter’ Area of the query to the Public Variable of the BADI

48 ABAP Handbook for BW Developer | Sep 11, 2022 © Copyright IBM Corporation 2007
IBM Global Business Services

Summary

A quick recap of the topics covered so far

 ABAP In ECC Data Sources


 Use of ABAP in BW Backend Objects
 Use of ABAP in BEx Reports
 Case Study

49 ABAP Handbook for BW Developer | Sep 11, 2022 © Copyright IBM Corporation 2007

You might also like