docs

Property Metadata Binding

An extended data binding syntax makes it possible to access the metadata for certain properties of an entity in OData services, such as heading, label, and precision.

The extended data binding syntax is only valid for property bindings. The annotations can be addressed either absolute or relative to a data path.

The consumption of label and description within an application is an example for a possible integration. Instead of copying the corresponding label text to a properties file, which in turn will be translated, a developer can bind a label against the label metadata field for the respective input field. This implies that annotations from metadata can also be language-dependent and would have to be translated as well.

Let the following annotation be provided in the service metadata or an additionally loaded metadata file, such as annotations0.xml :

<Property Name="CompanyName" Type="Edm.String" MaxLength="80" sap:label="Company Name"/>

The binding must then know the metadata part of the binding expression. The path to metadata therefore has to start with /#.