Show TOC

Create PropertiesLocate this document in the navigation structure

This document describes creating properties for an entity type 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
In SAP Gateway Service Builder, you can define properties for entity type and complex types. Properties define the characteristics of the data that an entity type or complex type instance will contain at runtime. The properties of entity types and complex types are stored in Properties subfolder within the Entity Types and Complex Types folders in your Service Builder project. Properties comprise the following:
  • Attributes
    • Name
    • Type Kind (Core Type (with facets such as Nullable, MaxLength, FixedLength, Precision, Scale and Variable Scale) or Complex Type)
    • Data Type
  • ABAP Type Information
    • ABAP Field Name
    • ABAP Type Editor
  • DDIC Information
    • DDIC Auto Annotation
Prerequisites

You should have already created an OData V4 project and created an Entity or Complex Type.

Procedure
To define properties, proceed as follows:
  1. Expand the Start of the navigation path Data Model Next navigation step Entity Type End of the navigation path or Start of the navigation path Data Model Next navigation step Complex Type End of the navigation path folder in the tree view of your project.
  2. Click Display <-> Change in Mass Edit View to switch to edit mode and then click Insert Row to insert a row or click Append Row to append a new row to the table for a new property.
  3. In the Name column, enter a name for the property. For example, enter NEW_PROPERTY. If you do not enter a name, an error message is displayed and you cannot save the changes to your project.
  4. Define attributes of the new property:

    Column

    Description

    Name

    Enter a new name for the new property or modify the existing name as required

    Is Key

    Select to indicate that this is a key property in the data model

    Type Kind

    Specify whether the property is a Complex Type or Core Type

    Data Type

    Enter the data type that corresponds to the complex type or core type property. If it is a core type property, use the input help to select the appropriate Edm.type

    Precision

    EDM facet. Enter the number of decimal places permitted for numeric data types. The value defines the maximum number of decimal places permitted to the left and right of the decimal point

    Scale

    EDM facet. Enter the maximum number of decimal digits permitted after the decimal point

    Variable Scale

    Select Variable Scale if you are not certain about the scale value of corresponding property. Do not enter Scale value if you are selecting this option.

    MaxLength

    EDM facet. Enter the maximum length you want to allow at runtime. For example, enter 30 to specify a maximum length of 30 characters for this property.

    Nullable

    EDM facet. Select this checkbox if you want to allow a null value to be entered for this property at runtime

    ABAP Field Name

    It denotes the internal name of the property. If you have specified a structure binding for the parent entity or complex type, this denotes a component of this structure.

    ABAP Type Editor

    Use the ABAP Type Editor to specify how the ABAP type to EDM type mapping is to be determined (Structure Binding at Entity or Complex Type, Explicit Assignment, Determination by Runtime Object Generator) to be used for the ABAP field.

    DDIC Auto-Annotation

    Select DDIC Auto-Annotation if you want to display annotation based information for the property. Information is generated automatically in the output based on the underlying DDIC information.

  5. Click Save to save the changes made.