Show TOC Start of Content Area

Procedure documentation Creating Service Components  Locate the document in its SAP Library structure

Use

Service components enable you to combine and manipulate data services to create a customized data service. You can then reuse this service component as a source of data in other composite views, instead of customizing the data services each time in each composite view. For example, you can create a service component that contains two data services and a Union operator with complex definitions to provide a single combined data output.

You define the logic of a service component by adding data services to the Design board, and adding connectors and operators to define the information flow between them. You add connectors and operators to the Design board by dragging them from the Compose task panel. You can also add them by dragging out from ports of data services and other model elements that you previously added to the Design board.

You can also create a service component using the Service Component wizard. This wizard assists you in creating a simulated service that contains static data and input ports. You can use this wizard if you need to create a demo service that contains data, or if you are creating a model and the service you need to use does not yet exist. For more information, see Creating a Service Using the Service Component Wizard.

After you have composed the service component, you configure the service component properties. You do this in the same way as for composite view properties. For more information, see Configuring the Composite View.

Prerequisites

You have created a new service component using the Create New Model dialog box or by dragging a Service Component operator from the Compose task panel onto the Design board and choosing Create Service from the context menu. For more information, see Creating a Model and Development Component.

Procedure

...

       1.      In the Search task panel, locate the required data service and drag it to the Design board. Locate and add additional data services as required. For more information, see Discovering Data Services.

       2.      Click the Compose button in the task-panel toolbar. The connectors and operators available for the service component are displayed in the Compose task panel. For a description of each of the elements, see Introducing the Compose Task Panel.

       3.      Drag the connectors or operators you require from the Compose task panel to the Design board.

Note

You can also drag out from an element port and from the displayed context menu choose an element to add.

       4.      Connect the items as needed, by dragging from the relevant in or out ports to other elements, to create the logic and flow of the service component. You can define input to data services, output from data services, static data (using the Static Dataconnector), and manipulate the data using operators (such as Sort and Filter).

Note

If you drag out from an element that includes a large number of fields, the Define Data dialog box is displayed, enabling you to choose the fields for the element and their default values. For more information, see Defining Data.

       5.      Map the data fields from the elements used as input to the fields of a data service. For more information, see Mapping Data.

       6.      Configure each of the elements in the service component as described in Configuring the Composite View.

Result

You have created a service component that serves as a source of customized data. You can now reuse this service component in other models. For more information, see Reusing Components.

Example

Your service component may contain data services, connectors, and operators. The following example shows a service component that uses a data service that checks whether a specific customer exists, and if it does, the first data service passes the customer ID to a second data service that sorts and outputs the specified customer’s details.

This graphic is explained in the accompanying text

End of Content Area