Show TOC

Annotations Locate 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.

Example Example

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

End of the example.
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.

Syntax Syntax

Setting AnnotationPath (backend):

  1. 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' ).
    
End of the code.

Syntax Syntax

AnnotationPath in metadata definition (Gateway Client example):

  1. <Annotations Target="EPMDemo.PurchaseOrderItem" xmlns="http://docs.oasis-open.org/odata/ns/edm">
    <Annotation Term="org.example.display.DisplayName"/>
    <LabeledElement Name="CustomerFirstName" AnnotationPath="Name/ThisIsMyPath"/>
    </Annotation>
    </Annotations>
End of the code.