The Service Builder enables you to reuse existing RFC/BOR parameters to create new entity types meaning that you do not have to create new entities. A wizard is provided to guide you through the process. This document explains step by step instructions to import a data source and provides information about editing its properties.
Creating Entity Types from Data Source (RFC/BOR)
Creating an entity type from a data source comprises three steps:
Import the data source
Select the parameters from the selected data source
Edit the selected parameters
To create entity types from a data source, proceed as follows:
Log onto the SAP Gateway system.
Open transaction SEGW.
The SAP Gateway Service Builder opens.
Create a new project. For more information, see Creating a Service Builder Project.
Right click on the Data Model folder and select .
The wizard to guide you through the creation of entity types opens.
Do the following in the Create Entity Type from Data Source window:
Enter a name for the new entity type in the Entity Type Name field
Select either the Remote data source or the Local data source radio button in the Target System region.
Remote : The data source resides in the remote system. The RFC Destination field is activated.
Local : If the data source to fetch the properties resides in the local system, select this option. In such cases, the RFC Destination field is not activated since it is not required.
If a model is created using the Import RFC/BOR function and later has to be transported to another system where the DDIC objects may not be available, it is recommended to create the model using the RFC destination as NONE. If the RFC destination is NONE, then no DDIC objects will be assigned to the entity type and the individual data element assignment to the properties (in the ABAP type editor) will not happen and local data types will be generated in the MPC.
For Remote Data Source, enter the parameters of the connection in the RFC Destination field. For example, TCP/IP or SAP connections. Alternatively, you can also use the input help available for this field.
Select the type of the data source, either BOR or Remote Function Calls to retrieve the properties of the entity type from the Type field drop-down list.
Depending on the selection in the Type field, enter the name of the data source in the Name field. Alternatively, you can also use the input help available for this field, which displays a list of object names.
Expand the object and select the methods.
Click
Click Next to proceed in the Wizard.
If any entries are incorrect, an error message is displayed.
If the validation check is successful, the Select Parameter(s) screen of the wizard displays.
Expand the Data Source Parameters and select the required structures, tables, and properties. You can also use the and the buttons to perform a mass select and deselect.
Structures are created as complex types
Tables are created as new entity types
Properties are defined for the entity type created
The parameters marked as mandatory must be selected.
Select the check-box under Assign Structure to create additional artifacts.
Complex types will be created if the parameter is a structure type and entity types will be created if the parameter is a table type. In addition, DDIC assignment will be retained for the newly created artifacts.
If this check-box is not selected then all the properties will be created under one root as a flattened structure.
Click Next .
The Modify Entity Type screen opens.
The Modify Entity Type screen provides the following editable and non-editable information:
Name |
Description |
Edit Status |
---|---|---|
Is Entity |
If the property belongs to the entity type, this check box is selected. If it is not selected, the property belongs to the complex type. |
Non-Editable |
Complex/Entity Type Name |
This is the name of the property. It can either be a complex type or entity type |
Editable |
ABAP Name |
This is the technical name. This will not be displayed in the metadata. |
Non-Editable |
Type |
Type of property. |
Non-Editable |
Node Name |
This is external name displayed in the metadata. |
Editable |
Is Key |
Indicates whether the imported property is to be imported as a key of the entity type. Each entity type must define at least one key property. |
Editable |
Label |
This is the label for the properties which will be displayed in the metadata. |
Editable |
The Create Default Entity Set will be selected by default if an entity type is chosen for creation. You can choose not to create entity sets by unselecting this box. If there are no entity types then this will be disabled. All entity sets will be created with the suffix name Set. For example, If Entity type name is E1 then the default entity set name will be E1Set.
Choose Finish.
The selected data source parameters are imported into the Service Builder. The Service Builder runs an OData compliance check. The appropriate information messages resulting from the check are displayed in the mass edit view.
Double click the message to repair the error.
The mass edit view opens the entity type.
Make the required changes as detailed in the message.
See Entity Types for editing the entity types in the mass edit view.
After fixing all the errors you can generate runtime objects.
See Generating the Service for detailed instructions to generate a service.
After generating the runtime objects, you can proceed to register and then maintain the service in the configured SAP Gateway hub systems.
See Service Maintenance to maintain services.
For more information on importing more properties from the same data source, see Importing a Data Source (RFC/BOR Interface).