Sei sulla pagina 1di 22

How to Create custom D&R scenarios between BW characteristics and R/3 BOR objects for EP 5.0/6.

0
BUSINESS INFORMATION WAREHOUSE

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

2003 SAP AG

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 (Business Object Repository) BW characteristic).

Drag & Relate from a BW Query

SAP AG 2002, Title of Presentation, Speaker Name 1

2003 SAP AG

Display Master Data in R/3 after D&R

SAP AG 2002, Title of Presentation, Speaker Name 3

Drag & Relate works with transitive relations. That means the pre-requisite to enable D&R between a BW characteristic and a BOR object is, that you have a 1:1 key mapping between the characteristic and 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 Material because the corresponding BOR Object BUS 2001 has the same key as 0MATERIAL. You could also drag 0CUSTOMER to an R/3 transaction that displays material if 0MATERIAL is attached to 0CUSTOMER as a display or a navigational attribute. That also means: if a correlation between 0MATERIAL and BOR BUS1001 is maintained (where the keys map 1:1) you can automatically D&R between a compound InfoObject like 0MAT_PLANT and BUS1001 (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 we use 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 you want 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 an R/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 their respective BOR object by having exactly the same key (Note: 637677). For these characteristics and their 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-To Paper in order to determine if a workaround via creating additional or modifying existing metadata is feasible.

2003 SAP AG

The bottom line of these workarounds is always to have an attribute to the characteristic that you want to enable for D&R. This attribute has to match semantically and has to have the same key as the 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&R combination of BW characteristcs and BOR types. Depending on how both objects are modeled it may not be feasible to implement D&R in each scenario. Examples of model-driven restrictions can be 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 the context information required for D&R is maintained as metadata for the corresponding business object types in the Business Object Repository (BOR). This metadata describes the relationship between 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 own BOR objects. Please make yourself familiar with transaction SPO0 before working with this paper. Documentation: SAP Enterprise Portal Unification Guides SAP Unifier for R/3 Drag & Relate and the Business Object Repository.

2 Prerequisites:
Please make yourself familiar wit the Standard EP documentation for D&R located at SAP Enterprise Portal Unification Guides Please also note that the standard BW documentation that was relaesed with BW 3.0 had some mistakes (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 are installed 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 to your Unficiation Server and BW: 626420 625593 637271 637268 637282

2003 SAP AG

3 The Step-By-Step Solution for three different scenarios


Note that the step-by-step solutions are only example solutions. There may be different modeling possibilities 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 BOR object 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 key of BUS1001, you will be able to also perform D&R from 0MAT_SALES to BUS1001.

Step 1: Add 0MATERIAL as attribute of 0MAT_SALES in order to enable Drag&Relate between BOR object BUS1001 and 0MAT_SALES. Define this new attribute as attribute or navigation attribute.

2003 SAP AG

Step 2: Define transfer rules for the new attribute 0MATERIAL.

Step 3 Either reload master data again or fill 0MATERIAL with the master data that already exists for 0MAT_SALES. Use the following code sample to fill this new 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

Step 4: Create a query on top of this InfoCube with 0MAT_SALES. Enable this query for D&R in the query properties Inculde the query as iView in your portal and make sure your R/3 transaction for BUS1001 is available via the iPanel (This is not part of the How-to Paper. Please refer to standard docu)

Step 5: Maintain the mapping between 0MATERIAL and BUS1001 on both the BW and the R/3 Unifiers You will be able to D&R between 0MAT_SALES and BUS1001 because 0MAT_SALES is now an attribute to 0MAT_SALES. The unifiers will detect this attribute because it has the same keys as BUS1001 and use it automatically as a bridge for D&R.

Step 6: Include your InfoProvider that holds 0MAT_SALES into the BW Unifier repository. For information on the next steps please check Standard NetWeaver Docu: Enterprise Portal Unification Guides SAP Unification Server Administration Guide Mapping Relationships Using the Relationship Editor

2003 SAP AG

Step 7: Generate your project.

2003 SAP AG

Step 8: Maintain the relationship between 0MATERIAL and BUS1001.

2003 SAP AG

Step 9 You can pre-filter the objects you want to see in the Relationship Editor.

Step 10: Select the field that connects both objects.

2003 SAP AG

10

Step 11: Select OBJECTKEY as fields.

2003 SAP AG

11

Step: 12 Save you correlation. Note: in order to allow D&R from and to BW you have to maintain the Relation Editor twice. Once for the BW Unifier and 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 compounded key consisting of external and internal project number. The mapping is possible as internal project number can be uniquely assigned to an external project number; so we can add a new InfoObject to 0PROJECT as attribute or navigational attribute that has the internal and the external project number as key. Restriction: To achieve D&R in such a scenario is only possible because internal and external project number can be uniquely matched. If this was not the case D&R would not be achievable.

2003 SAP AG

12

Step1: Enhance the extract structure BIW_PROJ in the source system by additional field PSPNR (internal project number).

Step 2: Check that Hide field is not flagged for PSPNR .

2003 SAP AG

13

Step 3: Replicate DataSource in SAP BW.

Step 4: Create new InfoObject PM_PRJINT for internal project number (NUMC 8), compounded to 0PROJECT.

2003 SAP AG

14

Step 5: Add new InfoObject to attributes of 0PROJECT and define it as navigational attribute.

Step 6: Branch into 0PROJECT InfoSource and add new field PSPNR to transfer structure.

Step 7: Define transfer rules PSPNR PM_PRJINT.

Step 8: Reload master data.

2003 SAP AG

15

Create a query on top of this Cube with 0PROJECT. Enable this query for D&R in the query properties. Maintain the mapping between PM_PRJINT and BUS2001 on both the BW and the R/3 Unifiers. You will be able to D&R between 0PROJECT and BUS2001 because PM_PRJINT is now an attribute to 0PROJECT. The unifiers will detect this attribute because it has the same keys as BUS2001 and use it automatically as a bridge for D&R.

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

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 is heavily recommended that you consider using RRI instead. Especially in Financials, most transactions 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 not only 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 Chart of accounts whereas the key of the BOR object consists of Account Number and the compound Company Code. Solution Restriction: A mapping is possible using transactional data where Company Code and 0GL_ACCOUNT are related in one InfoCube. We define a new InfoObject PM_ACC which compounds Account number to Company code and add 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 A B C 4711 4711 4712 | Keyfigure 3000 3000 3000

2003 SAP AG

16

InfoCube 2:

PM_ACC (Key: Comp. Code|Account Num) | KeyFigure A|4711 B|4711 C|4712 3000 3000 3000

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

Step 1: Create new InfoObject PM_ACC matching the BOR object (Key: account number /company code).

2003 SAP AG

17

Step 2: Find InfoCube which contains 0COMP_CODE and 0GL_ACCOUNT e.g. 0COOM_C02 Create Export DataSource.

Step 3: Copy InfoCube 0COOM_C02. Insert new InfoObject PM_ACC.

2003 SAP AG

18

Step 4: Create new dimension.

Step 5: Assign PM_ACC to new dimension.

2003 SAP AG

19

Step 6: Create Update Rules.

Step 7: Define Update Rules for PM_ACC.

2003 SAP AG

20

Step 8: Load data from 0COOM_C02 into new InfoCube. (via InfoSources SAP Application Components Datamarts)

Step 9: Create a new query on top of this InfoCube with the new characteristc. If you enable this query for D&R, maintain the mapping between PM_ACC and BUS3006 on both the BW and the R/3 Unifier, you will be able to D&R between both objects. Please note: Even if we recommend using RRI instead you see it is possible to address transactions such as fbl3 (input: account number & comp code) or fs10 (input: account number, comp code and fiscal year) via Drag&Relate. Drag&Relate however will never deliver you the whole context you need for many transactions (especially FI). For transaction fs10 you would have to compound Fiscal Year as well. Other options would be to leave Fiscal Year open and end-users have to specify it, or you pre-set Fiscal year for transaction fs10. This could be done in transaction SP0O.

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

For information on how to do this please check Standard NetWeaver Docu: Enterprise Portal Unification Guides SAP Unifier for R/3 Drag & Relate and the Business Object Repository Assigning Target Transactions.

2003 SAP AG

21

2003 SAP AG

22

Potrebbero piacerti anche