Show TOC

AnnotationsLocate this document in the navigation structure

SAP:Annotation "Security Level"

OData requests may contain confidential data in the URL which is visible in the browser. If such data shall not appear in the URL, we recommend to use batch requests instead.

You can enforce the generation of batch requests with a new SAP Annotation sap:use-batch="true" (metadata document). For this a method is available:

model->set_use_batch( abap_true ).

The metadata document will then contain the SAP Annotation sap:use-batch="true" in the entity container.


<EntityContainer Name="TEST_SRV_Entities" sap:use-batch="true"/>

Support OData Element "annotation path"

Based on vocabulary terms annotations can be created. With this feature it is possible to set an annotation path for the vocabulary annotation simple value.

Setting AnnotationPath (backend):

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' ).
lo_simp_value = lo_label_elem->create_simple_value( ).
lo_simp_value->set_annotation_path( 'Name/ThisIsMyPath' ).

AnnotationPath in metadata definition (SAP Gateway Client example):

<Annotations Target="EPMDemo.PurchaseOrderItem" xmlns="">
<Annotation Term="org.example.display.DisplayName"/>
<LabeledElement Name="CustomerFirstName" AnnotationPath="Name/ThisIsMyPath"/>