You are on page 1of 12

How to Create Web Dynpro-Based iViews

Based on SAP NetWeaver 04 Stack 09

Jochen Guertler

WEB DYNPRO

Copyright Copyright 2004 SAP AG. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Some software products marketed by SAP AG and its distributors contain proprietary software components 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 are trademarks or registered trademarks of IBM Corporation in the United States and/or other countries. Oracle is a registered trademark of Oracle Corporation. UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc. HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C, World Wide Web Consortium, Massachusetts Institute of Technology. Java is a registered trademark of Sun Microsystems, Inc. JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. MaxDB is a trademark of MySQL AB, Sweden. SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary. These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies (SAP Group) for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.

How to Create Web Dynpro-Based iViews

WEB DYNPRO

Index and Table of Contents


Index and Table of Contents ..........................................................................................3 Introduction .....................................................................................................................4 Create a Web Dynpro iView Template .........................................................................4
Why create a Web Dynpro iView template?................................................................................. 5

Create a Web Dynpro iView ..........................................................................................5 Define Role-Based iViews .............................................................................................10


Example: How to Define Role-Based Pattern Applications........................................................ 10

Enable Single Sign-On (SSO) for a Web Dynpro iView ............................................10


Using Ticket Authentication to Enable SSO ............................................................................... 11 Using User Mapping to Enable SSO........................................................................................... 11

How to Create Web Dynpro-Based iViews

WEB DYNPRO

Introduction
To run a Web Dynpro Java or Web Dynpro ABAP application within the SAP Enterprise Portal (SAP EP) 6.0 you have to create specific iViews. These Web Dynpro-based iViews can be handled in the same way as any other iView. This document describes in detail how to create Web Dynpro-based iViews for EP 6.0 running on SAP NetWeaver 04 Stack 09.

Create a Web Dynpro iView Template


To create a Web Dynpro-based iView, use the standard Web Dynpro iView template that appears when you create a new Web Dynpro iView. If you wish to create your own Web Dynpro iView template, switch to the content catalog and create a folder, which should contain your Web Dynpro portal content. 1. Select the context menu and choose New From PAR -> iView.

2. From the iView Wizard, Step 1: Portal Archive Selection, choose com.sap.portal.appintegrator.sap.

How to Create Web Dynpro-Based iViews

WEB DYNPRO

3. From Step 2: Portal Component Selection, select the WebDynpro component.

Why Create a Web Dynpro iView Template?


Normally, there is no need to define specific Web Dynpro iView templates. You may wish to define your own iView template to create a set of iViews with the same settings. In this case, the iView template acts as a Master iView, but be sure that your specific iView template is also part of your shipped portal content.

Create a Web Dynpro iView


Using the standard Web Dynpro iView template, or your specific iView template, define your Web Dynpro iViews.

How to Create Web Dynpro-Based iViews

WEB DYNPRO

1. Switch to the content catalog and select the folder that contains your new Web Dynpro iView. Use the context menu and select New -> iView.

2. The Web Dynpro iView Wizard appears on the right. First, choose the SAP Web Dynpro iView template or the template you create in the step before.

How to Create Web Dynpro-Based iViews

WEB DYNPRO

3. In Step 2, define the iView Name and iView ID. The name is displayed as the title. The ID is the technical name and the iView ID Prefix could be used to define your own namespace. You can also define the Master Language and provide a short content for the iView.

4. In Step 3, choose whether to create an iView for a Web Dynpro Java or Web Dynpro ABAP application.

How to Create Web Dynpro-Based iViews

WEB DYNPRO

5. In the fourth step, define the Web Dynpro-specific parameters. a. System Choose the system alias you wish to use for your Web Dynpro application. In SAP NetWeaver 04 every Web Dynpro-based iView runs isolated on a page, i.e., the iView runs a specific Web Dynpro application URL to start the Web Dynpro application. To compute this URL the system definition is needed. You must create a system alias for each SAP NetWeaver installation before you can run a Web Dynpro application on it. If your Web Dynpro application runs on the same installation as the portal itself, you can use the predefined system alias SAP_LocalSystem. There is no need to define an own system because the portal system itself is used in this case. At the moment, there is no system type definition available for a SAP NetWeaver installation. Therefore, you must use one of the available R/3 system types. You have to define only the WAS hostname and WAS Protocol parameters in the system definition. The WAS hostname must be in the form: <host>.<domain>:<port>.

