Show TOC

Importing a DDIC StructureLocate this document in the navigation structure

Use

To reduce the time required to create complex types and entity types in your data model, Service Builder provides you Import DDIC Structure function with which you can import an existing ABAP (DDIC) structure and reuse this data to create new complex types and entity types with ease.

Note

DDIC structures can be imported only for the projects of type Service with SAP Annotations and Service with Vocabulary-Based Annotations.

You can import the following DDIC structures into the Service Builder:

  • Views

  • Database tables

  • Structures

Procedure

Importing DDIC Structure

Importing the DDIC Structure comprises three steps:

  • Importing the DDIC Structure

  • Selecting the parameters from the DDIC Structure

  • Modifying the selected parameters

To import a DDIC structure into a data model, 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 Service Builder Project.

  4. Right click on Data Model folder and select Start of the navigation path Import Next navigation step DDIC Structure End of the navigation path.

    Wizard Step 1 of 3: Import from DDIC Structure- Create an Entity Type or Complex Type screen of the wizard opens.

  5. Do the following in this wizard:

    1. Enter a name for the new entity type/complex type in the Name field

    2. Select either Entity Type (imports the selected structure into your data model as an entity type) or Complex Type (imports the selected structure into your data model as a complex type).

    3. In the ABAP Structure field, enter the ABAP structure name or use input help to get assistance.

      Note

      Input help (F4 Help) is not available for class/interface-based type structures

    4. Select Create Default Entity Set, to create an entity set for the entity created.

    5. Click Next to proceed. If any of the entry is incorrect, an error message is displayed.

    If the validation check is successful, the Wizard Step 2 of 3: Import from DDIC Structure-Select Parameter(s) screen of the wizard opens.

    Based on the selected ABAP structure name in the Wizard Step 1 of 3, you can see a detailed display of the components of the structure as a tree.

    Following columns are editable in this window:

    • Data Source Parameter

    • Assign Structure

    • Import Search Help

    The column Search Help displays the search help associated with the fields.

  6. Expand the Data Source Parameters and select the required structures, tables, and properties. You can also use Select All and Deselect All to perform a mass select and deselect.

    • On selecting the nested structure or table, the corresponding Assign Structure is also selected by default. If you select individual property in nested structure or table, select Assign Structure manually.

    • If respective Assign Structure is not selected then all the selected properties are created under one root as a flattened structure.

    • Complex Type are created if structures are imported and entity types are created if tables are imported. In addition, DDIC assignment will be retained for the newly created artifacts and DDIC structure is assigned if Assign Structure is selected.

  7. The Import Search Help enables if a search help is associated with the respective Data Source Parameter. The associated search help is displayed in Search Help column. You can import this search help by selecting respective checkbox.

    Note

    The imported search help are created as a separate entity in Data Model.

  8. Click Next.

    The Wizard Step 3 of 3: Import from DDIC Structure-Modify Entity Type screen of the wizard opens.

    Based on the selection from Wizard Step 2 of 3, the Service Builder lists all the selected fields in the structure to import as an entity type/complex type. From this list, select the key property.

  9. The Modify Entity Type screen provides the following editable and non-editable information:

    Name

    Description

    Edit Status

    ISEntity

    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

    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

    Type

    Type of property.

    Non-Editable

    Name

    Name of the property

    Editable

    Label

    This is the label for the properties which will be displayed in the metadata.

    Editable

    Note

    If Create Default Entity Set option in Wizard Step 1 of 3 is selected, then entity sets are created for all the entities and mapping proposal are created for Query and Read operations for the selected entities created from Search Help.

    Entity sets are created with the suffix Set. For example, If Entity type name is E1 then the default entity set name is E1Set. You can choose not to create entity sets and mapping proposal by deselecting this box.

  10. Click Finish.

Result
  • The model contents are transformed from the wizard to the data model as a new entity type together with its properties and entity sets are also created.

  • The selected ABAP Structure name is displayed in the ABAP Structure Type Name field of the imported entity type/complex type.

  • Mapping proposal for query and read operation, for the entities created from Search Help, are created. This can be confirmed by expanding Service Implementation folder. Open the new entity sets created. Expand GetEntity (Read) and GetEntitySet (Query) operations. Double click the Mapping node to open. It displays mapping proposal in the mass maintenance view.

Importing Properties

There might be instances when some properties were not selected during an import of DDIC structure. In such cases, the Import properties function can be used to import more properties from the same data source. To import properties see Importing Properties section in Importing a Data Source (RFC/BOR Interface).

More Information

To proceed with generating the service, see Generating the Service.