Show TOC

/IWBEP/IF_MGW_VOCAN_LABEL_ELEMLocate this document in the navigation structure

Use

OData vocabulary annotation interface and methods.

You can create labeled elements from annotations and functional parameters.

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_label_elem TYPE REF TO /iwbep/if_mgw_vocan_label_elem. " Vocabulary Annotation Labeled Element

 

 lo_ann_target = vocab_anno_model->create_annotations_target( 'EPMDemo.PurchaseOrderItem' ).

 lo_annotation = lo_ann_target->create_annotation( iv_term = 'org.example.display.DisplayName' ).

 lo_label_elem = lo_annotation->create_labeled_element( 'CustomerFirstName' ).
 

In the metadata document this is reflected as follows:

<Annotations xmlns="http://docs.oasis-open.org/odata/ns/edm" Target="EPMDemo.PurchaseOrderItem">
<Annotation Term="org.example.display.DisplayName">
<LabeledElement Name="CustomerFirstName"/>
</Annotation>
</Annotations>
 
Methods

Methods available for /IWBEP/IF_MGW_VOCAN_LABEL_ELEM

Method

Function

CREATE_ANNOTATION

Creates an annotation

CREATE_COLLECTION

Creates a collection

CREATE_RECORD

Creates a record

CREATE_FUNCTION

Creates a function

CREATE_SIMPLE_VALUE

Creates a simple value

CREATE_URL

Creates a URL