on 11-15-2006 3:39 PM
Hello all,
how can I read a URL parameter from the HTTP request starting with an underscore '_' in Web Dynpro for ABAP, e.g. '_sapwiid'?
I have the problem that business workflow generates a URL to start my Web Dynpro application, and the BW framework concatenates its workitem ID as a parameter named '_sapwiid' into the URL. I don't have any influence on this name.
In <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/2f/e7574174c58547e10000000a1550b0/frameset.htm">SAP help to Web Dynpro ABAP</a> it is outlined how to get a URL parameter with a more common name.
But it is not possible to define an importing parameter '_SAPWIID' in the handler method of the default inbound plug of the components window. It is an invalid name because it starts with an underscore. Consequently I can't define a parameter with this name in the WD application.
In BSP I would solve this problem by calling a method of the global object REQUEST (class CL_HTTP_ENTITY):
call method request->get_header_fields(... )
But in Web Dynpro I don't have a reference to this class.
Does anyone know how to solve this problem?
Kind regards
Michael
Hi Michael,
from the importing parameter WDEVENT of the startup plug event handler you can access all application relevant URL parameters (SP9 is prerequisit):
data: l_url_parameters type tihttpnvp.
wdevent->get_data(
exporting
name = if_wd_application=>all_url_parameters
importing
value = l_url_parameters ).
Best Regards, Ariane.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ariane and Alexander,
reading all the URL parameters was something I am searching for a long time without success, so I keep your code in mind!
Unfortunately my project has only SP8, and no chance to get on SP9 or SP10 in the next months.
The solution outlined in the blog could help indeed, but they are using the UWL. Unfortunately my project doesn't have the Enterprise Portal, so we don't have the UWL. We have recommended to implement the EP, but I don't know if we win.
In the meantime I found SAP note 978926 that describes it is possible to define prefixes like '~' for the WD application parameters. Aiga Uhrig assured to me it works with '_' too, but only in SP10
Many thanks for your help up to now.
Best regards
Michael
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Michael,
the solution provided in the blog should work without uwl, too.
As outlined in the blog you create your visualization task and provide the parameter e.g. "DYNPARAM" -> "WI_ID=${item.externalId}.
In the WebDynpro App you define a parameter WI_ID in the inbound plug of the window. I think that way the parameter will be transfered to your webdynpro application.
Regards,
Alex
Hello Ariane and Alexander,
I found a solution using BSP as a wrapper that reads the http-parameter with
request->if_http_entity~get_header_fields().
From the result I read the parameter
'~querystring'
It contains the parameter as substring
'_sap_wiid%3d<value of the wiid>%26'
I retrieve the parameter by some string operations. Then I construct a URL to call the WebDynpro and concatenate the parameter as
'&wiid='<value of the wiid>
into the URL (without the queer character '_'!). By
navigation->goto_page( <URL> )
the WD application starts, and the parameter WIID is passed properly.
Instead of the WD application of course I must start the BSP, so it no elegant solution at all, but it works.
Thank you all for your help
Kind regards
Michael
Hi Regina,
you are right. If we had a portal I wouldn't implement this solution, but utilize the Universal Worklist.
I have tried Arianes Solution on an SP10 system, it works fine - so 10pt
There is another solution described in note 978926 by Aigo Uhrig. He states since SP10 such a parameter can be read by "extended parameter passing" in the WD application, though the parameter starting with '_' still can't be declared as a parameter in the default plug of the window. Do you know how this works, I can't find it anywhere in the WD application?
Best regards
Michael
Hi Michael,
have you had a look at <a href="/people/ginger.gatling/blog/2005/12/14/create-new-uis-for-existing-workflow-tasks-with-abap-web-dynpro-and-universal-worklist weblog</a>?
The workitem id is passed via a special URL parameter defined in the workflow task.
Regards,
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.