on 02-11-2009 10:26 AM
Hi Experts,
In the init method : -> I have created a dynamic node "FLIGHTS" and assign the sflight structure to it.
In the DOMODIFY Method 😆 I have created a MAtrix layout, and create a element Drop down by key,
In bind_selected_key FLIGHTS.CARRID.
But it is giving the dump
Fehler im DROPDOWN_BY_KEY "_04" des Views "ZSEARCH.MAIN": Context-Bindung des Properties SELECTED_KEY kann nicht aufgelöst werden: The MAIN.1.FLIGHTS node does not contain any elements
Can you please suggest, how to resolve it.
Best regards.
Rohit
hi,
refer to this example wdr_test_events view dropdownbykey
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rohit,
Use a break point inside WDDOMODIFY to check your code for creation is ALWAYS EXECUTED and NOT only for the firsttime. Secondly why dont you place the WDDOINIT & WDDOMODFY code together either in ONE of them.
Greetings
Prashant
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rohit,
The error you got is due to the attribute is not able in the node flight or might be you wrongly refering the node attribute.
Please go thru the WDA Component - DEMODYNAMIC in ur sap system.
This will give u an idea abt the dynamic node creation.
Regards
Manoj Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
in doint
DATA : lr_root_node type ref to if_wd_context_node_info,
lr_flights_node type REF TO if_wd_context_node_info,
lt_value_set type table of wdr_context_attr_value,
ls_value_set type wdr_context_attr_value.
Attribute data
DATA : lr_element_info TYPE wdr_context_attribute_info.
lr_root_node = wd_context->get_node_info( ).
lr_root_node->add_new_child_node(
EXPORTING
name = 'FLIGHTS' " Web Dynpro: Name of Context Node
RECEIVING
child_node_info = lr_flights_node
).
lr_element_info-name = 'CARRID'.
lr_element_info-type_name = 'S_CARR_ID'.
call METHOD lr_flights_node->add_attribute
EXPORTING
attribute_info = lr_element_info " ATTRIBUTE_INFO
.
ls_value_set-value = 'KN'.
ls_value_set-text = 'Karnataka'.
append ls_value_set to lt_value_set.
ls_value_set-value = 'MH'.
ls_value_set-text = 'Maharashtra'.
append ls_value_set to lt_value_set.
lr_flights_node->set_attribute_value_set(
EXPORTING
name = 'CARRID' " Web Dynpro: Name of Context Element
value_set = lt_value_set " All Fixed Values of an Attribute with Texts
).
in womodify
lr_dropdown_by_key = cl_wd_dropdown_by_key=>new_dropdown_by_key(
bind_selected_key = 'FLIGHTS.CARRID'
width = '70'
).
lr_matrix_head_data = cl_wd_matrix_head_data=>new_matrix_head_data(
element = lr_dropdown_by_key
v_align = '01'
).
lr_tr_container->add_child(
EXPORTING
the_child = lr_dropdown_by_key " THE_CHILD
).
if you need more info please let me know
Best regards,
Rohit
Hi Rohit,
well you can try this...in your wddomodify first try to read your flights data.
node_flight = wd_context->get_child_node( name = if_componentcontroller=>wdctx_node_flight ). elem_flight = node_flight->get_element( ).
Put break point on these two lines & debug. some how you FLIGHTS node to me , appears is not created or is destroyed as soon as you enter WDDOMODIFY. Once you debug you will have a clearer picture ...
Greetings
Prashant
User | Count |
---|---|
89 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.