cancel
Showing results for 
Search instead for 
Did you mean: 

webdynpro&uwl

Former Member
0 Kudos

When I click a workitem in uwl ,I want to launch webdynpro java application. I have known how to configure to make uwl launch a webdynpro java applicaiton , but I don't know how to get workitem id in webdynpro java program.So,I can't to render item data in webdynpro . Could anyone share your some codes for me?

Thank you very much!

Accepted Solutions (1)

Accepted Solutions (1)

ankur_garg5
Active Contributor
0 Kudos

Hi Shi,

1)If you are on NW04 (and NWDS 2.x.x)

Try this line of code:

String workItemID = WDWebContextAdapter.getWebContextAdapter().getRequestParameter("wi_id");

The corresponding import required is:

import com.sap.tc.webdynpro.services.sal.adapter.api.WDWebContextAdapter;

2)If you are on NW04s (and NWDS 7.x.x)

Try this line of code:

String workItemID = (String)WDProtocolAdapter.getProtocolAdapter().getRequestObject().getParameter("wi_id");

The corresponding import required is:

import com.sap.tc.webdynpro.services.sal.adapter.api.WDProtocolAdapter;

Bye

Ankur

Do reward points if it helps or solves your problem!!

Former Member
0 Kudos

Hi Ankur,

Thank you for your response so quickly,I will give you reward.

Does the parameter "wi_id" is set in that xml file through which I register my task?

[code]

Final XML file will look as

<?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.TS91000129.UWL" connector="WebFlowConnector"

defaultView="Test" executionMode="default" defaultAction="launchWebdynpro">

<ItemTypeCriteria systemId="UWL" externalType="TS91000129" connector="WebFlowConnector"/>

<Actions>

<Action name="launchWebDynPro" handler="SAPWebDynproLauncher"

returnToDetailViewAllowed="yes" launchInNewWindow="yes" launchNewWindowFeatures="width=800,height=600,resizable=yes,scrollbars=yes,status=yes,toolbar=no,menubar=no,location=no,directories=no">

<Properties>

<Property name="WebDynproApplication" value="TEST"/>

<Property name="WebDynproDeployableObject" value="local/TEST1"/>

<Property name="isnewwindow" value="1"/>

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

<Property name="System" value="LocalSystem"/>

</Properties>

</Action>

</Actions>

</ItemType>

</ItemTypes>

[/code]

Is it right?

tks,

ankur_garg5
Active Contributor
0 Kudos

Hi shi,

I will let you know in about an hour. An ABAP person did this configuration in the project where we had this requirement. I was handling the Web Dynpro part. Once that guy comes to office, I will let you know.

Bye

Ankur

Former Member
0 Kudos

You are so kind, Thany you very much!

ankur_garg5
Active Contributor
0 Kudos

Hi shi,

I talked to the ABAP person.

He said in our project we did not need to set this parameter anywhere. It is already done by SAP. SAP just asks to use the code (which I gave you) to access Web Dynpro application from UWL.

So for you, I would say what you are doing is correct. Also the XML code which you have pasted, I see "wi_id" mentioned in the following line of code:

[code]<Property name="DynamicParameter" value="wi_id=${item.externalType}"/>[/code]

So i guess its already set. If not, then I think you will need to do some playing. I think you would be able to make it work.

Bye

Ankur

Former Member
0 Kudos

Thanks, I will try it and come back as soon as possible.

Former Member
0 Kudos

Hi Ankur,

Thank you, I have get the item id and gave you reward point.

Answers (0)