sap enterprise portal 6.0 – - i-barile.it unit of portal content ... sap enterprise portal uses...

83
– SAP Enterprise Portal 6.0 – Developing Portal Content Carsten Bönnen Product Management – Portal Techology SAP AG SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 2 Learning Objectives As a result of this workshop, you will be able to: Explain what Roles, Worksets, Pages and iViews are Create iViews and assign them to roles Create R/3 iViews by means of the GUI Machine Create iViews by means of the SAP Enterprise Portal Development Kit

Upload: trinhliem

Post on 21-Mar-2018

243 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 1

– SAP Enterprise Portal 6.0 –Developing Portal Content

Carsten BönnenProduct Management – Portal TechologySAP AG

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 2

Learning Objectives

As a result of this workshop, you will be able to:

Explain what Roles, Worksets, Pages and iViews areCreate iViews and assign them to rolesCreate R/3 iViews by means of the GUI MachineCreate iViews by means of the SAP Enterprise Portal Development Kit

Page 2: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 2

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 3

Overview

Content Complexity

Required Skills

Portal Content Studio*

Enduser

Enduser tools*

GUI Machine

SAP NetWeaver Developer Studio(incl. Portal Development Kit)

(*) in SAP Enterprise Portal 6.0

Developer

Display iViews

Interactive iViews

Business Transactions

Advanced Bus.Transactions/

Scenarios

ProfessionalContentExpert

InformationExpert

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 4

Agenda

Portal Content – Basic ElementsiViewsPagesWorksetRoles

Creating iViewsUsing the iViewEditorUsing the GUI Machine

Developing iViewsThe Portal Development KitDeveloping Java iViews

Page 3: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 3

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 5

Overview

Content Complexity

Required Skills

Portal Content Studio*

Enduser

Enduser tools*

GUI Machine

SAP NetWeaver Developer Studio(incl. Portal Development Kit)

(*) in SAP Enterprise Portal 6.0

Developer

Display iViews

Interactive iViews

Business Transactions

Advanced Bus.Transactions/

Scenarios

ProfessionalContentExpert

InformationExpert

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 6

Agenda

Portal Content – Basic ElementsiViewsPagesWorksetRoles

Creating iViewsUsing the iViewEditorUsing the GUI Machine

Developing iViewsThe Portal Development KitDeveloping Java iViews

Page 4: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 4

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 7

What is an iView?

iViews can integrate any kind of applicationERP applications like CRM, PLM, HR, FI, legacy systems, etc.Business applications like document management systems, office applications, collaboration tools, etc.Internet content, news providers, etc.

iView TechnologyBasic unit of portal content – a small application that displays information

iView information can be in any format (texts, figures, graphs, reports, tables, charts etc.)iViews can be interactive, allowing you to perform business functions

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 8

iView Types

iViewsIsolated iViews (iFrame Rendering)

iViews are fetched by an IFRAME in a single request or all isolated iViews in the page are fetched in a single request by the Page Builder (recommended)The Page Builder creates an <IFRAME SRC= “iView URL”> statement for each iView

Embedded iViews (Table Rendering)The Page Builder fetches the content of the iView and place it on the page in a <TABLE> structure.All of the iViews in the page are fetched in a single request by the Page BuilderiViews are fetched asynchronously in multiple threads

In EP5.0, iFrame rendering was used for IE support and table rendering for Netscape 4.7 support

In EP6.0, each content administrator can define the rendering mode!

Page 5: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 5

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 9

Agenda

Portal Content – Basic ElementsiViewsPagesWorksetRoles

Creating iViewsUsing the iViewEditorUsing the GUI Machine

Developing iViewsThe Portal Development KitDeveloping Java iViews

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 10

What is a Page?

Pages are containers for iViewsother Pages

Page LayoutA page layout is the visual structuring of a page.iViews are placed in containers which determine the structuring of a page.

Page 6: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 6

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 11

Agenda

Portal Content – Basic ElementsiViewsPagesWorksetRoles

Creating iViewsUsing the iViewEditorUsing the GUI Machine

Developing iViewsThe Portal Development KitDeveloping Java iViews

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 12

What are Worksets?

A workset is a specific collection of applications and information that belong together from a semantic point of view because they are part of the same activity area (e.g. controlling or budgeting) of a user.Whereas roles are based on global company structures, a workset is based on the user-specific tasks or activities (for example “My Budget” or “My Staff” are worksets in the role “Manager”).Worksets are building blocks for roles: One workset can be used within several roles, and one role can consist of severalworksets. Technically, a workset is a hierarchy of folders that contains pages and iViews.Worksets cannot be assigned to users (only roles can be assigned to users).

Workset A

Role 1 Role 2

Workset Assignment

Page 7: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 7

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 13

Agenda

Portal Content – Basic ElementsiViewsPagesWorksetRoles

Creating iViewsUsing the iViewEditorUsing the GUI Machine

Developing iViewsThe Portal Development KitDeveloping Java iViews

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 14

Agenda

RolesOverviewDelta LinksMaintaining RolesRoles and Navigation

Page 8: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 8

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 15

What are Roles?

A role is a container for a collection of applications and information that can be assigned to a particular group of users.Roles are based on company structures and the information needs of the portal users in a company.A role’s content enables users to perform the tasks that are part of their respective job description.A role is usually built of one or more worksetsthat provide the first level of bundling applications and information.The portal’s navigation structure is determined by the aggregation of all roles that are assigned to the user.Technically, a role is a hierarchy of folders, that contains pages and iViews.Roles can be assigned to users or groups of users, i.e. the portal role connects users (or user groups) to the portal content.

Role A

User Group 1 User Group 2

