vtrpwejdni

  • Upload
    kkp

  • View
    223

  • Download
    0

Embed Size (px)

Citation preview

  • 8/7/2019 vtrpwejdni

    1/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

    [email protected](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 thinkABAP was a thing of the past. But not so, as BW expert Pat Pesa can attest. In this excellent be

    Click here to read this Snippet

    http://www.erptips.com/Snippets/vtrpwejdni.pdf#page=2http://www.erptips.com/Snippets/vtrpwejdni.pdf#page=2
  • 8/7/2019 vtrpwejdni

    2/3

    SAPtips 2004 Klee Associates, Inc.

    Page1

    Editor's Note: With all the talkabout NetWeaver and SAPJavaConnector and other hot tools,you'd think ABAP was a thing ofthe past. But not so, as BWexpert Pat Pesa can attest. Inthis excellent "best of" article, Pat shares the most valuableABAP techniques he has used on BW projects. He starts byaddressing the key questions:What are the uses of ABAP in BW? How is programming in

    BW different than programmingin R/3? What ABAP tools areavailable in BW? Then, Pat digsinto some technical examples ofABAP-BW in action. This arti-cle provides technical managerswith a handy overview of Pat's ABAP-BW methodology, and gives ABAP programmers atechnical guide they can refer toon their BW initiatives.

    This article will focus on theconcepts and strategies that con-stitute best practices regarding theuse of ABAP programming in BW.On each project I have beeninvolved with, the use of ABAPprogramming has had a profoundeffect on our ability to model thecorrect business processes withinBW. During the design and blue-print stage, a core functionalprocess is the determination of the

    corresponding business logicfound in R/3 or legacy data sys-tems and how to accomplish thesame logic in BW. FortunatelySAP has provided several struc-tured paths to follow in order toimplement this business logic. Inthis article, I will lay the ground-work from which we can deter-

    mine the whats, wheres andhows of ABAP programming inBW. These "tips" on ABAP andBW are written with BW version3.0 and R/3 4.6C in mind, butmost of them will apply to anyversions of R/3 from 4.x and up,and any versions of BW from 2.0and up.

    This article will begin with anoverview of the prospectiveinvolvement of ABAP code, wherewe can find this code, and howbest to include coding for specificareas without impacting otherfunctionality. Our examples forthis article will include R/3 data-source modifications and the cre-

    ation of generic extractors in R/3for use with BW.

    To get the ball rolling, I wouldlike to start off with the followingconsiderations. Remember that inSAP BW, most everything is inter-connected, and we share a greatdeal of data amongst several data

    targets. Therefore, we will need be specifically aware of how wproceed with our data or recoupdates and where we decide place ABAP programming thwill manage these updates. Haing said that, we can now examine what possibilities exist fusing ABAP to customize our Benvironment.

    What Can We Do WithABAP in BW?

    As with anything, in SAP twords and phrase "ABAP prgramming" routinely surface topics and questions duriimplementation. Howevbetween SAP R/3 and BW, theare distinct differences betwehow we can use ABAP programming in these environments anwhat we can expect as an outcomof development. In order understand how ABAP is used

    BW, we should have a generunderstanding of the infrastruture of BW. Generally speaking,BW, we are dealing with Objecthat we connect with some typeconfiguration, such as the linkiof an ODS with an InfoCube, the creation of source system deinitions and datasources. What wwill NOT be doing on a generbasis in BW is building screeand multiple user exits in ABAto gain additional functionalit

    This is the distinct difference BW as it relates to R/3. So if wenot using ABAP for user exits ascreens, then how will we uABAP? In BW, we will use ABAto transform our data as requirments dictate, as well as proviadditional processing duriextraction and updates.

    February/March

    2004VolumeIIIssue1

    www.SAPt

    ips.com

    SAPtips

    SAPtips

    Journal

    Journal

    ABAP Programming In BWBy Arthur "Pat" Pesa, arthurpesa, i

    In order to

    understand how

    ABAP is used in BW,

    we should have a

    general understand-

    ing of the

    infrastructure of BW.

    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 th

    management of data being queried.

  • 8/7/2019 vtrpwejdni

    3/3

    SAPtips 2004 Klee Associates, Inc.

    Page2

    Within the ABAP language arecertain constructs that allow usto get work done within this

    environment. In SAP, we will beusing the ABAP Workbench tocreate our code. This is true foreach instance we are writingcode, whether it is from within atransfer rule, update rule, orstart routine. It is important tounderstand the fundamentalconcepts of the ABAP workbenchin order to proceed. First, weshould be familiar with the con-structs of programming, such asunderstanding what a sub rou-tine does, how a function moduleworks, etc. Also, we shouldunderstand the different avenueswe may use in order to debug ourcode. This last measure is ofextreme importance, since it willbe necessary to debug code fromtime to time in order to createwhat our requirements dictate.For the purposes of this article,we will assume that the readeralready has a grounding in these

    basic ABAP concepts, includingthe ABAP Workbench.

    Our approach to ABAP develop-ment in BW will follow the simpleguidelines found in Figure 1.

    Where Are We Able to Cre-ate ABAP Programming inBW?

    An often-asked question prior tothe beginning of a BW projectrevolves around how much ABAPprogramming will be necessary.Following the construct of a typi-cal R/3-BW integration, one

    would assume that all ABAPwould be done by a team of pro-grammers and that the BW con-sultants would furnish documen-tation around the changes to bemade. However, in BW, the line

    between functional and technicis often much more gray than tdistinction in R/3. To cite oexample: we can configure objecin BW, thus gaining a great deal functionality, without writing array of user exits as found in R/

    Lets take a look at where w

    are able to augment our Bdevelopment with ABAP anwhat that may mean to the sytem performance. Generalwhen adding code, we cassume some type of run timoverhead in the form of procesing time or memory impaHowever, when programmed an expedient and concise maner, the overhead may insignificant. At this time, wshould familiarize ourselves wi

    where BW will permit customeprovided ABAP programming.

    Now let's look at the optiofound within BW that allow tadditional implementation ABAP programming (see Figure 2

    The list in Figure 2 representhe areas within BW that mrequire ABAP expertise duringBW implementation. This list co

    February/March

    2004VolumeIIIssue1

    www.SAPt

    ips.com

    SAPtips

    SAPtips

    Journal

    Journal

    Requirements

    o Programming actions in the form of pseudo-code or a high level flow of data

    Design determining where our data resides and how we would want it transformed.

    Deciding where to place our code: within the transfer logic or update logic, or within the user

    exit in R/3 or BW.

    Actual ABAP development and programming.

    Unit testing within the ABAP Workbench.

    o Make sure the individual code performs what it is meant to do.

    o Debugging works well here, using breakpoints.

    Integration testing

    o In BW, this is usually accomplished via data extraction and/or loading.

    Figure 1: Basic Guidelines for ABAP Programming in BW

    Figure 2: BW and R/3 ABAP Programming Options

    Technical Area Description

    BEx User Exit Allows the creation and population of variables and calculations for keyfigures and variables on a runtime basis. This user exit is called each time

    BEx is executed.R/3 User Exit This user exit is found in R/3 under CMOD and contains additional pro-

    gramming that is needed to fill field additions to extract structures. We canalso create additional business logic against data prior to its transfer toBW.

    BW Transfer rules These rules are invoked as data is transferred from R/3 to BW, or fromwithin BW as export data sources and InfoSources are created.

    BW Update Rules These rules are invoked as data is being updated into data targets.Whether ODS Objects or InfoCubes, each update results in the execution ofan Update Rule.

    BW Start Routines Start routines in BW Update Rules are used to manage whole subsets ofdata. This is different than a simple update rule in that update rules aredata element specific.