Show TOC

Create Complex TypesLocate this document in the navigation structure

This document describes creating complex types in the project complying with OData V4.

NoteThe following image contains links to more information.
This document describes about the Service Builder projects that comply with OData V4, the development approach followed by it and its User Interface. This document describes creating an empty Service Builder project complying with OData V4. This document describes steps for creating Entity Types in Service Builder Project complying with OData V4. This document describes creating properties for an entity type complying with OData V4. This document describes creating Navigation Properties in the Service Builder project complying with OData V4. This document describes creating Entity Sets for the Service Builder projects complying with OData V4 This document describes defining Navigation Property Binding for the Service Builder projects complying with OData V4. This document describes creating complex types in the project complying with OData V4.
Context
Use complex types to define structured properties for entity types or other complex types without exposing complex types themselves as an independent OData entity. Because complex types consist of a collection of properties without a unique key, they can only exist as properties of a containing entity or, outside an entity, as a temporary value. Complex types comprise:
  • A unique name
  • Properties
Prerequisites

You should have already created an OData V4 project.

Procedure
To create a complex type in your Service Builder project, proceed as follows:
  1. Right click the Data Model folder, and click Start of the navigation path Create Next navigation step Complex Type End of the navigation path. The Create Complex Type dialog box opens.
  2. Enter a name in Complex Type Name column and click OK. The complex type displays in the mass maintenance view. Do the following in the mass maintenance view:
    1. In ABAP Structure column, enter an appropriate ABAP structure name or use the input help to search for an existing structure in the repository.
    2. Internal Name is generated by the system based on the Complex Type name. This field is editable and you can change the Internal Name anytime.
  3. To create another Complex Type click Insert Row
  4. Click Save
After creating complex types, define properties for the complex type created.