Entering content frame

This graphic is explained in the accompanying text Working with Web Dynpro Component Interfaces Locate the document in its SAP Library structure

In every Web Dynpro component, the creation procedure implements an interface. This component interface contains exactly one interface controller and at least one interface view (for more information, see Structure linkInterfaces of aStructure linkWeb Dynpro Component in the Architecture manual). The interface controller contains a context, events and methods.

This graphic is explained in the accompanying text

The interface views of the component interface have no direct connection to the interface controller; they are generated automatically for every window that is created within the component.

The component interface is implemented exclusively in its related component; it cannot be implemented in other components.

The programming environment of Web Dynpros now allows you to enhance this pre-implemented interface by implementing additional interfaces, which have been defined independent of a component.

Component Interface Definitions

Component interface definitions allow you to generically define a uniform interface structure and later use it in a variety of application components. The advantage of this procedure lies in the fact that in a distributed development the interfaces of all components that use the interface definition reliably contain a particular set of controller elements (methods, context elements, etc.) and interface views, which can be addressed by the developers of using components. The developer of a using component does not need to know which actual implementation of the interface is used – this can be determined dynamically at runtime.

You use the Object Navigator to create and edit component interface definitions analogous to components.

The interface controller of a component interface definition and the interface controller of a component differ in two items:

Interface Controller of a Component Interface Definition

Interface Controller of a Component

The controller can be edited

The controller can be displayed but not edited. To edit its elements, you must call the related component controller and mark the Interface checkbox for all elements intended for the interface controller (see The Different Controllers of a Web Dynpro Component)

Methods can be defined in the editor, but they cannot be programmed there.

The methods are programmed only after the implementation of the component interface definition in a Web Dynpro component.

The methods can be created in the editor of the related component controller (see above) and then be programmed in the ABAP editor.

 

In addition to the mandatory interface controller you can add any number of interface views to a component interface definition.

Implementing Component Interface Definitions

These separately defined component interfaces can now be added to the implemented interface of a component. With the implementation of a component interface definition in a component, the elements of the separately defined interface controller are added to the component controller of the implemented component. Within this implemented component, the methods of the interface controller that have only been defined so far can be programmed component-specifically. For large programming projects, this results in a higher reusability of the interface structures.

 

This graphic is explained in the accompanying text

 

Besides the interface controller a component interface definition can contain interface views.

 

This graphic is explained in the accompanying text

 

When implementing a component interface definition, these interface views are added to the existing views in the interface folder of the implemented component. The related windows are generated and stored in the respective folder of the object list. They are empty and can now be laid out especially for the embedding component.

 

This graphic is explained in the accompanying text

 

For a better understanding, the next section illustrates this concept by means of an application example.

 

 

Leaving content frame