
Defines additional type information about properties using ABAP Type Editor and the corresponding ABAP field names and facilitating mapping between ABAP type and EDM type
Use the ABAP Type Editor to define additional type information about properties and the corresponding ABAP field names. To facilitate the mapping between ABAP type and EDM type, you can select the determination mode, Structure Binding at Entity or Complex Type, Explicit Assignment or Determination by Runtime Object Generator, that is to be used. If you choose Structure Binding at Entity or Complex Type an ABAP structure is assigned to the entity type or complex type as appropriate. The automatic ABAP type assignment is derived from the EDM type. You can assign an ABAP structure at entity type or context type level, but not at the level of the individual properties. The ABAP structure that is assigned to the entity type or complex type is subsequently used by the generator. If an ABAP structure is not assigned at design time, the generator will subsequently generate a new structure based on the type information displayed. If you click Explicit Assignment, you can maintain the category and subsequently the fields that are applicable for this category become ready for input. Fields that are not applicable remain read only. Use the explicit assignment if you specifically do not want an automatic assignment to take place. Note that structure binding overwrites any explicit assignments that have been maintained.
Exact correlations between ABAP types and EDM types are not always possible due to their individual facets and the automatic determination of a corresponding ABAP or EDM type might not be a perfect match. Consequently, you must always review determined type mappings to ensure that you choose the best match possible. The Service Builder includes a validation check that determines possible inconsistencies and appropriate warning messages are displayed so that you can prevent the loss of data that might otherwise arise through the mapping of ABAP type to EDM type and/or vice versa. The check distinguishes between potential loss of data, possible conversion errors, and the applicability of ABAP types.
| EDM Primitive Type | XML Representation | ABAP Representation | ABAP Type |
|---|---|---|---|
| Edm.Binary | binary | Binary | XSTRING, HEX |
| Edm.Boolean | booleanLiteral | Boolean | CHAR LENGTH 1 |
| Edm.String | string.Literal | STRING | STRING, CHAR, NUM |
| Edm.Guid | guidLiteral | Guid | CHAR LENGTH 32, HEX LENGTH 16 |
| Edm.Byte | byteLiteral | Byte | INT1, INT, NUM, HEX, LENGTH 1 |
| Edm.SByte | sbyteliteral | Integer (1 byte) | INT2, INT, NUM |
| Edm.Int16 | int16Literal | Integer (2 byte) | INT2, INT, NUM |
| Edm.Int32 | int32Literal | Integer (4 byte) | INT, NUM |
| Edm.Int64 | int64Literal | Integer (8 byte) | PACKED LENGTH 8 DECIMALS 0, NUM |
| Edm.Decimal | decimalLiteral | Decimal | PACKED, DECFLOAT16, DECFLOAT34 |
| Edm.Double | doubleLiteral | Double | FLOAT |
| Edm.Single | singleLiteral | Single | FLOAT |
| Edm.Float | singleLiteral | Single | FLOAT |
| Edm.DateTimeEdm.DateTimeOffset | dateTimeLiteral | DateTime as Timestamp | PACKED LENGTH 8, DECIMALS 0, PACKED LENGTH 11, DECIMALS 7 |
| DateTime as Date | DATE | ||
| DateTime as Time | TIME | ||
| Edm.DateTimeOffset | dateTimeOffsetLiteral | DateTimeOffset as Timestamp | PACKED LENGTH 8, DECIMALS 0, PACKED LENGTH 11, DECIMALS 7 |
| Edm.Time | timeLiteral | Duration in seconds | PACKED, DECFLOAT16, DECFLOAT34 |
| Duration as Time | TIME |