cancel
Showing results for 
Search instead for 
Did you mean: 

Link Parameter

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

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?

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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...

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Where is your coding to process the inbound parameter? URL parameters will only be available upon startup. Generally you would read them in some initialization of the window perhaps and then store them into the component controller context for later use by any of the views.

Former Member
0 Kudos

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.