cancel
Showing results for 
Search instead for 
Did you mean: 

how to pass parameter to webdynpro iview

junwu
Active Contributor
0 Kudos

Hi Gurus,

I have a webdynpro iview which is created from webdynpro java application. This iview will be called when the work item in UWL is clicked and the work item id will be passed as a parameter. the problem is i can't get this id in my webdynpro although it is presented in URL.

https://<server>/<pcd>?wi_id=000000035071

I use following code

IWDWebContextAdapter contextAdapter=WDWebContextAdapter.getWebContextAdapter();

IWDMessageManager msgr=wdComponentAPI.getMessageManager();

msgr.reportSuccess("logsys "+contextAdapter.getRequestParameter("logsys"));

msgr.reportSuccess("wi_id "+ contextAdapter.getRequestParameter("wi_id"));

if i just call the application not the iview, that code works.

is there any special setting in iview? any clue is appreciated.

Best regards,

John

Accepted Solutions (1)

Accepted Solutions (1)

junwu
Active Contributor
0 Kudos

hi all,

is this not possible in netweaver2004?

Best regards,

John

Former Member
0 Kudos

hey john

try using few uwl api's whish can do it..

http://help.sap.com/javadocs/NW04S/current/uw/overview-summary.html

--

hari

junwu
Active Contributor
0 Kudos

Hi hari,

api may be not the right one.

I have configured the uwl, and the work item id is already appended in the url. but my code can read that. it seems these parameters are ignored.

Thanks anyway:)

John

Former Member
0 Kudos

Hi John,

Try this, works for me:

WDProtocolAdapter.getProtocolAdapter().getRequestObject().getParameter("wi_id");

Regards,

Leo

junwu
Active Contributor
0 Kudos

Hi Leo,

your code is applicable for NW04S.

thanks anyway.

John

Former Member
0 Kudos

Ah, i see you're right only 2004s.

Are you sure that the parameter is passed correctly from the UWL?

Do you have something like below in your Universal Worklist Configuration Content XML:

<Actions>

<Action name="launchIView" groupAction="no" handler="IViewLauncher" returnToDetailViewAllowed="yes" launchInNewWindow="no">

<Properties>

<Property name="iview" value="<PCDLOCATION>"/>

<Property name="DynamicParameter" value="wi_id=${item.externalId}"/>

<Property name="openInNewWindow" value="no"/>

<Property name="appContext" value="${context.appContext}"/>

</Properties>

<Descriptions default="launchIView"/>

</Action>

</Actions>

Regards,

Leo

junwu
Active Contributor
0 Kudos

Hi Leo&#65292;

UWL configuration is done correctly,

and I can see the work item id is append at the end of url as query parameter.

So Leo, you have the same scenario as me?

You just configure the work item launched by iview and then you create your iview, in the webdynpro application you use the code provided in last post, the id can be successfully captured&#65311;

Is there any special setting?

I try to use webdynpro launcher. the customer system throws a exception :

Error Detail: Wed Jan 16 12:37:36 CET 2008 Connector with id WebDynproLauncher is not registered with UWL .

Best regards

John

Former Member
0 Kudos

Hi John,

Very strange. Yes, i have the same scenario. We use the IViewLauncher handler and created a Web Dynpro iview with the iview wizard. I just checked the properties on this iview and don't see any special setting which we might have changed.

By the way on our previous system which was 2004 it also worked, after upgrading i only changed the java code to retrieve the parameter, because the previous method was deprecated.

Leo

Former Member
0 Kudos

Hi John,

Check this link and try with WDWebContextAdapter instead of WDProtocolAdapter.

http://help.sap.com/saphelp_nw2004s/helpdata/en/44/be65751c743959e10000000a1553f6/content.htm

Using DynamicParameter in the URL is the key.

For ex: the url will be

http://portal/<pcdloc>?DynamicParameter=testname=john

and inside the webdynpro app, you'll read the parameter "testname".

Try and Let me know if that helps.

Rajit

Edited by: Rajit Srinivas on Jan 16, 2008 1:49 PM

junwu
Active Contributor
0 Kudos

Hi Rajit,

thanks first:)

my uwl configuration is

<?xml version="1.0" encoding="utf-8"?>

<!DOCTYPE UWLConfiguration PUBLIC '-//SAP//UWL1.0//EN' 'uwl_configuration.dtd'>

<UWLConfiguration version="1.0">

<ItemTypes>

<ItemType name="uwl.task.webflow.decision.TS99800081.DESCLT410" connector="WebFlowConnector"

defaultView="webflowView" defaultAction="launchIApprove">

<ItemTypeCriteria systemId="DESCLT410" externalType="TS99800081" connector="WebFlowConnector"/>

<Actions>

<Action name="launchIApprove" handler="IViewLauncher" launchInNewWindow="yes">

<Properties>

<Property name="iview" value=

"pcd:portal_content/sap.com/******/***********.ApprovalView"/>

<Property name="iviewDynamicParameter" value="wi_id=${item.externalId}&amp;logsys=${item.systemId}"/>

</Properties>

<Descriptions default="Launch IApprove">

<ShortDescriptions>

<Description Language="en" Description="Launch IApprove"/>

</ShortDescriptions>

</Descriptions>

</Action>

</Actions>

</ItemType>

</ItemTypes>

</UWLConfiguration>

after i upload this file to UWL. I click the work item, the popup window's url is :

https://host/irj/servlet/prt/portal/prtroot/<pcd path>?wi_id%3D000000035077%26logsys%3DDESCLT410&iviewDynamicParameter=wi_id%3D000000035077%26logsys%3DDESCLT410&wi_id=000000035077&destination=DESCLT410&item_id=35518&task=TS99800081&logsys=TS99800081&uname=WUJUNJOH&langu=EN

in the application i still cannot get the id;

Is there anything i did wrongly&#65311;

Best regards,

John

junwu
Active Contributor
0 Kudos

Hi Leo,

my scenario works now.

the difference is:

you use <Property name="DynamicParameter" value="wi_id=${item.externalId}"/>

i am using <Property name="wi_id" value="${item.externalId}"/>

after I change my configuration to your style, it works:)

Thanks for your nice help.

John

Answers (0)