on ‎2013 Aug 16 2:56 PM
Hi, in ECC6.0 I have an application parameter, received via the URL, which I am receiving into my window context via the handledefault method.
I would like this value though to be input into the the component context so that I can reuse it for many other views.
I have read the latest WDA book by James Wood & Shaun Parvaze but I can't see any easy way to do this.
I'm sure there must be an easy way to load the component context with values passed as application parameters during init.
Please advise.
Thanks,
Kevin
Request clarification before answering.
Hi Kevin,
Create a context node with appropriate attributes in your component controller then map the node to your window's context.
In the window's HANDLEDEFAULT method, you can fetch the URL parameters into a table then save the parameter values to the context node attributes.
wdevent->get_data(
exporting
name = if_wd_application=>all_url_parameters
importing
value = lt_parameters ).
read table lt_parameters assigning <parameter>
with key name = url_parameter_name.
if sy-subrc is initial.
lo_nd_node = wd_context->get_child_node( name = wd_this->wdctx_node ).
lo_el_node = lo_nd_node->get_element( ).
lo_el_node->set_attribute(
name = `ATTRIBUTE`
value = url_parameter_value ).
endif.
Cheers,
Amy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 13 | |
| 8 | |
| 7 | |
| 5 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.