Show TOC

Component-Defined Adaptation Locate this document in the navigation structure

Supporting Component-Defined Adaptation in a Component

In order to enable component-defined adaptation in a component, you need a special controller in your component, the configuration controller. Most important for this controller is the context in which the structure of the adaptation data is defined.

At application runtime, this context is filled with the adaptation data when loading the component, so that the data is available for the entire life span of the coponent. The data from different levels is read and combined.

Note the following when defining the configuration context:

  • The context attributes must have simple data types, that is, they must not be tables, structures, or references.

  • The context nodes cannot be declared as Singleton.

  • If the value of an attribute will be translated into various languages, specify the type as a data element which is built on the domain WDY_CONF_TRANSL_TEXT.

  • For context nodes with the cardinaltity 0..n or 1..n, it is important for combining configuration and customizing data that the elements can be identified uniquely.

    For this reason the context node should have an attribute which can be used as a key. This attribute is the primary attribute.

    A primary text must not be translatable text. The values of the primary attribute must be defined in the configuration and must be different within a node.

    Note Note

    If the configuration developer does not want to assign the primary attribute values explicitly, you can use a data type with the domain WDY_CONF_GEN_PRIMARY. The attribute value is then generated uniquely for every element in the configuration editor.

    End of the note.
  • Changing the primary attribute definition is an incompatible change!

    Caution Caution

    You are not allowed to define another attribute as the primary attribute or to change the name or type of the primary attribute.

    End of the caution.
  • Recursive nodes are not supported.

  • For Boolean values, use a data type with the domain WDY_BOOLEAN, as only then is a checkbox displayed for this attribute in the configuration editor.

  • If you would like to have a checkbox displayed for the attribute in the configuration editor, assign a list of fixed values to the ABAP Dictionary data type.

  • Input help from the ABAP Dictionary is also shown in the configuration editor.

  • The Labels of fields in the configuration editor are taken from the ABAP Dictionary whenever possible. If you do not use an ABAP Dictionary data element, the attribute name is displayed as Label in the configuration editor.

More Information

More information about editing component-defined data for the configuration layer and the customizing layer: