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 NetWeaver Gateway system.

  2. Open transaction SEGW.

    The SAP NetWeaver Gateway Service Builder opens.

  3. Create a new project. For more information, see Creating a Service Builder Project.

  4. Switch to edit mode.

  5. 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.

    Figure 1: Import-> RFC/BOR Interface

    The wizard to guide you through the creation of entity types opens.

    Figure 2: Wizard to Create Entity Type From RFC/BOR Interface
  6. 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.

      Figure 3: RFC Destination field enabled on Remote option selected
    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 names.

      Figure 4: Input Help for Name Field
    6. Expand the object and select the methods.

    7. Click Continue

    8. Choose 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 5: Select Parameter(s) Screen
  7. Expand the Data Source Parameters and select the required structures, tables, and properties. You can also use the Select All and the 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.

  8. Choose Next .

    The Modify Entity Type screen opens.

    Figure 6: 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

  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.

Figure 7: 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 Gateway hub systems.

    See Service Maintenance to maintain services.