Vous êtes sur la page 1sur 10

How to access the context

information in RPM custom


iView using ABAP Web
Dynpro in Multi-Server
Node scenario
Applicable Releases: SAP xRPM 4.0 & SAP RPM 4.5
Version 1.00 December 2010

Introduction
There are some customer requirements to write xRPM custom iView in ABAP Web Dynpro for their
business needs. The customers environment might consist of more than one Java servers as well as
ABAP application servers, in order to support more number of users. So, the SAP RPM application might
be used in a multi-node environment with load-balancing server nodes.
In order to get required xRPM object context information from Java side, we provide Java web service for
object context information requesting. The document containing the guidelines for consuming xRPM Java
web service in ABAP Web Dynpro and how to integrate the custom iView into SAP xRPM standard
solution in SAP Enterprise Portal (EP) is available in the Note 1127239. This document gives you
guideline on how to use RPM Java web service in ABAP Web Dynpro in a multi-node environment.

Prerequisites
You have knowledge of ABAP Web Dynpro.
You understand basics of how web service works.
It would have benefit if you are familiar with SAP system transactions.
You have downloaded and installed SAP NetWeaver Platform. With this platform, you can deploy
Java Web Service into NetWeaver application server and browse the service using web service
navigator. You can develop your ABAP Web Dynpro application using SAP Web Dynpro for
ABAP. All tools for ABAP development are integrated in the ABAP Workbench and are delivered
with the SAP NetWeaver Application Server ABAP (SAP NW AS ABAP). ABAP development
takes place on a central development system.

Restrictions
This document is not for the purpose of teaching how to create Java web service, how to program ABAP
Web Dynpro and how to setup the development environment.

Deploying xRPM4.0/SAP RPM 4.5 Java Web Service in


NetWeaver application server
You can skip this step if Patch 01 of SP18 for xRPM4.0/ Patch 01 of SP11 for SAP RPM4.5
has been deployed already.
To use the provided web service, you need to start SAP software deployment manager, deploy
CPRXRPMUI00_0.sca of the above mentioned patch tracks into application server.
There is a new link provider class ExtendedCacheProviderInfo component in Java stack to
handle Java side web services in a multi-node scenario.
The link provider service retrieves the values for the following parameters that can be used in
the generated Web Dynpro iView in ABAP:

Page | 2

OBJECT_GUID
OBJECT_ID
OBJECT_TYPE
PARENT_GUID
PARENT_ID
PARENT_TYPE
PORTFOLIO_GUID
PORTFOLIO_ID

Writing Custom iView in Web Dynpro for ABAP


In SAP system and go to transaction se80. Create a Web Dynpro project by right click on the package>Create->Web Dynpro->Web Dynpro component.
In the same package, go to context menu. Create an ABAP Web Dynpro application by choosing Create>Web Dynpro->Web Dynpro application.

Example:
Component Name: CONTEXT_TEST
Application Name: context_test_appl
View Name: CONTEXT_TEST_VW
Window Name: CONTEXT_TEST_WD
1. In the tab Inbound Plugs of the window CONTEXT_TEST_WD, add importing parameters such
as shown below, which matches the parameters defined in Java navigation provider class.
o
o
o
o
o
o
o
o

OBJECT_GUID
OBJECT_ID
OBJECT_TYPE
PARENT_GUID
PARENT_ID
PARENT_TYPE
PORTFOLIO_GUID
PORTFOLIO_ID

Page | 3

2. Create Context Node CONTENT and add context attributes OBJECT_GUID, OBJECT_TYPE,
etc in context in window controller, so that values can be read from URL parameters and
assigned to the context attributes.

3. Implement the method HANDLEDEFAULT.

Page | 4

The coding:

method HANDLEDEFAULT .
DATA lr_node TYPE REF TO if_wd_context_node.
DATA ls_content TYPE if_context_test_wd=>element_content.
IF object_guid IS NOT INITIAL.
ls_content-object_guid = object_guid.
ls_content-object_id = object_id.
ls_content-object_type = object_type.
ls_content-parent_guid = parent_guid.
ls_content-parent_id = parent_id.
ls_content-parent_type = parent_type.
ls_content-portfolio_guid = portfolio_guid.
ls_content-portfolio_id = portfolio_id.
ENDIF.

Page | 5

lr_node = wd_context->get_child_node('CONTENT').
CALL METHOD
EXPORTING
value =
name =
CALL METHOD
EXPORTING
value =
name =
CALL METHOD
EXPORTING
value =
name =

lr_node->set_attribute

CALL METHOD
EXPORTING
value =
name =
CALL METHOD
EXPORTING
value =
name =
CALL METHOD
EXPORTING
value =
name =

lr_node->set_attribute

CALL METHOD
EXPORTING
value =
name =
CALL METHOD
EXPORTING
value =
name =

lr_node->set_attribute

object_guid
'OBJECT_GUID'.
lr_node->set_attribute
object_id
'OBJECT_ID'.
lr_node->set_attribute
object_type
'OBJECT_TYPE'.

parent_guid
'PARENT_GUID'.
lr_node->set_attribute
parent_id
'PARENT_ID'.
lr_node->set_attribute
parent_type
'PARENT_TYPE'.

portfolio_guid
'PORTFOLIO_GUID'.
lr_node->set_attribute
portfolio_id
'PORTFOLIO_ID'.

endmethod.
4. In the application, specify the parameters and define default values. The parameter name should
match the parameters defined in Java navigation provider class.

Page | 6

5. The window controller must be defined in the iview as Used Controller.

6. Map the context node of the window controller to the view controller.

Page | 7

7. You can then bind the attributes GUID and OBJECT_TYPE to UI elements or for internal
handling.

Page | 8

Key Points:
1. The parameters such as GUID and OBJECT_TYPE defined as importing parameters in the
event handler of inbound plug in ABAP Web Dynpro should match the names in application
parameters specified in Java Navigation provider class.
2. Method HANDLEDEFAULT in window controller of ABAP Web Dynpro should be
implemented. Missing implementation is one of the reasons that you do not see application
parameters are passed from Java Navigation Provider class to ABAP Web Dynpro
application.

Creating & Placing Custom iView in Portal


Follow the steps for creation of the iView and pages and assigning them to the work-set as mentioned in
section Placing Custom iView on SAP xRPM 4.0 Navigation Panel from the document
How_to_xRPM_custom_iView.pdf attached in the Note 1127239.

IMG Customizing
1. Following are the manual steps to be performed before implementing the note - 1486770:
Go to transaction SE11. Choose option Domain and type the domain name
'/RPM/TD_LINK_PROVIDER'.
Click on Change button.
Go to Value Ranges tab and add following entry:

Page | 9

Fix.Val. | Short Descript.


026

| Extended Cache Provider

Save and Activate Domain. It will activate all the DB tables as well where the domain
is used.

2. In the IMG navigation, for the custom page, the Link Provider Extended Cache Provider has to
be selected.
o

Transaction SPRO

SAP xApp Resource and Portfolio Management (SAP xRPM)

Global Customizing

Process and Service Settings

Define Navigation

Link definition

Save your entries.


As a result, a new link will be shown in the navigation panel of the portal. By clicking on the link, your
custom iView should be rendered in the portal with the correct values.

Page | 10

Vous aimerez peut-être aussi