You are on page 1of 18

Consuming Portal Services in Abstract Portal Component 7.0

Consuming Portal Services in Abstract Portal Component 7.0 Applies to: SAP NetWeaver 7.0 Abstract Portal Compone

Applies to:

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

7) Output of the application

12

8) Creating the Iview

13

9)

Creating

the

page

15

10) Running the Iview

16

Related Content

17

Disclaimer and Liability Notice

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

Project Portal Application Create a Portal Application Click Next -> Enter Project name -> Click Finish.

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

Portal Applications Create new portal application object Click next -> Select the Project SAP COMMUNITY NETWORK

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 SAP

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 name

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 - sdn.sap.com

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.

file and write this code in doContent() method. package com.sap.training.portal; import

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

the PAR file Right click on the project and click Export Click next -> select your

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.

appropriate par file from the workspace and click Finish. SAP COMMUNITY NETWORK SDN - sdn.sap.com |

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

pdkcomponent Starter and viewer -->Select your component Click on details SAP COMMUNITY NETWORK SDN - sdn.sap.com

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 application

Click on start

7) Output of the application

Component 7.0 Click on start 7) Output of the application SAP COMMUNITY NETWORK SDN - sdn.sap.com

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

portal content right click New iview Select Portal component radio button and click next SAP

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 iview

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

archive next give iview details and click finish. SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX

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

right click New page And give the page details Select Default page Template Select one column

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

in Abstract Portal Component 7.0 10) Running the Iview SAP COMMUNITY NETWORK SDN - sdn.sap.com |

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