Skip to Content
avatar image
Former Member

Modifying Simple Type at runtime for all attribute

Hi All,

Is it possible to modify a simple type created in data dictionary for all the attributes. The requirement is: I have two attributes Attribute_A and Attribute_B whose type is DD_Attribute of type String. Now when I try to modify the enumeration of DD_Attribute I have to do it for both the attribute by getting the modifiable simple type of each attribute which in turn is one only.

But Instead of that can I directly modify the enumeration of DD_Attribute at runtime so that I dont have to do it for each attribute.

Regards,

Jaydeep

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Aug 08, 2007 at 09:43 AM

    Hi

    You can use this code to fill enumeration at runtime.

    But this is for Composite Applicaitons, add the required jars and try

    TypedFieldDescriptorFactory factory = new TypedFieldDescriptorFactory();

    TypedFieldDescriptor descriptor = factory.getTypedFieldDescriptor("", "String", "com.sap.Cities", null, Locale.GERMAN);

    ISimpleType type = descriptor.getSimpleType();

    ISimpleTypeModifiable modifiable = wdThis.wdGetAPI().getContext().getModifiableTypeOf("Cities.Cities");

    modifiable.setSVServices(type.getSVServices());

    for more information see this using-custom-enumerations-in-webdynpro

    Regards

    Abhimanyu L

    Add comment
    10|10000 characters needed characters exceeded