EDM Type Vs ABAP Type Validation
Details about validation for mismatch between the property’s EDM type and ABAP type.
Introduction
In Service Builder, for a property, as you can set an EDM type as well as an internal ABAP type there is a need to validate if there is a mismatch between the property’s EDM type and ABAP type. The validation is triggered as part of the consistency check in Service Builder. For example, if you import a model with a type EDM.String and wanted to map it with the ABAP type, you have to provide an internal type. This functionality checks whether the selected ABAP type is compatible with EDM type. In case of non-compatibility an error message is displayed. For more information about the validation check for mappings between EDM types and ABAP types, see Mappings and the ABAP Type Editor.EDM Types and Facets
The following are the EDM types their facets and the related ABAP types:
For more information, see http://connectivity:1080/rest-lib/wiki/type-mapping
| EDM Type | Facets |
|---|---|
| Binary | Nullable Default, MaxLength, FixedLength |
| Boolean | Nullable, Default, NA |
| DateTime | Nullable, Default, Precision |
| Time | Nullable, Default, Precision |
| DateTimeOffset | Nullable, Default, Precision |
| Decimal | Nullable, Default, Precision, Scale |
| Single | Nullable, Default |
| Guid | Nullable, Default |
| Double | Nullable, Default |
| SByte | Nullable, Default |
| Int16 | Nullable, Default |
| Int32 | Nullable, Default |
| Int64 | Nullable, Default |
| String | Nullable, Default, Unicode, FixedLength, MaxLength |
| EDM Type | Condition | Proposed ABAP Type |
|---|---|---|
| Binary | Max Length (M) is 0 < M <= 65535 | Type X LENGTH M |
| MaxLength (M) is M > 65535 | Invalid | |
| MaxLength (M) is =0 | XSTRING | |
| Boolean | C LENGTH 1 | |
| DateTime | Precision (P) is 0 | TIMESTAMP |
| Precision (P) is 0 | TIMESTAMPL | |
| Precision (P) is 7 | TIMESTAMPL | |
| Precision (P) >7 | Invalid | |
| SByte | INT2 | |
| Byte | INT1 | |
| String | Max Length (M) is 0 < M <= 65535 | Type C LENGTH M |
| MaxLength (M) is M > 65535 | Invalid | |
| MaxLength (M) is =0 | STRING |