Show TOC

Importing a Data Source (RFC/BOR Interface)Locate this document in the navigation structure

Introduction
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.
Procedure
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:
  1. Log onto the SAP Gateway system.
  2. Open transaction SEGW. The SAP Gateway Service Builder opens.
  3. Create a new project. For more information, see Creating a Project. .
  4. Right click on the Data Model folder and select Start of the navigation path Import  Next navigation step RFC/BOR Interface. End of the navigation path. The wizard to guide you through the creation of entity types opens. The wizard to guide you through the creation of entity types opens.
  5. Do the following in the Create Entity Type from Data Source window:
    1. Enter a name for the new entity type in the Entity Type Name field
    2. 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.
      Note In cases when 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.
    3. 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.
    4. Select the type of the data source, either BOR or Remote Function Calls from where you want retrieve the properties of the entity type from the Type field drop-down list.
    5. 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 namesExpand the object and select the methods.
    6. Expand the object and select the methods.
    7. Click Continue(Continue)
    8. Click Next to proceed in the Wizard.
      Note 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.
    Figure 1: Select Parameter(s) Screen
  6. Expand the Data Source Parameters and select the required structures, tables, and properties. You can also use the Select All (Select All) and the DeSelect All (DeSelect All) 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
      Note The parameters marked as mandatory must be selected.
  7. 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.
  8. Choose Next . The Modify Entity Type screen opens.
    Figure 2: Modify the Selected Entities
  9. The Modify Entity Type screen provides the following editable and non-editable information:

    Name

    Description

    Edit Status

    Belongs to 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

    Note 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. End of the note.
  10. Choose Finish.
Result
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.
Properties Imported and Message in the mass edit view
Figure 3: Properties Imported and Message in the mass edit view
  1. Double click the message to repair the error. The mass edit view opens the entity type.
  2. Make the required changes as detailed in the message. See Entity Types for editing the entity types in the mass edit view.
  3. After fixing all the errors you can generate runtime objects. See Generating Runtime Objects for detailed instructions to generate the runtime objects for your OData service.
  4. 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.