Show TOC

/IWBEP/IF_MGW_VOCAN_TERMLocate this document in the navigation structure

OData vocabulary annotation interface.

To create a term, you can use a syntax as shown in the example.

DATA: lo_term   TYPE REF TO /iwbep/if_mgw_vocan_term,   " Vocabulary Annotation Target

       ls_facets TYPE /iwbep/s_mgw_vocan_facets.         " facets


  ls_facets-max_length = 10.

  ls_facets-precision = 2.

  ls_facets-scale = 1.


  lo_term = vocab_anno_model->create_term( iv_name = 'My Term'

                                           iv_type = 'My Type'

                                           iv_facets = ls_facets ). 

In the metadata document, this is reflected as follows:

<Term Name="My Name" Type="My Type" MaxLength="10" Precision="2" Scale="1" xmlns=""/>