You are on page 1of 18

Consuming Portal Services in Abstract Portal Component 7.0

Applies to:

Consuming Portal Services in Abstract Portal Component 7.0 Applies to: SAP NetWeaver 7.0 Abstract Portal ComponePortal and Collaboration homepage . Summary This article explains step by step procedure of cons uming standard portal services in Abstract Portal component and also Describes key components of t he User Management Engine (UME) and use the UME API to work with user. Author: Sunaina Reddy T Company: Yash Technologies Pvt Ltd Created on: 1 September 2009 Author Bio Sunaina Reddy is Consultant for Yash Technologies Pvt.Ltd based in India. He has more than 3 years of IT experience. He has good knowledge in Java, Webdynpro Java, EP and Mobile Infrastructure 7.0. SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 1 " id="pdf-obj-0-9" src="pdf-obj-0-9.jpg">

SAP NetWeaver 7.0 Abstract Portal Component. For more information, visit the Portal and Collaboration homepage.

Summary

This article explains step by step procedure of consuming standard portal services in Abstract Portal component and also Describes key components of the User Management Engine (UME) and use the UME

API to work with user.

Author:

Sunaina Reddy T

Company:

Yash Technologies Pvt Ltd

Created on: 1 September 2009

Author Bio

Sunaina Reddy is Consultant for Yash Technologies Pvt.Ltd based in India. He has more than 3 years of IT experience. He has good knowledge in Java, Webdynpro Java, EP and Mobile Infrastructure 7.0.

SAP COMMUNITY NETWORK

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

Consuming Portal Services in Abstract Portal Component 7.0

Table of Contents

1) Creating Portal Application:-

 

3

2) Creating the Portal Object (Abstract Portal Component)

4

3)

Code

8

4) Exporting the PAR file

 

9

5) Deploying the PAR file in the Portal

10

6) Testing the application

 

11

 

12

8) Creating the Iview

 

13

9)

Creating

the

page

15

10) Running the Iview

16

Related Content

17

 

18

SAP COMMUNITY NETWORK

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

Consuming Portal Services in Abstract Portal Component 7.0

Developing Portal Component Using Standard Portal Service (UME)

1) Creating Portal Application:- Open NWDS Go to EP perspective File new Project Portal Application Create a Portal Application

Consuming Portal Services in Abstract Portal Component 7.0 Developing Portal Component Using Standard Portal Service

Click Next -> Enter Project name -> Click Finish.

SAP COMMUNITY NETWORK

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

Consuming Portal Services in Abstract Portal Component 7.0

2) Creating the Portal Object (Abstract Portal Component) Right click on the created project New Others Portal Applications Create new portal application object

Consuming Portal Services in Abstract Portal Component 7.0 2) Creating the Portal Object (Abstract Portal

Click next -> Select the Project

SAP COMMUNITY NETWORK

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

Consuming Portal Services in Abstract Portal Component 7.0

Consuming Portal Services in Abstract Portal Component 7.0 Click next -> Select Abstract Portal Component

Click next -> Select Abstract Portal Component

SAP COMMUNITY NETWORK

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

Consuming Portal Services in Abstract Portal Component 7.0

Consuming Portal Services in Abstract Portal Component 7.0 Click next -> Give name and package

Click next -> Give name and package name

SAP COMMUNITY NETWORK

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

Consuming Portal Services in Abstract Portal Component 7.0

Consuming Portal Services in Abstract Portal Component 7.0 Click finish. SAP COMMUNITY NETWORK SDN -

Click finish.

SAP COMMUNITY NETWORK

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

Consuming Portal Services in Abstract Portal Component 7.0

3) Code

Open Userinfocomponent.java file and write this code in doContent() method.

Consuming Portal Services in Abstract Portal Component 7.0 3) Code Open Userinfocomponent.java file and write

package com.sap.training.portal;

import com.sap.security.api.IUser; import com.sapportals.portal.prt.component.AbstractPortalComponent; import com.sapportals.portal.prt.component.IPortalComponentRequest; import com.sapportals.portal.prt.component.IPortalComponentResponse; public class Userinforcomponent extends AbstractPortalComponent {

public void doContent(IPortalComponentRequest request, IPortalComponentResponse response) {

IUser user = request.getUser(); String firstName = user.getFirstName(); String lastName = user.getLastName(); String displayname = user.getDisplayName();

response.write("<B>Your details:</B><BR>"); response.write("FirstName: "+ firstName +"<BR>"); response.write("LastName: "+ lastName+ "<BR>"); response.write("displayName: "+displayname+"<BR>");

}

}

Save the file

SAP COMMUNITY NETWORK

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

Consuming Portal Services in Abstract Portal Component 7.0

4) Exporting the PAR file

Right click on the project and click Export

Consuming Portal Services in Abstract Portal Component 7.0 4) Exporting the PAR file Right click

Click next -> select your project name -> click next -> click finish

SAP COMMUNITY NETWORK

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

Consuming Portal Services in Abstract Portal Component 7.0

5) Deploying the PAR file in the Portal Log in to Portal Go to Java developer Portal Archive Deployer and Remover browse Select the appropriate par file from the workspace and click Finish.

Consuming Portal Services in Abstract Portal Component 7.0 5) Deploying the PAR file in the

SAP COMMUNITY NETWORK

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

Consuming Portal Services in Abstract Portal Component 7.0

6) Testing the application Go to Java developer pdkcomponent Starter and viewer -->Select your component

Consuming Portal Services in Abstract Portal Component 7.0 6) Testing the application Go to Java

Click on details

SAP COMMUNITY NETWORK

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

Consuming Portal Services in Abstract Portal Component 7.0

Consuming Portal Services in Abstract Portal Component 7.0 Click on start 7) Output of the

Click on start

7) Output of the application

Consuming Portal Services in Abstract Portal Component 7.0 Click on start 7) Output of the

SAP COMMUNITY NETWORK

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

Consuming Portal Services in Abstract Portal Component 7.0

8) Creating the Iview

Now the PAR file is deployed in the Portal Create iviews and embed this iview in a page .

Logon to portal content administration portal content right click New iview

Consuming Portal Services in Abstract Portal Component 7.0 8) Creating the Iview Now the PAR

Select Portal component radio button and click next

SAP COMMUNITY NETWORK

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

Consuming Portal Services in Abstract Portal Component 7.0

Consuming Portal Services in Abstract Portal Component 7.0 Select the proper Portal archive next give

Select the proper Portal archive next give iview details and click finish.

Consuming Portal Services in Abstract Portal Component 7.0 Select the proper Portal archive next give

SAP COMMUNITY NETWORK

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

Consuming Portal Services in Abstract Portal Component 7.0

9) Creating the page Logon to portal content administration portal content right click New page And give the page details

Consuming Portal Services in Abstract Portal Component 7.0 9) Creating the page Logon to portal

Select Default page Template Select one column equal width layout and click finish. Adding the iview to the Page Right click on the iview Add iview to page.

SAP COMMUNITY NETWORK

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

Consuming Portal Services in Abstract Portal Component 7.0

10) Running the Iview

Consuming Portal Services in Abstract Portal Component 7.0 10) Running the Iview SAP COMMUNITY NETWORK

SAP COMMUNITY NETWORK

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

Consuming Portal Services in Abstract Portal Component 7.0

Related Content

For more information, visit the Portal and Collaboration homepage

SAP COMMUNITY NETWORK

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

Consuming Portal Services in Abstract Portal Component 7.0

Disclaimer and Liability Notice

This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade.

SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document, and anyone using these methods does so at his/her own risk.

SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample, including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this document.

SAP COMMUNITY NETWORK

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com