howto navbwcrm

12
 How-to Guide SAP CRM Content Edition  How To… Enable Portal Navigation from BW Web Templates to PCUI Applications (Preliminary) Version 0.9 September 2004  Applicable Releases: SAP CRM Content Edition – BW 3.52

Upload: will-sun

Post on 02-Jun-2018

221 views

Category:

Documents


0 download

TRANSCRIPT

8/10/2019 Howto Navbwcrm

http://slidepdf.com/reader/full/howto-navbwcrm 1/12

 

How-to Guide

SAP CRM Content Edition 

How To…Enable PortalNavigation from BWWeb Templates to

PCUI Applications(Preliminary) Version 0.9 – September 2004

 Applicable Releases:SAP CRM Content Edition – BW 3.52

8/10/2019 Howto Navbwcrm

http://slidepdf.com/reader/full/howto-navbwcrm 2/12

 

© Copyright 2004 SAP AG. All rights reserved.

No part of this publication may be reproducedor transmitted in any form or for any purposewithout the express permission of SAP AG. Theinformation contained herein may be changedwithout prior notice.

Some software products marketed by SAP AGand its distributors contain proprietary softwarecomponents of other software vendors.

Microsoft, Windows, Outlook, and PowerPoint 

are registered trademarks of Microsoft

Corporation.

IBM, DB2, DB2 Universal Database, OS/2,Parallel Sysplex, MVS/ESA, AIX, S/390, AS/400, OS/390, OS/400, iSeries, pSeries,xSeries, zSeries, z/OS, AFP, Intelligent Miner,WebSphere, Netfinity, Tivoli, and Informix aretrademarks or registered trademarks of IBMCorporation in the United States and/or othercountries.

Oracle is a registered trademark of OracleCorporation.

UNIX, X/Open, OSF/1, and Motif are registeredtrademarks of the Open Group.

Citrix, ICA, Program Neighborhood,MetaFrame, WinFrame, VideoFrame, andMultiWin are trademarks or registeredtrademarks of Citrix Systems, Inc.

HTML, XML, XHTML and W3C are trademarks

or registered trademarks of W3C

®

, World WideWeb Consortium, Massachusetts Institute ofTechnology.

Java is a registered trademark of SunMicrosystems, Inc.

JavaScript is a registered trademark of SunMicrosystems, Inc., used under license fortechnology invented and implemented byNetscape.

MaxDB is a trademark of MySQL AB, Sweden.

contained in this document serves informationalpurposes only. National product specifications

may vary.

These materials are subject to change withoutnotice. These materials are provided by SAP AG and its affiliated companies ("SAP Group")for informational purposesonly, without representation or warranty of anykind, and SAP Group shall not be liable forerrors or omissions with respect to thematerials. The only warranties for SAPGroup products and services are those that areset forth in the express warranty statements

accompanying such products and services, ifany. Nothing herein should be construed asconstituting an additional warranty.

These materials are provided “as is” without awarranty of any kind, either express or implied,including but not limited to, the impliedwarranties of merchantability, fitness for aparticular purpose, or non-infringement.SAP shall not be liable for damages of any kindincluding without limitation direct, special,indirect, or consequential damages that mayresult from the use of these materials.SAP does not warrant the accuracy orcompleteness of the information, text, graphics,links or other items contained within thesematerials. SAP has no control over theinformation that you may access through theuse of hot links contained in these materials anddoes not endorse your use of third party webpages nor provide any warranty whatsoeverrelating to third party web pages.SAP NetWeaver “How-to” Guides are intended

to simplify the product implementation. Whilespecific product features and procedurestypically are explained in a practical businesscontext, it is not implied that those features andprocedures are the only approach in solving aspecific business problem using SAPNetWeaver. Should you wish to receiveadditional information, clarification or support,please refer to SAP Consulting. Any software coding and/or code lines / strings(“Code”) included in this documentation are onlyexamples and are not intended to be used in a

productive system environment. The Code isonly intended better explain and visualize the

8/10/2019 Howto Navbwcrm

http://slidepdf.com/reader/full/howto-navbwcrm 3/12

 

SAP, R/3, mySAP, mySAP.com, xApps, xApp,SAP NetWeaver, and other SAP products andservices mentioned herein as well as theirrespective logos are trademarks or registeredtrademarks of SAP AG in Germany and inseveral other countries all over the world. Allother product and service names mentioned arethe trademarks of their respective companies.Data

