on 07-28-2016 1:26 PM
Hi,
I have two input fields on my view layout(screen).
example field1,field2.
field1 contains list of values(f4) like A and B.
if I select 'A' in field1.. then in field2 .. automatically 1,
2
3 values should come
if I select 'B' in field1.. then in field2 .. automatically 4,
5
6 values should come.
I have created 'onselect' action for field1.so when i select value A or B..This method is triggered.but how to bind the list of values into field2,when i select 'A' or 'B' field1.
Hi Kiran,
You could just bind a different Context Node for field2. Then, on action handler 'onSelect' for field1, filter or delete the unwanted values and re-bind the internal table for the Node of field.
Regards,
Felipe
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kiran,
You bind the value property of the field to a Context Node and the internal table to that Context Node.
Let's suppose you have Node1 for field1 and Node2 for field2.
DATA lt_field1 TYPE wd_this->ELEMENTS_Node1.
DATA lt_field2 TYPE wd_this->ELEMENTS_Node2.
DATA lo_nd_field1 TYPE REF TO if_wd_context_node.
DATA lo_nd_field2 TYPE REF TO if_wd_context_node.
* navigate from context to nodes
lo_nd_field1 = WD_CONTEXT->get_child_node( name = wd_this->WDCTX_Node1 ).
lo_nd_field2 = WD_CONTEXT->get_child_node( name = wd_this->WDCTX_Node2 ).
** handle field1 and field2 filter logic for internal tables lt_field1 and lt_field2
* bind contents to field2
lo_nd_field2->bind_table( new_items = lt_field2 ).
Regards,
Felipe
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
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.