Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Getting the description from dropdown list

hi sdns,

Just a quick check. My WD program have a set of dropdown list (by key) which is derived and populated by a complex series of logic.

Now I need to update a textview of the description of dropdown list I select. I don't want to go through the complex codes again just to retrieve te descriptions but I want to directly access to the valueset to retrieve the description. I tried "gettext()" but it's giving me error.

Anyone kind enough to provide me some snippet of codes to directly access to the selected description of my dropdown list? points will be awarded for useful answers....thanks.


Former Member
Former Member replied

Hi Jansen,

Let the attribute bound to DDKey be Val in Context.

You will be putting key-value to DDKey by

IWDAttributeInfo boutiqueInfo=wdContext.getNodeInfo()..getAttribute(IPrivate<View>.IContextElement.VAL);

ISimpleTypeModifiable stf1=boutiqueInfo.getModifiableSimpleType();

IModifiableSimpleValueSet svs=stf1.getSVServices().getModifiableSimpleValueSet();

To get the text of the dropDown, first get the key of the dropDown selected by

String key=wdContext.currentContextElement.getVal();

Now u can get the value of this key from the SVS variable of DDby Key

String ddValue=svs.getText(key);

The key is case sensitive, so ensure the case also.

U can check the existence of the key by


and value by



Fahad Hamsa

0 View this answer in context

Helpful Answer

Not what you were looking for? View more on this topic or Ask a question