syntax and phrasing rules of certain coding.SAP does not warrant the correctness andcompleteness of the Code given herein, andSAP shall not be liable for errors or damagescaused by the usage of the Code, except if suchdamages were caused by SAP intentionally orgrossly negligent.

8/10/2019 Howto Navbwcrm

http://slidepdf.com/reader/full/howto-navbwcrm 4/12

 

- 1 -

1 Scenario

In the SAP portal solution, BW Web templates and PCUI applications can be combined

in a portal role. So far, however, it was not possible to navigate from a BW Web templateto a PCUI application. If you are for example looking at a BW Web template presenting a

query about the activities connected to a marketing campaign you may want to jump to a

PCUI application that allows you to check the attributes of the specific marketing

campaign. The solution described in this how-to-paper enables you to implement a portal-

 based navigation from the Web template to the respective PCUI application. The

navigation is triggered from the table cell that corresponds to the marketing campaign in

question and opens the corresponding PCUI application with the campaign ready to edit.

Since BW and the OLTP systems from where the data originates do not always use the

same keys for identical objects, a mapping functionality is needed. This mapping

functionality is based on a few Customizing tables which are delivered with this solution

and which have to be maintained in order to enable the navigation for specificInfoObjects.

2 Introduction

Since the solution is based on table interface classes the scope of this development is

limited to enabling navigation from tables. The context menu for each InfoObject will be

enhanced with links to the applications that have to be defined in Customizing. For a

marketing element (e.g. marketing campaign) you could for example customize a link to

the Marketing Planner BSP. Upon right mouse click on a campaign the following context

menu would appear:

8/10/2019 Howto Navbwcrm

http://slidepdf.com/reader/full/howto-navbwcrm 5/12

 

- 2 -

Select Navigation to Marketing Planner  to display the BSP with the CRM object related

to the selected characteristic value in the OIC.

8/10/2019 Howto Navbwcrm

http://slidepdf.com/reader/full/howto-navbwcrm 6/12

 

- 3 -

 Note that these screenshots are just used for visualization purposes. Navigation will only

work in the portal environment (the screenshots show the web applications running as

standalone applications).

8/10/2019 Howto Navbwcrm

http://slidepdf.com/reader/full/howto-navbwcrm 7/12

 

- 4 -

3 The Step By Step Solution

3.1 Modification of the Web Template

The navigation service is implemented using a number of ABAP classes contained in the

 package RS_BCT_CRM_WEBUTIL.

The navigation is incorporated into the Web templates by using table interface class

CL_BW_BCT_NAV_PREPARE and help service class CL_BW_BCT_NAV_SERVICE

in the object tag of the table displayed in the template. (Note that the explicit definition of

the help service class in the object tag is not necessary, since the table interface class

CL_BW_BCT_NAV_PREPARE adds the help service to the page by manipulating theruntime objects. The parameters below illustrate the general procedure.):

<object><param name="OWNER" value="SAP_BW"/><param name="CMD" value="GET_ITEM"/><param name="NAME" value="TABLE_1"/><param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_GRID"/><param name="DATA_PROVIDER" value="DATAPROVIDER_1"/><param name="WIDTH" value="600"/><param name="MODIFY_CLASS" value="CL_BW_BCT_NAV_PREPARE"/><param name="HELP_SERVICE" value="NAVI"/><param name="HELP_SERVICE_CLASS" value="CL_BW_BCT_NAV_SERVICE"/>ITEM: TABLE_1

</object>

Furthermore a few Javascript functions are needed which have to be included in the template:

function SAPBCTcallNavHelpService(par,cell_type,filter,

par1,par2,item,data,x,y)

{

var url = SAP_BW_URL_Get();

url = url + "&CMD=PROCESS_HELP_WINDOW&HELP_SERVICE=NAVI";

url = url + "&ITEM=" + item;

url = url + "&NAVIOBJ=" + filter;

url = url + "&OBJTYPE=" + par;

url = url + "&" + filter + "=" + par1;

SAPBWOpenURL(url);

}

function SAPBCTgetParentEPCM() {

var currentParent = parent;

var epcmObject = null;

try {

do {

epcmObject = currentParent.EPCM;

if ((epcmObject != null) && (epcmObject != undefined)) {

return epcmObject;

8/10/2019 Howto Navbwcrm

http://slidepdf.com/reader/full/howto-navbwcrm 8/12

 

- 5 -

}

if (currentParent == top)

break;

currentParent = currentParent.parent;

}

while (true);

}catch (ex) {

}

return null;

}

