Skip to Content
0
Former Member
Jun 22, 2007 at 04:56 PM

Can I set value help for simple type generated by Model (aRFC)?

8 Views

Hi, SDN fellows.

Referring to the WDP Value Help Tutorial in SDN, we can actually set the value helps to a simple type, and set the value attribute type to the simple type to rendered with the Drop Down Key UI component, like the following code:

//Access interface ISimpleTypeModifiable for modifying the attribute's datatype
    IWDAttributeInfo attributeInfo =
      wdContext.getNodeInfo().getAttribute(IPrivateMain.IContextElement.COUNTRY);
    ISimpleTypeModifiable countryType = attributeInfo.getModifiableSimpleType();

    // Set field label and populate valueset
    countryType.setFieldLabel("Country");
    IModifiableSimpleValueSet valueSet =
      countryType.getSVServices().getModifiableSimpleValueSet();
    for (int i = 0; i < 40; i++) {
      valueSet.put("Key_" + i, "Country " + i);
    }

    // initialize context value attribute 'Country'
    wdContext.currentContextElement().setCountry("Key_0");

My question is, since this is the simple type we defined in Local Dictionary, can we also do the same thing for the Simple Type in custom Data Dictionary generated by the model (adaptive RFC)?

My optimal goal is to assign a list of resultset (table of data with key and key description) to the simple type (of the custom Data Dictionary that generated by the import of an adaptive RFC) as a list of value help when rendered with the Drop Down By Key UI component.

In this case, can I just do the same thing like the code above?

Thanks for advise.

Kent