Sie sind auf Seite 1von 3

ABAP Programming In BW

Below is a snippet from one of hundreds of articles available to ERPtips subscribers.


If you would like a complimentary copy of the full article, please email
Mark.Downs@ERPtips.com
(include the title of the article in your email)

To subscribe to ERPtips, go to
www.ERPtips.com/Subscribe.asp.

ERPtips Journal is published by Klee Associates, Inc.


ERPtips University provides both public and onsite training for SAP clients.
For more about ERPtips University, including the current schedule, click here:
www.ERPtips.com/WorkshopSchedule.asp

ABAP Programming In BW

With all the talk about NetWeaver and SAP® Java Connector and other hot tools, you'd think
ABAP was a thing of the past. But not so, as BW expert Pat Pesa can attest. In this excellent “best of” ar

Click here to read this Snippet


www.SAPtips.com SAPtipsJournal
Page 1

ABAP Programming In BW
By Arthur "Pat" Pesa, arthurpesa, inc.

Editor's Note: With all the talk mine the what’s, where’s and targets. Therefore, we will need to
about NetWeaver and SAP® Java how’s of ABAP programming in be specifically aware of how we
Connector and other hot tools, BW. These "tips" on ABAP and proceed with our data or record
you'd think ABAP was a thing of BW are written with BW version updates and where we decide to
the past. But not so, as BW 3.0 and R/3 4.6C in mind, but place ABAP programming that
expert Pat Pesa can attest. In most of them will apply to any will manage these updates. Hav-
this excellent "best of" article, versions of R/3 from 4.x and up, ing said that, we can now exam-
Pat shares the most valuable and any versions of BW from 2.0 ine what possibilities exist for
ABAP techniques he has used on and up. using ABAP to customize our BW
BW projects. He starts by environment.
addressing the key questions:
What are the uses of ABAP in What Can We Do With
BW? How is programming in In order to ABAP in BW?
BW different than programming As with anything, in SAP the
in R/3? What ABAP tools are understand how words and phrase "ABAP pro-
available in BW? Then, Pat digs gramming" routinely surface as
into some technical examples of topics and questions during
ABAP-BW in action. This arti- ABAP is used in BW, implementation. However,
cle provides technical managers between SAP R/3 and BW, there
with a handy overview of Pat's we should have a are distinct differences between
February/March 2004 Volume II Issue 1

ABAP-BW methodology, and how we can use ABAP program-


gives ABAP programmers a general understand- ming in these environments and
technical guide they can refer to what we can expect as an outcome
on their BW initiatives. ing of the of development. In order to
understand how ABAP is used in
BW, we should have a general
This article will focus on the infrastructure of BW. understanding of the infrastruc-
concepts and strategies that con- ture of BW. Generally speaking, in
stitute best practices regarding the BW, we are dealing with Objects
use of ABAP programming in BW. This article will begin with an that we connect with some type of
On each project I have been overview of the prospective configuration, such as the linking
involved with, the use of ABAP involvement of ABAP code, where of an ODS with an InfoCube, or
programming has had a profound we can find this code, and how the creation of source system def-
effect on our ability to model the best to include coding for specific initions and datasources. What we
SAPtipsJournal

correct business processes within areas without impacting other will NOT be doing on a general
BW. During the design and blue- functionality. Our examples for basis in BW is building screens
print stage, a core functional this article will include R/3 data- and multiple user exits in ABAP
process is the determination of the source modifications and the cre- to gain additional functionality.1
corresponding business logic ation of generic extractors in R/3 This is the distinct difference in
found in R/3 or legacy data sys- for use with BW. BW as it relates to R/3. So if we're
tems and how to accomplish the not using ABAP for user exits and
same logic in BW. Fortunately To get the ball rolling, I would screens, then how will we use
SAP® has provided several struc- like to start off with the following ABAP? In BW, we will use ABAP
tured paths to follow in order to considerations. Remember that in to transform our data as require-
implement this business logic. In SAP BW, most everything is inter- ments dictate, as well as provide
this article, I will lay the ground- connected, and we share a great additional processing during
work from which we can deter- deal of data amongst several data extraction and updates.
1 One thing to note: we are provided with one user exit in SAP R/3 that will enable the management of data being extracted and one user exit in BW that will enable the
management of data being queried.