Role Assignment

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 16

Role Concept: Why Create Roles?

Role 2Role 1

User 1Group 1 Group 2

Content 1 Content 5Content 3Content 2 Content 4

Only by creating roles are you able to assign different pieces of content to different groups of users.

Page 9: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 9

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 17

Role Management: Benefits

SAP Enterprise Portal uses roles to generate a role-based user interface, simplifying application and information access.

Companies define roles according to users’ responsibilities and fields of interest.

Roles are created by a role administratorUsers can be assigned to more than one role

Benefits:Content is tailored based on community-specific roles,with no superfluous informationRoles can be easily defined and edited to meet company-specific and community-specific needsSAP provides business packages to accelerate the implementation of roles and portal contentRedesigned business processes are easier to implement

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 18

Roles in the Portal Environment: Overview

ROLES

User Management(Corporate LDAP)

Portal Content(Portal Content

Directory)

ROLES

Navigation Structure

Users

User Groups

Roles

Pages

iViews

Backend Systems

Top-Level Navigation

Assignment Assignment

Migration

Detailed Navigation

Definition

Worksets

R/3 Roles

PersonalizationUser

User User

User

Distribution

Page 10: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 10

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 19

Agenda

RolesOverviewDelta LinksMaintaining RolesRoles and Navigation

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 20

What are Delta Links?

All content objects can be related to each other using delta links. A delta link is a relationship between two objects (source and target object) of the Portal Content Directory. The source object is the object that passes its property values to a target object that is derived from the source object (=principle of inheritance of properties). Delta links allow changes to the target objects, that means additions, deletions and changes to property values and structure hierarchies. Thus delta links are valid for structural hierarchies (for example in roles and worksets) and properties values (for example in iViews and pages)Changes made to the source object are copied to the target object and are visible there. Changes made to the target object have no effect on the source object.

iView 1 iView 2

Property 1

Property 2

Property 1

Property 2

Delta link

Source object Target object

Page 11: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 11

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 21

Business Advantages of Delta Links

Fast creation of new objects on the basis of other objects.Easy change mechanism for objects: only the source object is changed and all dependent objects will be changed automatically.Possibility to reuse or change objects without affecting the original or source object. This means that source objects are protected against modifications.SAP objects and objects from other vendors can be used and changed without making any modifications.

SAP Role Customer Role

Delta link

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 22

Creation of Delta Links Using Templates

You can create objects based on a template. In this case, every newly created object has a delta link relationship to its source object. The newly created object inherits all the properties from the template or source object on which it is based (principle of inheritance of properties).

Templates are available for the following objects: iViews, pages and layouts.

iView Template X

iViewTemplate 1

iViewTemplate 2

iView Template 3

iViewTemplate 1.1

iView 1.1.A iView 2.A iView 3.B

......

........... .........

This graphic showsan object chain of iViews. Every red arrow represents adelta link relation-ship

Page 12: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 12

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 23

Creation of Delta Links by Adding Objects to Other Objects

You add objects to other objects to create your workset or role structure.When you add an object to another object, you create a delta link relationship. The following scenarios are possible:1. Add iViews, pages, worksets and roles to roles2. Add iViews, pages and worksets to worksets3. Add iViews and pages to pages

Workset A Role B

Delta link...

Sourceobject

Targetobject

This graphic showsworkset A, which is added as a delta linkto role B. The linkedobject has a delta linkrelationship to its sourceobject. The linked objectinherits all the propertiesand structural informationof the source object.

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 24

Agenda

RolesOverviewDelta LinksMaintaining RolesRoles and Navigation

Page 13: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 13

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 25

Portal Catalog and Portal Content Studio

All content objects (like roles, worksets, iViews, and pages) are available in the Portal Catalog and are maintained in the Portal Content Studio:

The Portal Content Studio provides a central environment for developing and managing portal content,

including iViews, pages, layouts, worksets, roles andtransport packages.

The Portal Catalogprovides a centralaccess point to thecontent stored in the Portal ContentDirectory (PCD). It permits you to store, manage and organize content in a structured hierarchy.

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 26

Creating Roles (1)

In the content administration role, choose Content Administration -> Portal Content.

You create roles by clickingthe right mouse button. The

wizard for creatingnew roles is started.

Page 14: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 14

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 27

Creating Roles (2): Role Wizard

Enter general properties for the new role.

Enter the folder for thenew role.

Check all properties. Thenew role is created and visible

in the Role Editor.

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 28

Creating Roles (3): Role Editor

Create the role hierarchy and add content objects to the role with a delta

link

Change the properties inthe Property Editor

(optional)You create worksets in the same way as roles. For worksets, use the Workset Editor.

Page 15: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 15

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 29

Roles and Worksets as Containers of Other Objects

Roles and worksets are created by: Building structural hierarchies Adding content objects to these hierarchies

Objects that can be added to a role: roles, worksets, iViews, pages, templates for iViews and pagesObjects that can be added to a workset: worksets, iViews, pages, templates for iViews and pages

Page 1

Workset 1

Role 1

Role A

Delta link

Delta link

Delta link

iView 1 Delta link

Role 1

Workset 1

Page 1

iView 1

add as

add as

add as

add as

Objects are added toroles and worksets asdelta links.

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 30

Delta Links in Roles and Worksets

The object in the structural hierarchy of a role or workset (target object) is linked with the source object by a delta link. This means that both objects (the source and the target objects in the role) depend on one another. The dependency is always in the direction source object -> target object. See also Content Objects and Delta Links. The linked objects in the structural hierarchy of a role or workset (target objects) can be changed within the role/workset. The following changes are possible:

