Show TOC Start of Content Area

Background documentation Public Parts  Locate the document in its SAP Library structure

The interfaces of a component are called its public parts. A public part consists of a list of development objects offered to other components. All other parts of the component remain invisible.

A component behaves like a “black box”, which implies that its inner parts are not visible from the outside. A public part lists a number of development objects intended to be visible for other components. A component can define any number of public parts, each of which must have a unique name. A particular development object can be named in more than one public part. This allows you to organize public parts according to functional view points.

A component may narrow the dependency to another component to a certain public part of that component.

Note

When you declare dependencies, you should select only those public parts that your component actually uses. If you have to make changes to the used component at a later time, this helps you to evaluate the effects of the intended changes on other components.

Example

In the figure below, component X is on the same hierarchy level as component Y: Therefore X is allowed to declare a dependency to Y and to refer to the development objects in the public part of Y.

In addition, component X declares a dependency to one of the public parts of component B: This is allowed, because B is a top-level DC. However, B does not see the public parts of the components X and Y, because they are enclosed in component A.

This graphic is explained in the accompanying text

Visibility of public parts. Dependencies of public parts.

 

Child components are not allowed to declare dependencies to their parent components. For the same reason, child DCs must not declare dependencies to public parts of their parent DC.

Note

Inner components do not see their parent component: Components X, Y and Z could never get access to the public part of component A, neither implicitly nor explicitly.

The parent component can declare a dependency to one of its child components by referring to a public part of the child component.It can use only the elements contained in the public part of the child component.

Public parts cannot be used to enhance the visibility of a development object beyond the rules inherent to its technology. For example, a private Java class remains private even if part of a public part. On the other side, a public class remains invisible for other components unless it is added to any public part of its component.

A component can publish development objects from public parts of a child component in its own public parts. This process is called forwarding or propagation of public parts. This is used to make functions of child components available to the outside.Without this mechanism, no functions of the child components could be used. For more information, see Changing Entity References.

A component can publish a public part of a child as a whole or in parts, by adding the respective development objects to its own public parts. Thus, the component can reorganize, enhance, or restrict the functions of the child components, and combine them with its own functions.

Example

In the following figure, public parts pp (1) A and pp (2) A of DC A are assembled from various sources.

        Public part pp (1)  contains objects from the public part of the inner DC X.

        Public part pp (2)  contains objects from both inner DCs X and Y.

DC B depends on both public parts of A. The public parts of X and Y are invisible to B.

This graphic is explained in the accompanying text

Joined public parts of a parent component.

 

 

 

 

End of Content Area