SAPtips © 2004 Klee Associates, Inc.


www.SAPtips.com SAPtipsJournal
Page 2

Within the ABAP language are Technical Area Description


certain constructs that allow us BEx User Exit Allows the creation and population of variables and calculations for key
to get work done within this figures and variables on a runtime basis. This user exit is called each time
environment. In SAP, we will be BEx is executed.
using the ABAP Workbench to R/3 User Exit This user exit is found in R/3 under CMOD and contains additional pro-
create our code. This is true for gramming that is needed to fill field additions to extract structures. We can
each instance we are writing also create additional business logic against data prior to its transfer to
code, whether it is from within a BW.
transfer rule, update rule, or BW Transfer rules These rules are invoked as data is transferred from R/3 to BW, or from
start routine. It is important to within BW as export data sources and InfoSources are created.
understand the fundamental BW Update Rules These rules are invoked as data is being updated into data targets.
concepts of the ABAP workbench Whether ODS Objects or InfoCubes, each update results in the execution of
in order to proceed. First, we an Update Rule.
should be familiar with the con- BW Start Routines Start routines in BW Update Rules are used to manage whole subsets of
structs of programming, such as data. This is different than a simple update rule in that update rules are
understanding what a sub rou- data element specific.
tine does, how a function module
Figure 2: BW and R/3 ABAP Programming Options
works, etc. Also, we should
understand the different avenues
we may use in order to debug our Where Are We Able to Cre- between functional and technical
code. This last measure is of ate ABAP Programming in is often much more gray than the
extreme importance, since it will BW? distinction in R/3. To cite one
be necessary to debug code from An often-asked question prior to example: we can configure objects
February/March 2004 Volume II Issue 1

time to time in order to create the beginning of a BW project in BW, thus gaining a great deal of
what our requirements dictate. revolves around how much ABAP functionality, without writing an
For the purposes of this article, programming will be necessary. array of user exits as found in R/3.
we will assume that the reader Following the construct of a typi-
already has a grounding in these cal R/3-BW integration, one Let’s take a look at where we
basic ABAP concepts, including would assume that all ABAP are able to augment our BW
the ABAP Workbench. would be done by a team of pro- development with ABAP and
grammers and that the BW con- what that may mean to the sys-
Our approach to ABAP develop- sultants would furnish documen- tem performance. Generally,
ment in BW will follow the simple tation around the changes to be when adding code, we can
guidelines found in Figure 1. made. However, in BW, the line assume some type of run time
overhead in the form of process-
• Requirements ing time or memory impact.
However, when programmed in
o Programming actions in the form of pseudo-code or a high level flow of data
SAPtipsJournal

an expedient and concise man-


• Design – determining where our data resides and how we would want it transformed. ner, the overhead may be
insignificant. At this time, we
• Deciding where to place our code: within the transfer logic or update logic, or within the user should familiarize ourselves with
exit in R/3 or BW.
where BW will permit customer-
• Actual ABAP development and programming. provided ABAP programming.
• Unit testing within the ABAP Workbench.
Now let's look at the options
o Make sure the individual code performs what it is meant to do. found within BW that allow the
additional implementation of
o Debugging works well here, using breakpoints.
ABAP programming (see Figure 2).
• Integration testing
The list in Figure 2 represents
o In BW, this is usually accomplished via data extraction and/or loading.
the areas within BW that may
require ABAP expertise during a
Figure 1: Basic Guidelines for ABAP Programming in BW BW implementation. This list cov-

SAPtips © 2004 Klee Associates, Inc.

Das könnte Ihnen auch gefallen