For iViews or iView templates: Change or overwrite propertiesFor pages or page templates: Remove iView from or add iView to page; Change or overwrite propertiesFor worksets: Change hierarchy (add or delete entries); Change propertiesFor roles: Change hierarchy (add or delete entries); Change properties

If the source object to which the target object links is changed, these changes are copied by the target object. For example, if you change the structure of a workset, the changed structure is transferred to all worksetsthat were derived from this source workset (principle of inheritance).

Page 16: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 16

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 31

Role Assignment to Users/User Groups

In the user administration role, choose User Administration -> Role Assignment.

1. Select the users and groups to which you want to assign a role. Search for the rolesand add them to the selected user or group:

2. Select the roles to which you want to assign a user or group. Search for the users and groups and add them to the selected roles:

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 32

Agenda

RolesOverviewDelta LinksMaintaining RolesRoles and Navigation

Page 17: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 17

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 33

Top-LevelNavigation

Top-Level Navigation and Detailed Navigation

The user navigates on entries in the header area (top-level navigation) and the Navigation Panel (detailed navigation) of a portal page.

The entries used for navigation come from the roles assigned to the user. Entries in a role appear on the portal page:

In the two-level navigation bar in the header area and In an iView for detailed navigation in the Navigation Panel

Navigation Panel withDetailed

Navigation

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 34

Preconfigured Portal Layout

All these are Navigation iViews that can be customized by the administrator using the corresponding iView Editor

Masthead AreaTools AreaTop-Level Navigation Navigation Panel with Detailed Navigation

Page 18: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 18

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 35

Top-Level Navigation

Content is organized hierarchically in roles: the first two levels in the roles are represented in the top-level navigation; subsequent levels are displayed in the detailed navigation iView.

Top-level navigation is an iViewwhich can be customized in theiView Editor in the PortalContent Studio.

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 36

Detailed Navigation

Navigation Panelcontains the detailed navigation iView. In this iView, the hierarchical structure of the navigation levels of a role are displayed.(everything below the second level of a role).

Page 19: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 19

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 37

What are Entry Points?

Entry points are the nodes in a role or workset hierarchy that are defined as tabs (=entry points) for top-level navigation.

Entry points appear in the first level of the top-level navigation bar.

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 38

Defining Entry Points: User View

TLN = Top-Level NavigationDN = Detailed Navigation

F11

F113 iView1 P13

F11115 iView15P15

First Level ofTLN and

Entry Points

Second Levelof TLN

Third Level:appears in DN

Fourth Level:appears in DN

Fifth Level:appears in DN

F = FolderP = Page

...

...

F1114

1. F11 is definedas an entry point inthe role hierarchy (see next slide )

2. After clicking on F11 the user sees all entries under F11 on the second level oftop-level navigation(F113, iView1, P13)

3. Entry F1114 and all entries below appear in the detailed navigation

F12 F13

Page 20: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 20

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 39

Defining Entry Points: Administrator View

You can define your entry points at every level within the role hierarchy. Every folder within the role hierarchy and every role and workset node can be defined as an entry point. iViews and pages cannot be defined asentry points.

RoleXY

F1 F2

F11 F12 F13

F113 iView1 P13

F1114....

F11115 iView15P15

Possible EntryPoints

If you define entry points at different levels of a role (F11and F113 and F1114 etc.), only the entry point at the highest level is relevant for top-level navigation in the user view.

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 40

Merging Navigation Nodes in a Role or Workset

A node at a given level of a role (or workset) can be merged with one or more nodes of another role (or workset).If nodes are merged, they appear as one entry in the top-level navigation or detailed navigation. Their subnodes appear in a given order under the new merged node.It is only possible to merge entries or nodes of a role or workset hierarchy with another role or workset if the entries appear on the same hierarchy level.

All nodes to be merged must have identical

merge ID values.

All nodes to be merged must have the value

“yes” for the property “Can be merged”.

Page 21: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 21

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 41

Agenda

Portal Content – Basic ElementsiViewsPagesWorksetRoles

Creating iViewsUsing the iViewEditorUsing the GUI Machine

Developing iViewsThe Portal Development KitDeveloping Java iViews

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 42

Agenda

Using the iViewEditorCreating a URL iViewCreating a R/3 iViewAssigning content to a role

Page 22: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 22

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 43

Creating an URL iView

1. Right click

2. Choose iView

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 44

Creating an URL iView

Page 23: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 23

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 45

Creating an URL iView

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 46

Creating an URL iView

Page 24: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 24

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 47

Creating an URL iView

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 48

Creating an URL iView

Page 25: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 25

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 49

Agenda

Using the iViewEditorCreating a URL iViewCreating a R/3 iViewAssigning content to a role

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 50

Creating a SAP Transaction iView

1. Right click

2. Choose iView

Page 26: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 26

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 51

Creating a SAP Transaction iView

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 52

Creating a SAP Transaction iView

Page 27: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 27

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 53

Creating a SAP Transaction iView

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 54

Creating a SAP Transaction iView

Page 28: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 28

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 55

Creating a SAP Transaction iView

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 56

Creating a SAP Transaction iView

Page 29: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 29

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 57

Agenda

Using the iViewEditorCreating a URL iViewCreating a R/3 iViewAssigning content to a role

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 58

Assigning Content to a Role

1. Right click

2. Choose Page

Page 30: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 30

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 59

Assigning Content to a Role

Choose portalpagetemplate

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 60

Assigning Content to a Role

Page 31: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 31

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 61

Assigning Content to a Role

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 62

Assigning Content to a Role

1. Right click

2. Choose Delta Link

Page 32: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 32

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 63

Assigning Content to a Role

