Show TOC

/IWBEP/IF_MGW_VOCAN_ANNOTATIONLocate this document in the navigation structure

Use

OData vocabulary annotation interface and methods.

You can create annotations from an annotation target or from a term. However, labeled elements, properties, records, and even annotations themselves can also contain embedded annotations.

Example

In the following example, an annotation has been created from an annotation target.

DATA:

      lo_ann_target TYPE REF TO /iwbep/if_mgw_vocan_ann_target,  " Vocabulary Annotation Target

      lo_annotation TYPE REF TO /iwbep/if_mgw_vocan_annotation.  " Vocabulary Annotation

 

lo_ann_target = vocab_anno_model->create_annotations_target( 'Products' ).

lo_annotation = lo_ann_target->create_annotation( iv_term = 'Org.OData.Core.V1.OptimisticConcurrencyControl' ).
 

In the metadata document, this is reflected as follows:

<Annotations xmlns="http://docs.oasis-open.org/odata/ns/edm" Target="Products">
<Annotation Term="Org.OData.Core.V1.OptimisticConcurrencyControl"/>
</Annotations>
 
Methods

Methods available for /IWBEP/IF_MGW_VOCAN_ANNOTATION

Method

Function

CREATE_ANNOTATION

Creates an annotation within an annotation

CREATE_COLLECTION

Creates a collection

CREATE_RECORD

Creates a record

CREATE_FUNCTION

Creates a function

CREATE_LABELED_ELEMENT

Creates a labeled element

CREATE_SIMPLE_VALUE

Creates a simple value

CREATE_URL

Creates a URL