'

To define and maintain your system entry, go to System Administration > System Configuration -> System Landscape. Make sure that you define a system alias for your system. Only this system alias is visible in the list of available systems. You can define more than one alias if necessary. b. Namespace Define the namespace containing your Web Dynpro application. The semantic behind this namespace depends on the used Web Dynpro flavor, i.e., Java or ABAP. Using a Web Dynpro ABAP application, the namespace is the development class of the Web Dynpro application.

How to Create Web Dynpro-Based iViews

WEB DYNPRO

Using a Web Dynpro Java application, the namespace is the name of the used development component or the name of the Eclipse project defining the Web Dynpro Java application. If you are working locally without JDI/DTR, define the Eclipse project defining your Web Dynpro Java application. Make sure that both a development component name and the Eclipse project name contain the vendor name. Possible values could be sap.com/tc~wd~tools (for a development component) or local/MyTestProject for an Eclipse project. The specified namespace is the same name as displayed in the SAP J2EE engine console using the LIST_APP command or as used in the Web Dynpro application URL. c. Application Name The application name is the name of the Web Dynpro application, for example MyTestApplication. d. Application Parameters If your Web Dynpro application has startup parameters, you can define specific values for this iView. Imagine you have two parameters: parameter1 and parameter2. You could define the following application parameter string: parameter1=value1&parameter2=value2.

How to Create Web Dynpro-Based iViews

WEB DYNPRO

6. After defining the Web Dynpro-specific parameters, you can define the standard iView parameters with the iView Wizard. If you use the standard Web Dynpro iView template, your Web Dynpro iView has automatic resizing. If you want to define a fixed height or a full-screen iView, you must to adjust this parameter. You can now use your Web Dynpro iView in the same way as any other iView, i.e., you can add the iView to pages, worksets, or roles.

Define Role-Based iViews


Because a Web Dynpro iView is a standard iView, you can proceed as with any other iView to create role-based Web Dynpro iViews. Using the delta-link mechanism, it is possible to configure a Web Dynpro iView (i.e. one or more of the iView parameters) specific for a certain page, workset, or role. Since the set of parameters that defines the used configuration is application-specific, the Web Dynpro iView Wizard offers the possibility of defining any set of these parameters using the Application Parameters iView parameter, as described above.

Example: How to Define Role-Based Pattern Applications


In the SAP NetWeaver 04 version of the pattern engine, the configuration is defined by one parameterthe configurationId. By calling the pattern engine (which, from a technical point of view, is more or less a standard, but very advanced, Web Dynpro application) with different values of this configurationId parameter, the pattern engine executes the different scenarios. Therefore, you have to define the needed configuration ID using the Application Parameter iView parameter. As this is a standard iView parameter, it could be customized using the deltalink-mechanism. In this way, it is no problem to define role-based pattern applications.

Enable Single Sign-On (SSO) for a Web Dynpro iView


One important and very useful feature of the SAP Enterprise Portal 6.0 is the ability to start every iView with Single Sign-On (SSO). With this, the user does not have to log in to each iView, only in the very beginning for the EP itself. As for any other iView, you can enable SSO for a Web Dynpro-based iView using two different mechanisms: ticket authentication or user mapping.

How to Create Web Dynpro-Based iViews

10

WEB DYNPRO

Using Ticket Authentication to Enable SSO


To switch to ticket authentication, you must maintain the definition of the system running the Web Dynpro application. You have to define the logon method and the user mapping type, as shown below.

Besides this you have to make sure of the following:


The ticket provided by the portal system is accepted by the system running the Web Dynpro application. Both the portal system and the Web Dynpro system define the same set of users. This could be achieved by using the same user store for both systems or by creating the users by hand in both systems.

Using User Mapping to Enable SSO


To switch to user mapping, you must maintain the definition of the system running the Web Dynpro application. You must define the logon method and the user mapping type, as shown below.

How to Create Web Dynpro-Based iViews

11

WEB DYNPRO

The portal user must log in (on the system running the Web Dynpro application) during the start of the iView. To prevent this, the user can define this logon data using the User Mapping section of the personalization dialog.

An administrator can further define this user mapping for a whole user group or for specific roles. As user mapping does not need as much configuration effort as the ticket authentication, this is very useful for test environments. For production scenarios, you should normally use the ticket authentication.

How to Create Web Dynpro-Based iViews

12

You might also like