1. Right click

2. Choose Workset

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 64

Assigning Content to a Role

Page 33: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 33

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 65

Assigning Content to a Role

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 66

Assigning Content to a Role

Page 34: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 34

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 67

Assigning Content to a Role

1. Right click

2. Choose Delta Link

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 68

Assigning Content to a Role

1. Right click

2. Choose Role

Page 35: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 35

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 69

Assigning Content to a Role

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 70

Assigning Content to a Role

Page 36: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 36

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 71

Assigning Content to a Role

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 72

Assigning Content to a Role

1. Right click

2. Choose Delta Link

Page 37: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 37

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 73

Assigning Content to a Role

12

3

4

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 74

Assigning Content to a Role

4

5 2

3

1

Page 38: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 38

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 75

Agenda

Portal Content – Basic ElementsiViewsPagesWorksetRoles

Creating iViewsUsing the iViewEditorUsing the GUI Machine

Developing iViewsThe Portal Development KitDeveloping Java iViews

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 76

Overview

Content Complexity

Required Skills

Portal Content Studio*

Enduser

Enduser tools*

GUI Machine

SAP NetWeaver Developer Studio(incl. Portal Development Kit)

(*) in SAP Enterprise Portal 6.0

Developer

Display iViews

Interactive iViews

Business Transactions

Advanced Bus.Transactions/

Scenarios

ProfessionalContentExpert

InformationExpert

Page 39: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 39

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 77

Agenda

Using the GUI MachineOverviewCreating a simple iViewCreating an advanced iView

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 78

GUI Machine: Introduction

What is GUI MachineGUI Machine is a visual tool that enables sophisticated content development for the SAP Enterprise Portal merely by dragging anddropping appropriate objects and establishing relationships between them.GUI Machine is completely Web based.GUI Machine is a modeling tool and platform independent. Currently the GUI Machine produces HTMLB iViews, but could also support other technologies in the future (e.g. Web Dynpro, .Net).

Page 40: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 40

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 79

Gui Machine: Goals and Motivation

The purpose of GUI Machine is to provide a visual tool that enable customers quick and easy content development thereby

Minimize the time and effort to create contentLead to quicker go live decisionReduce Total Cost of Ownership (TCO)Increase ROI

What does GUIMachine provide:Make the process of creating iViews over SAP R/3 simple and wizard driven to eliminate the need of writing Java/ASP codeFlexibility to process data received from RFC’s and BAPI’s, eliminate the need of writing ABAP code, by providing operation like sorting, arranging out in ascending or descending order or put filters onfield.

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 80

Agenda

Using the GUI MachineOverviewCreating a simple iViewCreating an advanced iView

Page 41: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 41

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 81

Creating an iView – Workflow

Create a Model

Create a Package (Module)

Create Page

Create iView

Connect to backend system

Get Information Objects from the Backend System

Design the Logic for the iView (Design Time)

Check model for errors

Deploy the package to the portal.

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 82

Creating a simple iView

Open IE6 browser

http://<machinename>.<domain>:<port>/gmserver/

Click on Create a New Model Link

OR

Click on Create icon

Screen 1

Page 42: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 42

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 83

Creating a simple iView

Assign a project name

Select: Create a blank model

Click Ok to Launch Workspace (Screen2)

Screen 2

Screen 1

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 84

Creating a simple iViewScreen 1:

Select Design Logic Elements.

Drag the “Module” cube from the “Logic Elements” (rightmost toolbar) to the project area or double click on .

Give it a unique name with no spaces, for example (“M1package”).

Double-click the newly created package.

Screen 2

In the Design Logic Palette.

Drag the “page” cube from the “Logic Elements ” (rightmost toolbar) to the project area or double click on .

Give it a unique name with no spaces, for example (“M1page”).

Double-click the newly created page.Screen 2

Screen 1

Page 43: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 43

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 85

Creating a simple iView

Screen 1:

Create “M1iView” box by dragging the iView icon form the Element Logic Toolbar

Give it a unique name with no spaces, for example (“M1iView”).

Double-click the newly created iView

Screen 1

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 86

Creating a simple iView

The Add Data Sources Palette is used for adding RFCs/BAPIs:

From within an iView object, in the application toolbar , click on Data Sources iconInput a portal URL along with the port numberConnect to the Portal by clicking on login button and providing a user name and passwordA list of available system will be displayed, select a relevant systemSelect the the mode of search which is by name, function group or BOR (Business Object Repository).

Page 44: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 44

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 87

Creating a simple iView

If Search Function Module s names is selected:

In the Name Field input a search string (wild card supported) for the RFC to be searched (BAPI*Bank*)

Click Search

A list of all RFC matching the search string will be displayed

Double click or drag BAPI_BANK_GETLIST to the project area.

The metadata from the BAPI will be imported from SAP to the GUIMachine

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 88

Creating a simple iView

Test Function Module

Screen 1Select the function module by clicking on it on the storyboardRight click on the Function Module ElementClcik on test Function

Screen 2Input parameters for the Function Module will be displayedAssign the input parametersClick on Click on execute

Screen 2

Screen 1

Page 45: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 45

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 89

Creating a simple iViewScreen 1

Click on Input object in BAPI_BANK_GETLIST and drag the mouse drop in the project area.

Select Add Input Form

A input form based on the the Input parameter for the BAPI/RFC will be created.

Screen 2Again Click on Input object of BAPI_BANK_GETLIST and drag the mouse and drop it on the project area.

Select Start Point

Assign values BANK_CTRY = USMAX_ROWS = 20

The above value act as default values for the iView

Screen 2

Screen 1

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 90

Creating a simple iView

