cancel
Showing results for 
Search instead for 
Did you mean: 

getEnumerationTexts

Former Member
0 Kudos

Hello,

I like to get the descriptions/textvalues from a SimpleType's Enumeration. I played around with DdBroker (com.sap.dictionary.runtime.DdBroker) and tried to get an instance of any object which implements the interface com.sap.dictionary.runtime.ISimpleType to use the method getEnumerationTexts, but I didn't get it right.

I even did not know how to get the correct instance of a DdBroker.

Has anybody got some experience with this and can give me some hint? That would be great!

Greets,

Bernd

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Try the ISimpleType -> ISimpleValueServices -> ISimpleValueSet route.

Armin

Former Member
0 Kudos

Hello Armin,

thanks for your reply - I hoped it would be you who answers 🐵

I suppose my explanation wasn't precise enough, my main problem is; on which path can I get an object of my SimpleType to ask it for its ValueSet?

Greets

Bernd

Former Member
0 Kudos

Try something like

ISimpleType type = wdContext.node<Node>().getNodeInfo().getAttribute(<Attribute>).getSimpleType();
ISimpleValueSet valueSet = type.getSVServices().getValues();

Armin

Former Member
0 Kudos

Thanks!

That was exactly what I wanted to know.

I didn't thought about asking the Attribute for its type, but its so easy.

Your points, Armin

=Case closed=

Answers (0)