on 05-27-2013 9:55 PM
Hello All,
I need to get the URL parameter values in the view methods . There is enough info on scn to get the URL parameters in the HANDLEDEFAULT of window but how to get that into the view.
I have to obtain the values , create and open a link using the obtained values.
Thanks in advance if someone could help.
Hi Linda,
If you create a context node in your component controller, you can then map the node to the context of both the window and the view. Any attribute values you set in the node from the window's handledefault method will then be available in the context of the view (and the component controller).
Cheers,
Amy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Linda Smith,
U can get the URL parameter in to any global attributes so that u can use them in any of the view.
Declare Varialbe gv_url_parameter in component controller under attributes tab.
gv_url_parameter type String.
* Use this code.
wd_comp_controller->gv_url_parameter =
wdr_task=>client_window->if_wdr_client_info_object~get_parameter
( name = 'XXXXX' ).
where ever u want to use this variable u can call that by using wd_comp_controller->gv_url_parameter.
Thanks & Regards,
vasu Yadav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Smith,
Create an attribute in Component Controller check the public check box(visibility of the attribute) and populate it in handledefault method of the starting window of the application.
WD_COMP_CONTROLLER->attribute = parameter value.
You can access it in any view or window.
Thanks,
Sudheer
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Smith,
For every URL parameter declare attributes in component controller which are similar to url parameter type and read every parameter from the url in WDDOINIT (hooker method) of component controller and assign it to corresponding attribute. For example you can write like below
wd_this->gv_wi_id (variable declared in attributes tab of component controller) =
wdr_task=>client_window->if_wdr_client_info_object~get_parameter( name = 'WI_ID' ).(WI_ID is an url parameter).
You have to call this for other parameters too..... I hope this will help you.
Regards
Venkat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks. That helped.
Now the current problem is i can not open the url string which is bigger than 325 characters. I dont know why, the string variable i am using within the view method is accepting only upto 325 characters .
i am firing the outbound plug of the window from the view to open the link in the same window and it only accepts string.
Any solution for this anyone. ?
Hi Smith,
Go through the below link to read the application parameters from the URL.
http://webdynproabap.wordpress.com/2012/07/10/application_parameter/
Best Regards,
Arun Krishnamoorthy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Smith,
You can create attributes in component controller and pass from window to component controller. From there you can get into all views.
Please check this also.
http://scn.sap.com/thread/143112
http://wiki.sdn.sap.com/wiki/display/WDABAP/How+to+read+URL+parameters+in+Web+Dynpro+for+ABAP
Cheers,
Kris.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.