cancel
Showing results for 
Search instead for 
Did you mean: 

binding data to dropdown by key i am getting the below error.

Former Member
0 Kudos

here i am binding the cardinality as 0ton and i am getting this error. plz help me

Adapter error in DROPDOWN_BY_KEY "DDB_PLANT" of view "YWD_SD_SALESORDER.SALESHEAD_VIEW": Context binding of property SELECTED_KEY cannot be resolved: Node SALESHEAD_VIEW.1.LOCATION_NODE does not contain any elements

Accepted Solutions (0)

Answers (5)

Answers (5)

madan_c
Explorer
0 Kudos

Hi Praveen,

can u plz explain how u resloved this issue?

Even im getting the same issue but unable to resolve it.

FYI ... i have created a NODE to display single record, and for a partcular field which is a drop down field values are populating from domain, im getting the error like u.

Plz suggest me soon as it's very urgent issue

Regards

Madan

Former Member
0 Kudos

hi,

thank u for u r suggestions. I solved this problem my self

Former Member
0 Kudos

hi

For DropdonwByKey, as mentioned by upper 2 experts, you should use "Value-set" bound to the context element.

What and how you can bind, sahai.s has shared with the Example.

For the error exception

Context binding of property SELECTED_KEY cannot be resolved: 
Node SALESHEAD_VIEW.1.LOCATION_NODE does not contain any elements

You should be noted that:

Your cardinity and value should be set correctly.

Best wishes.

sahai
Contributor
0 Kudos

hi praveen,

bind the DROPDOWN_BY_KEY ui element with an attribute which you want it to be associated

add an attribute for example VALUESET of type wdr_context_attr_value_list in this node and the cardinality of node must be 0:n.

after this . in the do init

here types is my attribute to which i bind my dropdown in selectedkey property.

DATA: LT_VALUESET TYPE STANDARD TABLE OF WDR_CONTEXT_ATTR_VALUE,
LS_VALUESET TYPE WDR_CONTEXT_ATTR_VALUE,
LR_NODE_INFO TYPE REF TO IF_WD_CONTEXT_NODE_INFO,
LR_NODE TYPE REF TO IF_WD_CONTEXT_NODE.

LR_NODE = WD_CONTEXT->GET_CHILD_NODE( 'CTX_VN_ALV_TABLE' ).
LR_NODE_INFO = LR_NODE->GET_NODE_INFO( ).

LS_VALUESET-VALUE = 'FIRST VALUE'.
LS_VALUESET-TEXT = 'FIRST VALUE'.
APPEND LS_VALUESET TO LT_VALUESET.

LS_VALUESET-VALUE = 'second value'.
LS_VALUESET-TEXT = 'second value'.
APPEND LS_VALUESET TO LT_VALUESET.

LR_NODE_INFO->SET_ATTRIBUTE_VALUE_SET(
EXPORTING 
NAME = 'TYPES'                                                         "attribute name
VALUE_SET = LT_VALUESET ).

doing this will solve your problem completely.

thanks and regards,

sahai.s

Former Member
0 Kudos

Hi sahai.s

I saw your solution above and found an error because I type the code same like yours, but I still faced the question. So I try another method that I change the cardinality to 1:n and finally I solved it.

Hope others can solve it use this method.

Best regards

Cassie.

Former Member
0 Kudos

Praveen,

I think you should use the DropDownByIndex UI element. DropDrownByKey expects a valueset.