on 11-05-2007 3:35 AM
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!
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!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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,
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
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.