Show TOC

Context-Based AdaptationsLocate this document in the navigation structure

With context-based adaptations (CBA), an FPM application can be adapted dependent on specific runtime parameters. A particular adaptation will be applied when the application is called within a specified context (a context being, for example, the role of the person who launches the application).

CBA negates the need for making extra copies of applications, and for writing additional code.

Use

An application configuration might display a form that is completed by both employees and their managers. You might want the form that is displayed to the managers to look different from that which is displayed to the employee. For example, the managers' form might have fewer entry fields or it might contain a section for notes. Instead of making several copies of an application configuration and adjusting them for every eventuality that you require, Floorplan Manager provides you with CBA.

Each adaptation of a configuration contains only the delta changes to its base configuration.

Structure

Applications that are adaptable applications are embedded inside a 'wrapper' application.

The adaptation wrapper application is not based on the normal floorplan component ( FPM_ <Floorplan ID>_COMPONENT, for example FPM_OVP_COMPONENT), but is based on an 'adaptable' component instead ( FPM_ADAPTABLE_ <Floorplan ID> , for example, FPM_ADAPTABLE_OVP). The adaptable component calls the normal floorplan component. The following figure illustrates this concept; the upper part of the figure shows an application based on the Overview Page (OVP) component ( FPM_OVP_COMPONENT), whilst the lower part shows an application based on the adaptable version of the OVP component, FPM_ADAPTABLE_OVP - a so-called wrapper component.

Figure 1: Context-Based Application based on OVP Component

Which particular adaptation of an application is displayed at runtime depends on the parameters passed to the application. Each wrapper application knows which parameters to expect.

A parameter that affects an adaptable application is known as an adaptation dimension. Adaptation dimensions are attached to adaptation schema. This is explained below in more detail:

  • Adaptation Schema

    A list of characteristics (or dimensions) which can be used for adaptations, for example a role or country.

    Adaptation schemas relate to a whole application area; it is not necessary to create a separate schema for each application.

  • Adaptation Dimension

    Represents an individual characteristic within an adaptation schema. It is maintained in transaction SM30 view FPM_V_ADAPT_DIM. Examples of adaptation dimensions include role and country.

    A dimension is defined by the following attributes:

    • Name

      For identification purposes.

    • Index

      Used to determine the dominating adaptation dimension in case there is a collision.

    • Data element

      Used only at design time, allowing the provision of field helps and F4 helps.

    The adaptation dimensions that are used in an adaptable application are found on the Parameters page of the application in transaction SE80.

The adaptations that you create always inherit attributes from the base configuration. If you make changes to the base configuration, these changes are present in the adapted configurations too, even if you created the adapted configurations before the changes to the base configuration were made.

Activities

Recognizing an Adaptable Application

Applications created using CBA are known as adaptable applications. You can recognize whether an application is adaptable in the following ways:

  • In the Web Dynpro hierarchy browser

    An extra component configuration is visible, the 'adaptable' floorplan component, for example FPM_ADAPTABLE_OVP.

  • At runtime, when you open the FPM configuration editor, FLUID, using the Customize Page icon on the main toolbar.

    The Adaptations toggle-button is visible on the main toolbar. Choosing this button displays the Adaptations panel, listing all existing adaptations of the application configuration.