Click on the Bank list element of the Function Module and drag out.

Various output option will be displayed. Select the grid output. This will display the list of Bank as a Grid

Click on the new Grid Object

Select the fields to be displayed in the iView

Page 46: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 46

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 91

Creating a simple iView

Click on Layout tab is for arranging the layout of the iView:The layout tab is used for

Rearranging the size of list, form, gird and the size of the iView containerRearrange the position of the forms, grids and lists within the iView

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 92

Creating a simple iView

Click on Compile Code.

Select option : Check Model For Errors

Click Run the system gives a message “Model is valid”

Now Select the last option : Deploy and run in Browser

Click on Run

Page 47: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 47

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 93

Creating a simple iViewAfter compiling the iView is displayed

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 94

Agenda

Using the GUI MachineOverviewCreating a simple iViewCreating an advanced iView

Page 48: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 48

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 95

Creating an advanced iView

If Search Function Module s names is selected:

In the Name Field input a search string (wild card supported) for the RFC to be searched (BAPI*SalesOrder*)

Click Search

A list of all RFC matching the search string will be displayedDouble click or drag BAPI_SALESORDER_GETLIST and BAPI_SALESORDER_GETSATUS to the project area.The metadata from the two BAPIs will be imported from SAP to the GUIMachine

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 96

Creating an advanced iView

Test Function Module

Screen 1Select the function module by clicking on it on the storyboardRight click on the Function Module ElementClick on Test Function

Screen 2Input parameters for the Function Module will be displayedAssign the input parametersClick on execute

Screen 2

Screen 1

Page 49: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 49

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 97

Creating an advanced iView

Click on Input object in BAPI_SALESORDER_GETLIST and drag the mouse drop in the project area.

Select Add Input Form

A input form based on the the Input parameter for the BAPI/RFC will be created.

Again Click on Input object of BAPI_SALESORDER_GETLIST and drag the mouse and drop it on the project area.

Select Start Point

Assign values Customernumber = 0000001000SalesOrganization = 1000

The above vale act as default values for the iView

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 98

Creating an advanced iView

Click on Design Logic Palette

Select operators sort and distinct and drag them to the project area

Click on Salesorder object and unselect the fields that are not to be displayed in the iView by unselecting them (by removing the check marks)

Click on Salesorder object and drag to connect it to the Distinct operator

Click on the Distinct figure and select the field or fields on which the output needs to be Distinct. In this case select SD_DOC (Sales order Number)

Connect the output of the Distinct operator to the Input of Sort Operator

Page 50: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 50

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 99

Creating an advanced iView

Click on the Sort figure and select the field or fields on which the output needs to be Sorted. In this case select DOC_DATE (Document Date).

Click on the output of the Sort operator and drag the mouse over and release

Various output option will be displayed. Select the grid output. This will display the list of Sales Order as a Grid

Select the fields that need to be displayed in the iView.

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 100

Creating an advanced iView

Connect the output of the Grid to the Input of the BAPI_SALESORDER_GETSTSTUS.

Map the out of the grid to input of the BAPI_SALESORDER_GETSTSTUS. (SALESDOCUMENT = SD_DOC)

Page 51: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 51

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 101

Creating an advanced iViewClick on StatusInfo object and unselect the fields should not be displayed in the iView by unselecting them (by removing the check marks)

Click on Design Logic Palette

Select sort operator and drag it to the project area

Click on StatusInfo object and drag to connect it to the Sort operator

Click on the sort figure and select the field or fields on which the output needs to be sorted. In this case select Material

Click on the output of the Sort operator and drag the mouse over and release

Various output option will be displayed. Select the grid output. This will display the list of Status as a list

Select the fields that are to be displayed in the iView

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 102

Creating an advanced iView

Click on Layout tab is for arranging the layout of the iView:The layout tab is used for

Rearranging the size of list, form, gird and the size of the iView containerRearrange the position of the forms, grids and lists within the iView

Page 52: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 52

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 103

Creating an advanced iView

Click on Customize Layout icon for the Layout Editor:The layout editor has two components

Container: For design of the container of iViewControls: For the fields and elements to displayed in the iView

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 104

Creating an advanced iView

Click on Container for the iView patterns and designs of the iView like grid, forms, lists and iView container : (Screen 1 )

The Container has three components for iView container.

Size: For size of the container of iView which determines if the iView is wide, narrow etc in terms of Portal. To select the size, click on appropriate icon.Skin: To select the portal design for the iView. To select the design click on the appropriate skinTitle of the iView. Select on Hide Titlebar to hide the Title of the iView

The Container provides styles for the forms , lists and grids. (Screen 2)

Screen 1

Screen 2

Page 53: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 53

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 105

Creating an advanced iView

Click on Controls for the grid, forms, lists fields and elements

The Controls lets the user:

Select filed that would be displayedAssign Labels to fields. Add virtual fields to the output.Add UI controls like Button, links to the iView

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 106

Creating an advanced iViewCompile the codeAfter compiling the iView is displayed

Page 54: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 54

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 107

Agenda

Portal Content – Basic ElementsiViewsPagesWorksetRoles

Creating iViewsUsing the iViewEditorUsing the GUI Machine

Developing iViewsThe Portal Development KitDeveloping Java iViews

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 108

Overview

Content Complexity

Required Skills

Portal Content Studio*

Enduser

Enduser tools*

GUI Machine

SAP NetWeaver Developer Studio(incl. Portal Development Kit)

(*) in SAP Enterprise Portal 6.0

Developer

Display iViews

Interactive iViews

Business Transactions

Advanced Bus.Transactions/

Scenarios

ProfessionalContentExpert

InformationExpert

Page 55: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 55

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 109

Agenda

The Portal Development Kit (PDK)OverviewInstalling the PDK

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 110

PDK for SAP Enterprise Portal 6.0 – What’s In It?

PDK for Java

PDK for Java

PDK for .NET

PDK for .NET

PDK for Websphere

PDK for Websphere

PDK for SAP Enterprise Portal 6.0PDK for SAP Enterprise Portal 6.0

Development inJava on

SAP J2EE Engine

Development inJava on

SAP J2EE Engine

Development inJava for

IBM WebSphere

Development inJava for

IBM WebSphere

Development forMicrosoft .NET

Framework

Development forMicrosoft .NET

Framework

Page 56: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 56

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 111

PDK for Java – General Architecture

A typical SAP EP6 Development environment consists of following components:

Portal Development Kit for EP 6.0 (PDK 6.0)PDK 6.0 is a Business Package, which is deployed into an SAP EP6 portalThe PDK simplifies the Portal development, delivers documentation, java docs and example code. Can be downloaded from iviewstudio.comPDK provides Plug-Ins, which simplify standard programming issues, like Par-File and WebService creation as well as Connector Framework support

Eclipse WorkbenchIDE to develop Java Applications

Enterprise Portal InstallationThe new developed PAR files need to be deployed into the portal in order to run, test and debug it.

PDK for Java

PDK for Java

PDK for Java allows easy development of Java iViews!PDK for Java allows easy

development of Java iViews!

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 112

PDK for WebSphere

Enable IBM WebSphere developers toIntegrate WebSphere applications into the Enterprise Portal

Access WebSphere components / services via Web ServicesBuild iViews within their preferred IDE

Full support and wizards for EclipseUse services of EP 6.0 such as

User Management (users, groups, roles)Frontend Eventing (EPCF) (planned)Portal Stylesheets (planned)

Start from a set of well documented samples

PDK for WebSphere isBased on a set of documented EP 6.0 APIs

Content (running on the WebSphere Java server) is displayed through SAP EP 6.0 (running on SAP J2EE engine)*.

PDK for WebSphere allows to easily integrate WebSphere applications into the

Enterprise Portal!

PDK for WebSphere allows to easily integrate WebSphere applications into the

Enterprise Portal!

PDK for Websphere

PDK for Websphere

* Developed iViews will run on EP 6.0 only!

Page 57: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 57

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 113

PDK for .NET

Enable .NET developers toIntegrate applications that use the .NET framework easily into the Enterprise PortalBuild iViews within their preferred IDE

Support of Visual Studio .NETUse the .NET frameworkUse services of SAP EP 6.0

-> Planned for 2004

PDK for .NET allows easy development of .NET iViewsPDK for .NET allows easy

development of .NET iViews

PDK for .NET

PDK for .NET

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 114

Installing the Portal Development Kit

Page 58: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 58

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 115

Installing the Portal Development Kit

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 116

Installing the Portal Development Kit

Page 59: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 59

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 117

Installing the Portal Development Kit

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 118

Installing the Portal Development Kit

Page 60: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 60

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 119

Installing the Portal Development Kit

3) Pick Directory

1) Click Link

2) Save to Disk

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 120

Installing the Portal Development Kit

Page 61: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 61

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 121

Double Click on zip File

Installing the Portal Development Kit

Click Extract

Click ExtractClick

Extract

This is the file to Import

Make sure you extract to the correct directory provided by the speaker.

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 122

Installing the Portal Development Kit

1

2

3

Page 62: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 62

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 123

Installing the Portal Development Kit

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 124

Installing the Portal Development Kit

Page 63: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 63

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 125

Installing the Portal Development Kit

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 126

Installing the Portal Development Kit

4

5 2

3

1

Page 64: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 64

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 127

Installing the Portal Development Kit

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 128

Agenda

Portal Content – Basic ElementsiViewsPagesWorksetRoles

Creating iViewsUsing the iViewEditorUsing the GUI Machine

Developing iViewsThe Portal Development KitDeveloping Java iViews

Page 65: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 65

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 129

Developing a Java iView using Web Services

A Web Service is a platform-independent, standardized interface for accessing various functionalities over the network.

The core component of a Web Service is its WSDL (Web Services Description Language) file.

The WSDL file contains the specification of a service which mainly consists of:

Definition of the available methods (plus its parameters and return values). Language-independent definition of all occuring object types.

The SAP Portal Plugins for Eclipse can generate Java source code directly from a WSDL file.

The generated code consists of all objects specified in the WSDL file and the portal service to access the defined methods.

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 130

Prerequisites

We will use the Web Service provided by Google to query their database.

In order to use it, you are required to register for free* at Google API site.** Google will send you a license key which you will need later.

We will use the SAP Portal Plugins as well as the Eclipse IDE which are preinstalled.

Access to an installed EP6 is also required!!!

* restricted to 1000 search requests per day**provided by speaker

Page 66: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 66

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 131

Creating a Portal Service from a WSDL file (1)

Create a new portal project named WebServiceTutorial.( File New Project Portal Application

Create a Portal Application Project)

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 132

Creating a Portal Service from a WSDL file (2a)

2. Create a new portal application object. ( File New Other Portal Application

Create a new Portal Application Object)

Select the previously generated project as the destination project:

Page 67: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 67

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 133

Creating a Portal Service from a WSDL file (2b)

Select "Portal Service from WSDL file - Client side":

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 134

Creating a Portal Service from a WSDL file (2c)

In the following field enter the location of the Google WSDL file:

Page 68: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 68

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 135

Creating a Portal Service from a WSDL file (2d)

