on 04-08-2011 8:47 AM
Hello Experts,
I am a newbie in ABAP Webdynpro. I have 2 views in 2 different windows. I want to pass values calculated from one view to the other view. But i cannot connect the views.
If the views were within the same window, I could connect them using inbound and oubound plugs with parameters. However in this case i am unable to establish the navigation link between these 2 views.
Has anyone of you experts come across such kind of requirement? If so, can you please guide how to connect the 2 views?
Thanks and regards,
Nitish.
Create attributes or nodes on component controller. Nodes and attributes will be 'globally' accessible.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
If you want to pass valse from 1 view to another views in different or same window,
create attribute in component controller for that vales . This component controller is accessible for views .
Regards
Shaira
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi shaira,
You are all correct. I had also this concept in mind.
The problem is that i want to populate the attribute of the component controller from a button click event.
I have only populate a node or attribute of component controller using the supply function. But here, its using an event of UI element.
Can you please indicate me how I can populate the attribute of the component controller apart from using supply function?
Everyone,
I was finally able to connect the 2 views by using the component controller.
I created an attribute on the context of the component controller and read/set of the attribute of component controller on the button click event.
To access the attribute of the component controller, please find below a code snippet which was useful to me:
Data declaration for accessing the component controller
DATA:
lo_component type REF TO if_wd_component,
lo_context type REF TO if_wd_context,
lo_controller type REF TO if_wd_controller,
lo_node type ref to if_wd_context_node,
lo_child type REF TO if_wd_context_node.
DATA lo_el_test_depts TYPE REF TO if_wd_context_element.
get component controller API
lo_component = wd_comp_controller->wd_get_api( ).
lo_controller ?= lo_component.
accessing the context of the component controller
CALL METHOD lo_controller->get_context
RECEIVING
context = lo_context.
lo_context is the required context, from here we can manipulate its components
get to the root node in context of component controller
lo_node = lo_context->root_node.
using lo_node i was able to read and write to the attribute i created in component controller.
Thank you all for your help.
Nitish.
Edited by: Nitu_0105 on Apr 8, 2011 3:29 PM
HI Nitu ,
You can make a attribute in component controller and then store the data into it .
Since component controller is a global controller so any of your view can access this data .
As per your scanrio , store the data from the first view into attribute in component controller
and you can use this attribute value in your second view .
Regards
Kuldeep
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Windows have plugs too. Create plugs in the windows. Use the window controller inside the view to fire the window plug .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.