function SAPBCTNavigateToPCUI(objtype, objectkey) {

var epcm = SAPBCTgetParentEPCM();

var anRelURL;

var iViewFlg;

anRelURL ="ROLES://portal_content/com.sap.pct.crm.crmbp/com.sap.pct.crm.roles/ ";

anRelURL = anRelURL +

"com.sap.pct.crm.core.defaultservices/com.sap.pct.crm.core.urldispatcher"; 

if (epcm != null) {

anRelURL = anRelURL + "?CRM_OBJECT_TYPE=" + objtype;

anRelURL = anRelURL + "&CRM_METHOD=DEFAULT";

anRelURL = anRelURL + "&CRM_OBJECT_ID=" + objectkey;

epcm.doNavigate(anRelURL,0,0,0,2);

}

}

The help service class will automatically include the Javascript file BCTNavigation.js

which contains those functions in your template (as of BW 3.52 the Javascript file should

 be in the mime repository).

Important:On installing the CRM Business Package, the location of the URL dispatcher has to be set

in the above JAVA Script with its actual location, since this location may vary. Without

the proper setting of the location, the navigation will not work.Replace the PCD locator marked above in bold with the correct PCD location of the URL

dispatcher. For more information about the URL dispatcher see the chapter CRM Default

Services under People-Centric CRM Installation and Configuration Guides -> Business

 Package for mySAP CRM, BPP 2004, Config. (60.1.1) -> Configuring the Business

 Package for my SAP CRM.

3.2 Customizing

In order to enable navigation you need to define which InfoObjects should be enabled fornavigation and how the object keys that are needed to navigate to the PCUI application

8/10/2019 Howto Navbwcrm

http://slidepdf.com/reader/full/howto-navbwcrm 9/12

 

- 6 -

can be determined. In order to do this you have to maintain the Customizing view

RSBCT_NAVCUSTOM.

Here you have to define the InfoObject that is to be enabled for navigation, the PCUI

applicaton that you want to link to, a text for the navigation link in the context menu and

information on where the object key for the PCUI can be found.

The object key can be an attribute of the InfoObject. In this case Customizing for the

navigation link looks like this:

8/10/2019 Howto Navbwcrm

http://slidepdf.com/reader/full/howto-navbwcrm 10/12

 

- 7 -

If there is no InfoProvider specified in the field InfoCube the object key will by default be

taken from an attribute of the InfoObject. This key is identified via the InfoObject to

which the link is assigned (in many cases they will be identical, here the object key will

 be an attribute of 0BPARTNER). This is a general convention: If you specify an

InfoCube or an ODS object here, the object key will be retrieved from that InfoProvider.

Each link has a unique ID. Then you enter the InfoObject that you want to link to the

PCUI application specified in the next field. In this example, the navigation will lead

from the InfoObject 0BP_ACTIVIT to a Business Partner PCUI application. The third

field contains an InfoObject that is to be mapped with the InfoObject that gets the link:

Here 0BP_ACTIVIT corresponds to the InfoObject 0BPARTNER from which it is

derived. Customizing is completed by another InfoObject field where you specify the

attribute field that contains the object key. In this case it is 0BPARTNER.

The second case is that the object key can be retrieved from an InfoProvider. In our

example it is the ODS 0CRM_OPPH. This ODS object is following our convention

specified in the InfoProvider field thereby indicating that the object key has to be taken

from an InfoProvider instead of an InfoObject. As in the example above you specify the

InfoObject that is to get an object link to the PCUI application specified in the next field.

The third field contains an InfoObject that is to be identified with the InfoObject to which

the link is assigned. In this example 0CRM_OBJ_ID is identified with itself. Thisidentification is used to select the line item from the InfoProvider that corresponds to

8/10/2019 Howto Navbwcrm

http://slidepdf.com/reader/full/howto-navbwcrm 11/12

 

- 8 -

0CRM_OBJ_ID. This example is trivial, but again the InfoObjects could be different so

that the value of the InfoObject to be linked to a PCUI application is used in a select

statement on the InfoProvider over the InfoObject that it is identified with. The

Customizing is completed by another InfoObject field where you specify the InfoProvider

field that contains the object key. Here it is 0CRM_OHGUID.

In addition the BAdI BW_PCUI_NAVIOBJKEYS is implemented which offers the

method DETERMINE_OBJECT_KEY where additional logic to determine the object key

can be implemented.

8/10/2019 Howto Navbwcrm

http://slidepdf.com/reader/full/howto-navbwcrm 12/12

 

www.sap.com/netweaver