on 06-28-2012 7:24 AM
i got value assigned data(initialized) in table of 2nd view wddoinit this is popup view and on lead selection of the values of table the same value should fetch in input field of first view(main),how to get the initialized data into the input field on lead selection
Hello,
The most effective way to handle data in different views is by centralization of the same.
I would suggest this:
1. Create the context nodes in component controller
2. Map them to both the views
Now on lead select,
DATA : lrcl_node TYPE REF TO if_wd_context_node,
ls_table TYPE ig_componentcontroller=>element_table,
lrcl_element TYPE REF TO if_wd_context_element.
* Get the lead selection form the table
lrcl_node = wd_context->get_child_node('TABLE').
lrcl_element = lrcl_node->get_element( ).
lrcl_element->get_static_attributes( IMPORTING static_attributes = ls_table ).
* Set the data back to the context
lrcl_node = wd_context->get_child_node('DATA').
lrcl_node->set_static_attributes(
* index = USE_LEAD_SELECTION
static_attributes = ls_table
).
good luck,
Kiron
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can have the context node in the component controller and bind the table in 2nd view to this node. Then it will be just similar to your current initialization. This will definitely work. The framework will be much simpler this way. Component controller context is designed for this purpose (Centralization of context).
Well If you are particular about using the node in individual views, then you may also do :
Create a global object of type if_wd_view_controller.
And in the 2nd view initialise it. eg : GO_WD_VIEW_CONTROLLER = wd_this->wd_get_api( ).
Then you can use this object in view 1 to access the context node in view 2.
Good luck
Hi,
Here is the logic for closing the pop up window.
DATA: lo_api TYPE REF TO if_wd_view_controller,
lo_window_ctlr TYPE REF TO if_wd_window_controller,
lo_popup TYPE REF TO if_wd_window.
*GET embedding WINDOW
lo_api = wd_this->wd_get_api( ).
lo_window_ctlr = lo_api->get_embedding_window_ctlr( ).
* CLOSE the popup
IF lo_window_ctlr IS BOUND.
lo_popup = lo_window_ctlr->get_window( ).
lo_popup->close( ).
ENDIF.
Regards,
Sankar Gelivi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.