The WSDL file from Google specifies three methods.

Select which methods the generated portal service will include:

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 136

Creating a Portal Service from a WSDL file (2e)

Finally you have to specify a name and an alias for the new portal service. Enter one and press "Finish".

Note: The alias must be unique across all installed portal services!!!

Page 69: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 69

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 137

Creating a DynPage which uses the Portal Service (1)

1. Create a new Portal Component.

( File New Other Portal Application Create a new Portal Application Object)

Now you have to select your destination project again, which should be the one you created for the portal service.In the next dialog select "Portal Component":

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 138

Creating a DynPage which uses the Portal Service (2)

2. In the following dialog window fill in the fields as shown below, then press "Finish".

Page 70: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 70

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 139

Creating a DynPage which uses the Portal Service (3a)

3. Since the DynPage will use the HTMLB portal service as its GUI-Toolkit, you have to add the HTMLB libraries to your project:

Right-click on the projects name in the Package Explorer View and select "Properties" from the content menu. In the Properties Dialog select the node "Java Build Path" and switch to the "Libraries" tab. Click on "Add External Jars...". Now locate the HTMLBs libraries folder (Provided by speaker). Select htmlb.jar and com.sap.portal.htmlbbridge.jar and close the Properties Dialog.

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 140

Creating a DynPage which uses the Portal Service (3b)

Page 71: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 71

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 141

Creating a DynPage which uses the Portal Service (4a)

4. Now copy the content of the ready made MyGooglePage.java into the one you just created (see appendix).

Once you deployed your portal application (explained later), theDynPage will look like this:

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 142

Creating a DynPage which uses the Portal Service (4a)

4. Now copy the content of the ready made MyGooglePage.java into the one you just created (see appendix).

Once you deployed your portal application (explained later), theDynPage will look like this:

Page 72: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 72

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 143

Modifying the portalapp.xml descriptor (1)

1. Since the example uses HTMLB for presentation and event handling, you have to add a reference to the HTMLB service:

Open the file "portalapp.xml" and modify the line

<property name="SharingReference" value="com.sap.portal.runtime.application.soap">

into the following:

<property name="SharingReference" value="com.sap.portal.runtime.application.soap,htmlb">

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 144

Modifying the portalapp.xml descriptor (2)

2. In order to be able to start the example directly (without building an iView around it), you have to explicitly set a Security Zone for the DynPage:

You can achieve this by adding the following line:

<property name="SecurityZone" value="com.sap.portal.pdk/low_safety"/>

directly under this line:

<property name="ClassName" value="com.tutorial.wsdl2service.MyGooglePage"/>

Page 73: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 73

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 145

Deploying the Portal Application (1)

1. Ensure that the correct portal locations and the users name is specified in the preferences page of the SAP Portal Plugins. You will find this options inside Eclipse in the menu "Window/Preferences" under the node "SAP Portal PluginSettings".

2. Ensure that the portal is up and running

3. In the main menu select "File/Export". Select the node "PAR file" and click "Next":

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 146

Deploying the Portal Application (2)

4. Select the project "WebServiceTutorial"

5. In the settings page be sure to check the "Deploy ..." checkbox and to enter your password for the portal. Finally click on "Finish" and your portal application will be deployed.

Page 74: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 74

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 147

Deploying the Portal Application (3)

6. If everything went successfull, you can start your component with the Component Inspector or by directly launching the following URL: http://localhost:8100/irj/servlet/prt/portal/prtroot/WebServiceTutorial.MyGooglePage

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 148

Summary

As a result of this workshop, you are now able to:

Explain what Roles, Worksets, Pages and iViews areCreate iViews and assign them to rolesCreate R/3 iViews by means of the GUI MachineCreate iViews by means of the SAP Enterprise Portal Development Kit

Page 75: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 75

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 149

Further Information

Public Web:www.sap.com enterpriseportalsSAP Customer Services Network: www.sap.com/services/

Related Workshops/Lectures at SAP TechEd 2003Implementation of SAP Business Packages in SAP Enterprise Portal 6.0, 10-02-2003/2:00 PM, H1, Hands-On

Consulting ContactRoy Wood, VP SAP Consulting

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 150

Q&A

Questions?

Page 76: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 76

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 151

Please complete your session evaluation anddrop it in the box on your way out.

Feedback

Thank You !

The SAP TechEd ’03 Basel Team

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 152

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®, NT®, EXCEL®, Word®, PowerPoint® and SQL Server® 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®, Informix and Informix® Dynamic ServerTM are trademarks of IBM Corporation in USA 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®, the Citrix logo, ICA®, Program Neighborhood®, MetaFrame®, WinFrame®, VideoFrame®, MultiWin® and other Citrix product names referenced herein are trademarks of Citrix Systems, Inc.

HTML, DHTML, XML, XHTML 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.

MarketSet and Enterprise Buyer are jointly owned trademarks of SAP AG and Commerce One.

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.

Copyright 2003 SAP AG. All Rights Reserved

Page 77: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 77

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 153

Exercise – iViewEditor – Creating iViews

Create an URL iViewCreate a R/3 iViewAssign the created content to a roleAssign the role to a user

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 154

Exercise – GUI Machine – Installing Prerequisites

Install Microsoft XML 4.0Install Adobe SVG Viewer 3.0

Page 78: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 78

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 155

Exercise – GUI Machine – Creating a simple iView

ABC Inc has implemented EP. The Sales Operations department handles customer calls relating to the Sales Orders that are under process .The Sales Operations Manager has submitted a request to create an

iView, wherein the user can perform following:When the customer call, the ability to search the status of the order number.The order status iView needs to display following information

