cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in DropDownByKey

sreenivas_pachva
Participant
0 Kudos

Hi guys,

I am getting error when try to create DropDownByKey in webdynpro ABAP. I have gone through the all the forums discussions but i could not able get the exact answer. The application is being shown the below run time error

In my scenario i have taken node with pernr  number  and binding with Dropdownbykey ui element

Error in DROPDOWN_BY_KEY "ROOTUIELEMENTCONTAINER_PERNR" of view "ZWD_DROPDOWN_77.VIEW1": Context binding of property SELECTED_KEY cannot be resolved: Node VIEW1.1.EMP_DET does not contain any elements


Suggest me what was i made mistake when create Dropdownbykey ui element.

Regards:

------------

Sreenivas

Accepted Solutions (0)

Answers (4)

Answers (4)

amy_king
Active Contributor
0 Kudos

Hi Sreenivas,

Your view VIEW1 thinks that node EMP_DET has no attributes, or maybe you have tried to bind selectedKey to the node instead of to an attribute. I would check the context of VIEW1 to make sure that node EMP_DET contains the attribute PERNR. The property selectedKey of your DropDownByKey should be bound to an individual attribute of node EMP_DET, for example, VIEW1.EMP_DET.PERNR.

If the VIEW1 context node EMP_DET does contain attribute PERNR and selectedKey is bound to VIEW1.EMP_DET.PERNR, I would try deleting the context node from VIEW1 and recreating it (or remapping it from the componentcontroller). I have seen on some occasions that the compiler just gets stuck.

See also, Creating the Value Set for a DropDownByKey Element.

If, on the other hand, you would like the dropdown's PERNR values to come from node EMP_DET, then what you want is a DropDownByIndex instead of DropDownByKey.

Cheers,
Amy

former_member230486
Contributor
0 Kudos

Hi,

You have to take one supply function method where you have taken node(i.e, in component controller context).By default you will get code.You just uncomment the required lines and write a select query before binding to internal table.I hope it will resolve your problem.and one more thing before doing this i.e, Cardinality must be 0...N

m_aravindan
Active Participant
0 Kudos

Hi Sreenivas,

            Just check whether  the context node EMP_DET does contains any elements(attributes) are not?

Regards

Aravindan

former_member184578
Active Contributor
0 Kudos

Hi,

What cardinality  you have selected for the node.? Change the cardinality to 0..n for DDBI for Drop down by key you can have 1..1 and check the domain has value range maintained.

Regards,

Kiran