Thursday, May 19

Portal Eventing and Navigation

SAP Enterprise Portal provides a single point of access to various applications and data present in the enterprise. SAP Web Dynpro Java is the technology which is used to create huge business applications. These applications can be integrated in SAP enterprise portal. How does the integration between Web Dynpro java applications and the sap enterprise portal take place. The answer is iviews. Iviews are programs created in java which are capable of displaying data from variety of resources like sap R/3 transactions, sap web dynpro java, sap web dynpro abap applications, BW reports, web services etc.


Once you have created a web dynpro java application, you can create a web dynpro java iview in portal and provide the name of web dynpro application as reference. You need to make sure that web dynpro java component is available on the web application server from where iview is going to pick up the web dynpro application data and display on the sap netweaver portal. Communication between various views in a web dynpro java application take place using the navigation plugs.

Suppose there are two separate iviews or 2 separate web dynpro java applications each having one view. Now these applications want to communicate or the a portal user wants to display one web dynpro application on the fire of an event from the other application. This can be done by portal eventing. But if there are many communications in case there are many views in a single web dynpro application, portal eventing is not recommended. In such a case, plugs should be fired to navigate from one view to another view. Plugging is feature of web dynpro technology using which navigation between views become easy.

How to raise an event in portal ?
Wdportaleventing.fire(“urn:com.sap.tc.test”, “testWDEvent”, “paramter”);
An event is generally fired in the evnthandellar method of a web dynpro action.
The first parameter in the fire method is namespace, second parameter is the event name and the third parameter is the web dynpro action which is mapped with the portal event.
How to subscribe to a portal event ?
Wdportaleventing.subscribe(“urn:com.sap.tc.webdynpro.test”, “TestWdEvent”, “wdThis.wdgettesteventaction()”);
The above line of code is generally placed in the wdDoinit() method of the web dynpro hook methods.

How to unsubscribe from an event in web dynpro java ?
Wdportaleventing.unsubscribe(“urn:com.sap.tc.webdynpro.test”, “TestWdEvent”, “wdThis.wdgettesteventaction()”);
The above line of code is generally placed in the wdDoExit() method of the web dynpro hook methods.

Navigation
There are 3 types of navigation possible in Enterprise portal.

Absolute
Relative
Object based navigation

If the navigation is performed to a pecific target, it is called absolute navigation.
WdPortalNavigation.NavigateAbsolute().
Following parameters are used for the above method:

Navigation target : This specifies the navigation target URL
Mode: specifies whether the navigation target is displayed in the same browser window of another window. Three options are possible here. Show is place, Show external, Show External Portal
History Mode: Specifies how the navigation is visible in the navigation history in the page title bar
Target Title : sets the title of the history in the navigation history bar
Context URL : specifies the navigation context.

The problem with absolute navigation is that, if the target is moved to a new location, navigation will fail.
For this navigation should be performed to a relative target. This is done using the following line of code.
WdPortalNavigation.NavigateRelative().

3 main parameters are used in this method. BaseURL, LevelsUP and path.
BaseURL : It specifies the starting point of relative navigation.
LevelsUP: Specifies how many levels to up in the navigation hierarchy.
Path : Specifies the path down the navigation hierarchy to go after going up from the number of levels sspecified by the levelsUp Parameter form the baseURL.

Object Base Navigation can be called by using following line of code
wdPortalNavigation.navigatetoObject().

The following parameters are used for this method.
System : specifies the system to which business object is assigned.
BusinessObjType : Specifies a business Object.
Operation : specifies an operation of the business object.
BusinessParameters : additional parameters.

Related Articles :

Portal Look and Feel - Branding the Portal
How to Develop Portal Applications
SAP EP-Developing portal content and assigning permissions
SAP EP-Role maintenance
SAP EP-How to make Enterprise Portal highly available
SAP Material Management Introduction
SAP EP-J2EE architechture
SAP EP - Standard Portal Services

No comments:

Post a Comment

You are welcome to express your views here...