on 09-07-2012 1:22 PM
Hi Gurus,
I am new to web dynpro ABAP, I am trying to pass a data from the text box of one view to the text box of other.
can anyone help me .
Thanks & Regards
Santhosh
Hi Santhosh,
If you define your context nodes in the component controller and map the nodes to each view as needed, any view may access the context nodes. If instead you define a context node directly in a view, then only that view may access the context node.
Cheers,
Amy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Amy & pintu
Thanks for yours reply
I have created a component controller with a NODE -> SAMPLE and an attribute in the node as Query1 and mapped this component controller with the text box present in the 1st view.
Through inbound and outbound plugs , i made a connectivity between two views
In the second view , i mapped the context of the component controller with the context of the second view. And also created a attribute in the second view and through the below method , i assigned the attribute of component controller to the attribute of second view.
method HANDLENXTPAGE .
DATA lo_el_context TYPE REF TO if_wd_context_element.
DATA ls_context TYPE wd_this->Element_context.
DATA lv_query1 TYPE wd_this->Element_context-query1.
* get element via lead selection
lo_el_context = wd_context->get_element( ).
* @TODO handle not set lead selection
IF lo_el_context IS INITIAL.
ENDIF.
* get single attribute
lo_el_context->get_attribute(
EXPORTING
name = `QUERY1`
IMPORTING
value = lv_query1 ).
wd_context->set_attribute( name = 'TEXT' value = lv_query1 ).
endmethod.
But still when i enter a data in the first view at run time and go to the second view, the data is not appearing in the text box of second view.
can you people suggest some thing.
Thanks & Regards
Santhosh
Hi Santhosh,
You can achieve this in different ways, but my approach would be to bind the text boxes of both views to the same context attribute.
Now the text box on VIEW1 and the text box on VIEW2 both are bound to the same data source-- the component controller's NODE.TEXT.
Cheers,
Amy
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
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.