on 06-09-2008 9:52 AM
Hi all,
I am trying to pass a parameter to WebDynpro Application URL, I have added the parameter into Application and into method HANDLEDEFAULT of my Window too; when I test the problem is that if I change view from "First" to "Second" It dumps with following message:
Der Parameter KUNNR enthält einen ungültigen Wert
Maybe I have to do anything else?
Thanks
GN
Into method HANDLEDEFAULT of the windows I use the parameter in following way:
if not kunnr is initial.
wd_this->fire_to_second_link_plg( ).
else.
wd_this->fire_to_first_plg( ).
endif.
in this way I call first or second view according to parameter's value. This part works fine, the dump is when I try to navigate between my views.
May be I miss the part of component controller context...? What I have to do in order to store my parameter there?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Declare the context attribute KUNNR in the component controller. It is just like defining in your view controller. Then in both your views, if you want the parameter, map the component controller's node. You can drag and drop the context node to the view context. Now, in the handle default method, do a set_attribute to the component controllers attribute. You need to map the component controller's node in your window context as well. After doing set_attribute, if you do get_attribute in any of the views, the data will be available.
Regards,
Nithya
Hi,
Once you got the parameters, Immediate update them into the context. In your case Window controller. I hope that Window controller is binded with Component controller. Then the data will pass to the component contoller and can be used where ever you want.
I hope this will solve your problem,
Warm Regards,
Vijay
Hi,
but where I should have to insert your code? Keep in mind that in my first view parameter is valid, in debugging I am able to see it and I can also fill it with a value, the problem is when I (through a button) call the second view. Furthermore I made another test, filling my paramete, I access immediatly the second view skipping the first one, it works fine, if I try to call the first view (through back button) It dumps...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hI,
tHE PARAMETER YOU PASSED IS INVALID
I think this piece of code helps you.
To pass parameter for application URL
DATA: lt_parameters TYPE tihttpnvp,
ls_parameters LIKE LINE OF lt_parameters,
DATA lv_create_ugrp_url LIKE ls_node_url-create_ugrp_url.
CONSTANTS: lc_namespace TYPE string VALUE 'PLMU',
lc_config_id type string value 'sap-wd-configId'. "#EC NOTEXT
lv_applname = 'WDA_UGRP_OIF'.
fill LT_PARAMETERS
ls_parameters-name = 'mode'.
ls_parameters-value = 'I'.
APPEND ls_parameters TO lt_parameters.
*
ls_parameters-name = 'sap-language'.
ls_parameters-value = 'EN'.
APPEND ls_parameters TO lt_parameters.
*
ls_parameters-name = 'CONFIGURATION NAME'
ls_parameters-value = '/PLMU/WDA_UGRP_OIF_CFG'.
APPEND ls_parameters TO lt_parameters.
*
construct the URL for Insert Mode
CALL METHOD cl_wd_utilities=>construct_wd_url
EXPORTING
application_name = lv_applname
namespace = lc_namespace
in_parameters = lt_parameters
IMPORTING
out_absolute_url = lv_create_ugrp_url.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.