
This is an interface which represents an OData Channel EntityType object. See also
http://www.odata.org/developers/protocols/overview#EntityDataModel
.
Method BIND_STRUCTURE
This method binds the EntityType to an ABAP Dictionary structure or to a type definition in an ABAP interface, for example.
Every component of the structure which shall be exposed in the EntityType needs to be declared first as a property. The bind structure follows a white-list approach. Only properties which are explicitly declared for the EntityType are exposed. Structure binding is used to retrieve the type and the text information from the ABAP Dictionary. The EDM core types are automatically retrieved from the internal ABAP types but can be manually overwritten. The text information is retrieved based on the text descriptions stored for the data elements in the ABAP Dictionary.
See also ABAP Dictionary Type to EDM.Type Mapping.
|
Parameter |
Description |
|---|---|
|
IV_STRUCTURE_NAME |
Name of the structure data type. |
|
IV_BIND_CONVERSIONS |
Flag which propagates information about conversion exits, currency, and unit fields from the ABAP Dictionary into the metadata. The effect is the same as calling the methods SET_CONVERSION_EXIT, SET_SEMANTIC and SET_UNIT of the /IWBEP/IF_MGW_ODATA_PROPERTY interface. In addition for the amount, properties precision and scale are set according to the formula: Precision = Length * 2 - 1, Scale = Precision, where length is an internal length of the structure field. |
Method CREATE_PROPERTY
This method adds a new property to the EntityType.
|
Parameter |
Description |
|---|---|
|
IV_PROPERTY_NAME |
Name of the property. |
|
IV_ABAP_FIELDNAME |
Field name of the property. |
|
RO_PROPERTY |
Instance |
Method GET_PROPERTY
This method retrieves the property of the EntityType by name ( not the ABAP name).
|
Parameter |
Description |
|---|---|
|
IV_PROPERTY_NAME |
Name of the property. |
|
RO_PROPERTY |
Instance |
Method SET_CREATABLE
This method sets the value of sap:creatable of the EntityType. Thus it indicates whether instances of this type can be created. The default value is true and therefore not shown in service metadata document.
|
Parameter |
Description |
|---|---|
|
IV_CREATABLE |
Value of the EntityType. |
Method SET_UPDATABLE
This method sets the value of sap:updatable of the EntityType. Thus it indicates whether instances of this type can be updated. The default value is true and therefore not shown in service metadata document.
|
Parameter |
Description |
|---|---|
|
IV_UPDATABLE |
Value of the EntityType. |
Method SET_DELETABLE
This method sets the value of sap:deletable of the EntityType. Thus it indicates whether instances of this type can be deleted. The default value is true and therefore not shown in service metadata document.
|
Parameter |
Description |
|---|---|
|
IV_DELETABLE |
Value of the EntityType. |
Method SET_PAGEABLE
This method sets the value of sap:pageable of an EntitySet of this EntityType. Thus it indicates whether paging can be applied to an EntitySet of EntityType, for example parameters $top and $skip. The default value is true and therefore not shown in service document for the collection (directly associated to the EntitySet).
|
Parameter |
Description |
|---|---|
|
IV_PAGEABLE |
Value |
Method SET_ADDRESSABLE
This method sets the value of sap:addressable of an EntitySet of this EntityType. Thus it indicates whether the EntitySet of the EntityType can be addressed directly or only via navigation property. The default value is true and therefore not shown in service document.
|
Parameter |
Description |
|---|---|
|
IV_ADDRESSABLE |
Value |
Method SET_IS_MEDIA
This method sets the value of m:HasStream of an EntityType in the service metadata document. The default value is false if the method is not called and therefore not shown in service metadata document.
Instances of this type which are marked as media types are basically called media link entries. Every media link entry has an associated media resource which represents the binary which is referenced by the media link entry. Every instance of this type has a content source and a content MIME
type (
http://www.odata.org/developers/protocols/atom-format#RepresentingMediaLinkEntries
). The following kind of media types are supported:
Media types which point to external sources (external URLs)
A property is required in the EntityType which is marked as the content source via feed customization.
A property is required in the EntityType which is marked as the content MIME type via feed customization.
Media types which point to internal sources (that is, binaries)
A property is required in the EntityType which is marked as the content MIME type via feed customization.
The content source shall not be set for internal sources. A content source link is generated by the framework and routes requests for media resources to the application specific implementation.
See also Media Links.
|
Parameter |
Description |
|---|---|
|
IV_IS_MEDIA |
Value |
Method SET_IS_ABSTRACT
This method sets the abstract value for the EntityType.
|
Parameter |
Description |
|---|---|
|
IV_IS_ABSTRACT |
Value |
Method SET_SUBSCRIBABLE
This method indicates whether it is possible to subscribe to this type. The default value is false and therefore nothing is shown in the service document.
Types supporting subscriptions are annotated with an atom:link element with the attribute rel="http:/www.sap.com/Protocols/SAPData/rel#subscribe" in the service document.
|
Parameter |
Description |
|---|---|
|
IV_IS_SUBSCRIBABLE |
Value |
Method SET_FILTER_REQUIRED
This method sets the flag that a filter is required for getting feeds.
Method HAS_FTXT_SEARCH
Collections of this data type can be searched through OpenSearch. The default value is false and therefore nothing is shown in the service document.
Types supporting OpenSearch are annotated with an atom:link element with attribute rel="search" in the service document. The atom:link href points to the OpenSearch description document.
|
Parameter |
Description |
|---|---|
|
IV_FSEARCH |
Value |
Method SET_SEMANTIC
This method sets the semantics of the entity type.
Supported values are the components of the structure /IWBEP/CL_MGS_ABS_MODEL=>GCS_SAP_SEMANTIC.
|
Parameter |
Description |
|---|---|
|
IV_SEMANTIC |
Semantics in /IWBEP/IF_MGW_MED_ODATA_TYPES=>TY_E_MED_SEMANTIC. |
Method SET_IS_THING_TYPE
This method represents an entity that defines tangible work objects. A "prominent" data object EntityType fulfilling additional constraints.
|
Parameter |
Description |
|---|---|
|
IV_IS_THING_TYPE |
Value. |
Method SET_BASE_TYPE
This method sets the base type of an EntityType.
|
Parameter |
Description |
|---|---|
|
IV_ENTITY_TYPE |
Name of current type base. |
Method CREATE_COMPLEX_PROPERTY
This method adds a complex property to the EntityType.
|
Parameter |
Description |
|---|---|
|
IV_PROPERTY_NAME |
Property name in complex type. |
|
IV_COMPLEX_TYPE_NAME |
Complex type name of complex type which is added as a nested complex type. |
|
IV_ABAP_FIELDNAME |
Field name of the complex type, property. |
Method CREATE_ENTITY_SET
This method defines an EntitySet which refers to the current EntityType object.
|
Parameter |
Description |
|---|---|
|
IV_ENTITY_SET_NAME |
EntitySet name which appears, for example, in the service document as the href of the collection. |
|
RO_ENTITY_SET |
Instance |
Method CREATE_NAVIGATION_PROPERTY
This method defines a navigation property.
|
Parameter |
Description |
|---|---|
|
IV_PROPERTY_NAME |
Name of the navigation property. |
|
IV_ASSOCIATION_NAME |
Name which is referenced by the navigation property (relationship attribute of navigation property in Service Metadata Document). |
|
IV_ABAP_FIELDNAME |
Name of the navigation property (component name in case of expand or deep insert in expected structure |
|
RO_NAVIGATION_PROPERTY |
Instance |
Method GET_PROPERTIES
This method retrieves a list of all properties of the current EntityType.
|
Parameter |
Description |
|---|---|
|
RT_PROPERTIES |
Properties of the EntityType. |
Method SET_TEXT_KEY
This method sets the source of a text label, for example, a text element or ABAP Dictionary label.
The method create a description for a field that differs from those of the ABAP Dictionary. A source of this text can be a text symbol of a class. The semantics of the input parameter must be the CLASS NAME and the symbol Id of the text element separated by -. The corresponding text object key is defined in class /IWBEP/CL_MGW_ABS_MODEL.
|
Parameter |
Description |
|---|---|
|
IV_TEXT_KEY |
Key in the class name and the text element separated by -. Example: /IWFBEP/CL_MGW_MED_POOL_TX_LOAD-000 |
|
IV_TEXT_OBJECT_TYPE |
Type in the text object type defined in the field mentioned above. Example: GCS_SAP_TEXT_OBJECT_TYPES-BACKEND_GATEWAY_TEXT |
|
IV_CREATE |
In the text the key will be created if not available. This parameter must always be set to ABAP_TRUE. |