Sales Order NumberItem NumberMaterialDelivery quantityNet Value of each ItemDelivery Status of the item

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 156

Exercise – GUI Machine – Creating an adv. iView

ABC Inc have implemented EP 5.0 The HR manager has submitted a request to create a iView which displays the following result:

Ability to search the a Employee based on Employee’s Last NameDisplay the output as a grid with following fields:

Personal NumberEmployee nameJob TitleOrganizationRoom Number of the EmployeeThis output needs to be sorted by the Room Number

The HR Manager then wants to select one of the Employee and display following details about the employee as a form.

Personal NumberNameGenderBirthday DetailsMarital StatusMarriage Date

Page 79: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 79

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 157

Exercise – PDK – Developing a Java iView

Develop a Java iView according to slidesUse the Source code on the following slides

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 158

package com.tutorial.wsdl2service;

import com.sapportals.htmlb.*;import com.sapportals.htmlb.Form;import com.sapportals.htmlb.TextView;import com.sapportals.htmlb.enum.TextViewDesign;import com.sapportals.htmlb.event.Event;import com.sapportals.htmlb.page.DynPage;import com.sapportals.htmlb.page.PageException;import com.sapportals.portal.htmlb.page.PageProcessorComponent;import com.sapportals.portal.prt.component.*;import com.sapportals.portal.prt.runtime.PortalRuntime;

public class MyGooglePage extends PageProcessorComponent{

MyGooglePage.java

Page 80: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 80

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 159

public DynPage getPage() {return new GoogleDynPage();

}

public void init(IPortalComponentInitContext arg0) {}

public class GoogleDynPage extends DynPage {private String searchTerm = "";private ResultElement[] searchResults;private GridLayout grid;

public void doInitialization() throws PageException {System.out.println("doInitialization");

}

public void doProcessAfterInput() throwsPageException {

System.out.println("doProcessAfterInput");}

MyGooglePage.java

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 160

public void doProcessBeforeOutput() throws PageException {System.out.println("doProcessBeforeOutput");Form myForm = this.getForm();TextView myText = new TextView(); // set the

TextViewmyText.setText("Search for: ");myText.setDesign(TextViewDesign.LABEL);

InputField input = new InputField("SearchInput");

input.setValue(searchTerm);

Button searchButton = new Button("SearchButton");

searchButton.setText("Search");searchButton.setOnClick("searchButtonClicked");

grid = new GridLayout();grid.setCellPadding(5);Group searchGroup = new Group();

MyGooglePage.java

Page 81: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 81

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 161

searchGroup.addComponent(myText);searchGroup.addComponent(input);searchGroup.addComponent(searchButton);grid.addComponent(1, 1, searchGroup);//for testing purposes//grid.setDebugMode(true);

insertSearchResults();

Group group = new Group();group.setTitle("A DynPage using a portal service

created from Googles WSDL");group.addComponent(grid);

myForm.addComponent(group);}

private void insertSearchResults() {if (searchResults == null ||

searchResults.length == 0)return;

MyGooglePage.java

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 162

for (int i = 0; i < searchResults.length; i++) {ResultElement result = searchResults[i];

TextView linkView = new TextView("link_" + i);

linkView.setEncode(false);linkView.setText("<a href=\"" +

result.getURL() + "\">" + result.getTitle() + "</a>");

grid.addColSpanComponent(4 + (3 * i) + 0, 1, linkView, 3);

TextView snippetView = new TextView("snippet_" + i);snippetView.setEncode(false);snippetView.setText(result.getSnippet());grid.addColSpanComponent(4 + (3 * i) + 1, 1,

snippetView, 3);

MyGooglePage.java

Page 82: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 82

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 163

TextView summaryView = newTextView("summary_" + i);

summaryView.setEncode(false);summaryView.setText("<font size=-1

color=\"gray\">Description:</font>" + result.getSummary());

grid.addColSpanComponent(4 + (3 * i) + 2, 1, summaryView, 3);

}}

public void onSearchButtonClicked(Event e) {InputField input = (InputField)

this.getComponentByName("SearchInput");searchTerm = input.getValue().toString();System.out.println("search term: " +

searchTerm);IMyGoogleService googleService =

(IMyGoogleService) PortalRuntime.getRuntimeResources().getService("Alias");

MyGooglePage.java

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 164

GoogleSearchResult result = googleService.doGoogleSearch("XXX_mygooglekey", searchTerm, 0, 10, false, "", false, "", "", "");

ResultElement[] results = result.getResultElements();

searchResults = results;for (int i = 0; i < results.length; i++) {

System.out.println((i + 1) + ": " + results[i].getSummary());

}}

}}

MyGooglePage.java

Page 83: SAP Enterprise Portal 6.0 – - i-barile.it unit of portal content ... SAP Enterprise Portal uses roles to generate a role-based user ... Roles in the Portal Environment: Overview

SAP TechEd ‘03 Basel

© 2003 SAP AG PRTL257, Carsten Bönnen 83

SAP AG 2003, TechED_Basel / PRTL 257, Carsten Bönnen / 165

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®, NT®, EXCEL®, Word®, PowerPoint® and SQL Server® 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®, Informix and Informix® Dynamic ServerTM are trademarks of IBM Corporation in USA 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®, the Citrix logo, ICA®, Program Neighborhood®, MetaFrame®, WinFrame®, VideoFrame®, MultiWin® and other Citrix product names referenced herein are trademarks of Citrix Systems, Inc.

HTML, DHTML, XML, XHTML 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.

MarketSet and Enterprise Buyer are jointly owned trademarks of SAP AG and Commerce One.

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.

Copyright 2003 SAP AG. All Rights Reserved