on 01-05-2009 10:15 AM
Hi,
I am new to WDA.
Are there any tutorials available, which give step-by-step instructions for an application with 2 (or more) windows where based on the data entered on view1 in window1, data is displayed on view2 in window2, so that one can learn how to pass data between views, embedded in different windows.
Thanks,
Mick
Hi Mick,
You can create global variable in component controller or in any custom controller and you can pass data from one view to any other view.
or if you are using any navigation plug just pass the parameters from outbound plug.....
regards
Pranav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your reply.
Is this true if you have views in different windows and want to pass an internal table from view 1 in window1, you pass it to the component controller and then retrieve it in view2 in window 2?
Also can we use outbound and inbound plugs for transffering data from view1 window 1 to view2, window2?
Thanks,
Mick
Hi Mick,
Yes we can pass table but thn you have to create a global table in component you have to fill the values from view1 in that global table and you can retrieve the same......
yes we can pass parameters in plugs....
you can enter parameter in the parameter table on the Outbound Plugs tab.
now you can use fire plug
WD_THIS->FIRE_MY_OUTBOUND_PLG( EDITABLE = u2018Xu2019 ).
here boolean parameter EDITABLE is passed...
regards
Pranav
Hi James,
Please call this method 'get_selected_elements' on the node which contains the table.
You will be able to collect all the selected entries in to an internal table.
This internal table contains metadata of all the rows.
Now Loop on this internal table into an workarea, and call the get attribute method inside the loop using your reference to the if_wd_context_element.
Get all the desired columns in your table and update in another internal table.
At the end of the loop, your second internal table contains all the entries selected by the user on the table.
I hope this is useful for you.
Regards,
Shashikanth. D
Thanks Pranav.
I have pasted the following code in the ONACTIONSALES_DET event.
DATA: wd_node TYPE REF TO if_wd_context_node,
ls_node1 TYPE ig_componentcontroller=>element_salesno,
lt_node1 TYPE ig_componentcontroller=>elements_salesno,
wa_temp TYPE REF TO if_wd_context_element,
lt_temp TYPE wdr_context_element_set.
wd_node = wd_context->get_child_node( name = 'SALESDATA' ).
CALL METHOD wd_node->get_selected_elements
RECEIVING
set = lt_temp.
LOOP AT lt_temp INTO wa_temp.
CALL METHOD wa_temp->get_static_attributes
IMPORTING
static_attributes = ls_node1.
APPEND ls_node1 TO lt_node1.
CLEAR ls_node1.
ENDLOOP.
The problem is:
After selecting rows in the table, in the debug mode ls_node1 does not return any value and therefore there are no values in lt_node1..
Please help.
Thanks,
Mick
Edited by: Mick James on Jan 6, 2009 6:03 PM
Hi Mick,
i have made some changes in the code you have mentioned and it is working fine for me....
DATA lt_NODE1 TYPE wd_this->elements_cn_table.
DATA ls_NODE1 TYPE wd_this->element_cn_table.
DATA: wd_node TYPE REF TO if_wd_context_node,
wa_temp TYPE REF TO if_wd_context_element,
lt_temp TYPE wdr_context_element_set.
wd_node = wd_context->get_child_node( name = 'CN_TABLE' ).
CALL METHOD wd_node->get_selected_elements
RECEIVING
set = lt_temp.
LOOP AT lt_temp INTO wa_temp.
CALL METHOD wa_temp->get_static_attributes
IMPORTING
static_attributes = ls_node1.
APPEND ls_node1 TO lt_node1.
CLEAR ls_node1.
ENDLOOP.
regards
Pranav
Hi James,
One of the preferred ways to do it as follows:
1) create a node in the component controller.
2) Drag and drop the same node in both the views of you WDC.
3) Populate the values in your first view, for that node.
4) These values will be automatically available in the Second node.
5) Read the node in the Second view of your WDC, and use it for your pruposes.
Hope it is helpful.
Good day!
Regards,
Shashikanth. D
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.