how to create custom d

Upload: piedone64

Post on 08-Aug-2018

236 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/22/2019 How to Create Custom D

    1/22

    How to

    Create custom D&R scenariosbetween BW characteristics

    and R/3 BOR objects for EP5.0/6.0

    BUSINESS INFORMATION WAREHOUSE

    Applicable Releases: BW 3.x, EP 5.0, EP6.0

    August 2003

    2003 SAP AG

  • 8/22/2019 How to Create Custom D

    2/22

    1 Drag&Relate Business Scenario

    You have a BW query or Web Application and R/3 transaction running in the Portal. You want to drag

    a BW characteristic from a BW application onto an R/3 transaction or vice versa (R/3 BOR (BusinessObject Repository) BW characteristic).

    SAP AG2002, Title of Presentation, Speaker Name 1

    Drag & Relate from a BW Query

    2003 SAP AG

  • 8/22/2019 How to Create Custom D

    3/22

    SAP AG2002, Title of Presentation, Speaker Name 3

    Display Master Data in R/3 after D&R

    Drag & Relate works with transitive relations. That means the pre-requisite to enable D&R between aBW characteristic and a BOR object is, that you have a 1:1 key mapping between the characteristicand a BOR object or between an attribute of the characteristic and the BOR object.

    For example, you can Drag & Relate 0MATERIAL to an R/3 transaction that displays Materialbecause the corresponding BOR Object BUS 2001 has the same key as 0MATERIAL. You couldalso drag 0CUSTOMER to an R/3 transaction that displays material if 0MATERIAL is attached to0CUSTOMER as a display or a navigational attribute.

    That also means: if a correlation between 0MATERIAL and BOR BUS1001 is maintained (where thekeys map 1:1) you can automatically D&R between a compound InfoObject like 0MAT_PLANT andBUS1001 (where the keys do NOT map 1:1) if 0MATERIAL is included as attribute to 0MAT_PLANT.These generic D&R mappings work with attributes, compounds and navigation attributes and weuse transitive relations as the basis for the workarounds desribed in this paper.

    With Drag & Relate you can only pass ONE characteristic as parameter. For scenarios where youwant to pass multiple parameters of even the entire context of a BW query you have to use the RRI(Report-Report Interface) (Note: 637415). RRI is mandatory in any case where you want to trigger anR/3 transaction that displays transactional data rather that masterdata.

    Please note that there are default BW characteristics that are enabled for D&R and correpond to theirrespective BOR object by having exactly the same key (Note: 637677). For these characteristics andtheir reference characteristics you do not have to consult this How-to paper.

    For any other Business Content InfoObject or custom built InfoObject you can check this How-ToPaper in order to determineif a workaround via creating additional or modifying existing metadata isfeasible.

    2003 SAP AG

  • 8/22/2019 How to Create Custom D

    4/22

    The bottom line of these workarounds is always to have an attribute to the characteristic that youwant to enable for D&R. This attribute has to match semantically and has to have the same key asthe BOR object.

    Some examples on how to achieve this goal are listed in this paper. As there is an endless number of

    possible scenarios we can only give some specific examples.Please note that we do not guarantee that there is always a workaround available for every D&Rcombination of BW characteristcs and BOR types. Depending on how both objects are modeled itmay not be feasible to implement D&R in each scenario. Examples of model-driven restrictions canbe found in scenario 2 and 3 below.

    This paper describes how to model BW Metadata in order to enable Drag&Relate. On R/3 side thecontext information required for D&R is maintained as metadata for the corresponding businessobject types in the Business Object Repository (BOR). This metadata describes the relationshipbetween business objects and

    Screen fields

    Possible target transactions

    Other transactions that can be derived from the relationships between business objects

    D&R BOR Objects in R/3 are maintained in transaction SPO0. Here you can also maintain your ownBOR objects. Please make yourself familiar with transaction SPO0 before working with this paper.Documentation: SAP Enterprise PortalUnification Guides SAP Unifier for R/3 Drag & Relateand the Business Object Repository.

    2 Prerequisites:

    Please make yourself familiar wit the Standard EP documentation for D&R located at SAP EnterprisePortalUnification Guides

    Please also note that the standard BW documentation that was relaesed with BW 3.0 had somemistakes (Note: 637677) and that it was exchanged with a D&R documentation enhancement.Please read this documentation enhancement on Service Marketplace alias BW documentation.From BW 3.5 this documentation will move into the Standard BW documentation again.

    Your R/3 and BW Systems are up and running. The Unification server as well as the Unifiers areinstalled and you have created the R/3 and BW unification projects. You need the following releases:

    Enterprise Portal 5.0 Support Package 04

    SAP BW 3.0B SP 14

    If you are below these Patch Levels, please make sure the following notes (from 2003) are applied toyour Unficiation Server and BW:

    626420625593637271637268637282

    2003 SAP AG

  • 8/22/2019 How to Create Custom D

    5/22

    3 The Step-By-Step Solution for three differentscenarios

    Note that the step-by-step solutions are only example solutions. There may be different modelingpossibilities to implement each scenario.

    3.1 Drag&Relate between a characteristic and a BOR object where the

    characteristic has a compounded key and the BOR has a single key

    (Example: 0MAT_SALES BUS1001)

    Solution Abstract:

    0MAT_SALES includes the compounds 0SALESORG and 0DISTR_CHAN whereas the BORobject does not have any compounds in the key. To solve the problem you can add

    0MATERIAL as attribute to 0MAT_SALES. As the key of 0MATERIAL corresponds to the keyof BUS1001, you will be able to also perform D&R from 0MAT_SALES to BUS1001.

    Step 1:

    Add 0MATERIAL as attribute of0MAT_SALES in order to enableDrag&Relate between BOR objectBUS1001 and 0MAT_SALES.

    Define this new attribute as attribute ornavigation attribute.

    2003 SAP AG

  • 8/22/2019 How to Create Custom D

    6/22

    Step 2:

    Define transfer rules for the newattribute 0MATERIAL.

    Step 3

    Either reload master data again or fill0MATERIAL with the master data thatalready exists for 0MAT_SALES. Usethe following code sample to fill thisnew attribute.

    data: wa type /BI0/PMAT_SALES.

    select *

    into wa

    from /BI0/PMAT_SALES.

    wa-material = wa-mat_sales.

    update /BI0/PMAT_SALES from wa.

    endselect.

    commit work.call function'RSDRX_FILL_INITIAL_XYTABLE'

    exporting i_iobjnm = '0MAT_SALES'.

    2003 SAP AG

  • 8/22/2019 How to Create Custom D

    7/22

    Step 4:

    Create a query on top of this InfoCubewith 0MAT_SALES.

    Enable this query for D&R in the query

    propertiesInculde the query as iView in yourportal and make sure your R/3transaction for BUS1001 is available viathe iPanel

    (This is not part of the How-to Paper.Please refer to standard docu)

    Step 5:

    Maintain the mapping between0MATERIAL and BUS1001 on both theBW and the R/3 Unifiers

    You will be able to D&R between0MAT_SALES and BUS1001 because0MAT_SALES is now an attribute to0MAT_SALES. The unifiers will detectthis attribute because it has the samekeys as BUS1001 and use itautomatically as a bridge for D&R.

    Step 6:

    Include your InfoProvider that holds0MAT_SALES into the BW Unifierrepository.

    For information on the next steps pleasecheck Standard NetWeaver Docu:Enterprise Portal Unification Guides SAP Unification Server AdministrationGuide Mapping Relationships Usingthe Relationship Editor

    2003 SAP AG

  • 8/22/2019 How to Create Custom D

    8/22

    Step 7:

    Generate your project.

    2003 SAP AG

  • 8/22/2019 How to Create Custom D

    9/22

    Step 8:

    Maintain the relationship between0MATERIAL and BUS1001.

    2003 SAP AG

  • 8/22/2019 How to Create Custom D

    10/22

    Step 9

    You can pre-filter the objects you wantto see in the Relationship Editor.

    Step 10:

    Select the field that connects bothobjects.

    2003 SAP AG

  • 8/22/2019 How to Create Custom D

    11/22

    Step 11:

    Select OBJECTKEY as fields.

    2003 SAP AG

  • 8/22/2019 How to Create Custom D

    12/22

    Step: 12

    Save you correlation.

    Note: in order to allow D&R from andto BW you have to maintain the Relation

    Editor twice. Once for the BW Unifierand once for the R/3 Unifier.

    3.2 Drag & Relate between a characteristic and a BOR object where the BW

    object key is only part of the BOR object key. (Example: 0PROJECT

    BUS2001)

    Solution Abstract

    0PROJECT has only external project number as key; the BOR object BUS2001 has a compoundedkey consisting of external and internal project number. The mapping is possible as internal projectnumber can be uniquely assigned to an external project number; so we can add a new InfoObject to0PROJECT as attribute or navigational attribute that has the internal and the external project numberas key.

    Restriction: To achieve D&R in such a scenario is only possible because internal and externalproject number can be uniquely matched. If this was not the case D&R would not be achievable.

    2003 SAP AG

  • 8/22/2019 How to Create Custom D

    13/22

    Step1:

    Enhance the extract structureBIW_PROJ in the source system byadditional field PSPNR (internalproject number).

    Step 2:

    Check that Hide field is notflagged for PSPNR .

    2003 SAP AG

  • 8/22/2019 How to Create Custom D

    14/22

    Step 3:

    Replicate DataSource in SAP BW.

    Step 4:

    Create new InfoObject PM_PRJINTfor internal project number (NUMC

    8), compounded to 0PROJECT.

    2003 SAP AG

  • 8/22/2019 How to Create Custom D

    15/22

    Step 5:

    Add new InfoObject to attributes of0PROJECT and define it asnavigational attribute.

    Step 6:

    Branch into 0PROJECT InfoSource andadd new field PSPNR to transferstructure.

    Step 7:

    Define transfer rules PSPNRPM_PRJINT.

    Step 8:

    Reload master data.

    2003 SAP AG

  • 8/22/2019 How to Create Custom D

    16/22

    Create a query on top of this Cube with0PROJECT.

    Enable this query for D&R in the queryproperties.

    Maintain the mapping betweenPM_PRJINT and BUS2001 on both theBW and the R/3 Unifiers.

    You will be able to D&R between0PROJECT and BUS2001 becausePM_PRJINT is now an attribute to0PROJECT.

    The unifiers will detect this attributebecause it has the same keys as BUS2001and use it automatically as a bridge forD&R.

    Please follow Steps 4 to 12 of the first scenario for moreinformation.

    3.3 Drag&Relate between a characteristic and a BOR object where both

    objects are semantically different and the keys differ in any part.

    (Example: 0GL_ACCOUNT BUS3006)

    Please note:Although the following modeling approach enables D&R for this specific scenario it isheavily recommended that you consider using RRI instead. Especially in Financials, mosttransactions require a different set of input parameters and most transactions are not for displaying

    master- but transactional data. SAP recommends RRI for these scenarios as RRI can provide notonly the pure masterdata as input but also the overall context.

    Solution Abstract:

    The BW InfoObject and the BOR object are semantically different;

    The key of the InfoObject 0GL_ACCOUNT consists of Account Number and the compound Chartof accounts whereas the key of the BOR object consists of Account Number and the compoundCompany Code.

    Solution Restriction: A mapping is possible using transactional data where Company Code and0GL_ACCOUNT are related in one InfoCube.

    We define a new InfoObject PM_ACC which compounds Account number to Company code andadd this InfoObject to the InfoCube (or a copy of it). This InfoCube has to be filled out of the original

    InfoCube.

    Example:

    InfoCube 1: Company Code | Account Num | Keyfigure

    A 4711 3000

    B 4711 3000

    C 4712 3000

    2003 SAP AG

  • 8/22/2019 How to Create Custom D

    17/22

    InfoCube 2: PM_ACC (Key: Comp. Code|Account Num) | KeyFigure

    A|4711 3000

    B|4711 3000

    C|4712 3000

    Now, we can use Drag&Relate on this newly created InfoObject PM_ACC through to the matchingBOR object.

    Step 1:

    Create new InfoObject PM_ACCmatching the BOR object (Key:account number /company code).

    2003 SAP AG

  • 8/22/2019 How to Create Custom D

    18/22

    Step 2:

    Find InfoCube which contains0COMP_CODE and0GL_ACCOUNT

    e.g. 0COOM_C02

    Create Export DataSource.

    Step 3:

    Copy InfoCube 0COOM_C02.

    Insert new InfoObject PM_ACC.

    2003 SAP AG

  • 8/22/2019 How to Create Custom D

    19/22

    Step 4:

    Create new dimension.

    Step 5:

    Assign PM_ACC to new dimension.

    2003 SAP AG

  • 8/22/2019 How to Create Custom D

    20/22

    Step 6:

    Create Update Rules.

    Step 7:

    Define Update Rules for PM_ACC.

    2003 SAP AG

  • 8/22/2019 How to Create Custom D

    21/22

    Step 8:

    Load data from 0COOM_C02 into newInfoCube.

    (via InfoSources SAP Application

    Components Datamarts)

    Step 9:

    Create a new query on top of thisInfoCube with the new characteristc. Ifyou enable this query for D&R, maintainthe mapping between PM_ACC andBUS3006 on both the BW and the R/3Unifier, you will be able to D&R

    between both objects.

    Please follow Steps 4 to 12 of the first scenario for moreinformation.

    Please note:

    Even if we recommend using RRIinstead you see it is possible to addresstransactions such as fbl3 (input: accountnumber & comp code) or fs10 (input:account number, comp code and fiscalyear) via Drag&Relate.

    Drag&Relate however will never deliveryou the whole context you need for

    many transactions (especially FI).For transaction fs10 you would have tocompound Fiscal Year as well. Otheroptions would be to leave Fiscal Yearopen and end-users have to specify it, oryou pre-set Fiscal year for transactionfs10. This could be done in transactionSP0O.

    For information on how to do this please check StandarNetWeaver Docu: Enterprise Portal Unification GuidesSAP Unifier for R/3 Drag & Relate and the BusinessObject Repository Assigning Target Transactions.

    2003 SAP AG

  • 8/22/2019 How to Create Custom D

    22/22