on 08-07-2015 6:11 PM
Dear experts
I have a question on the metadata of an oData service. Here is the service I have
<edmx:Edmx Version="1.0" xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx" xmlns:sap="http://www.sap.com/Protocols/SAPData">
<edmx:DataServices xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/
metadata" m:DataServiceVersion="2.0">
<Schema xmlns="http://schemas.microsoft.com/ado/2008/09/edm" Namespace="MySalesOrders">
<EntityType Name="SalesOrder">
<Key> <PropertyRef Name="SalesOrderNumber" /> </Key>
<Property Name="SalesOrderNumber" Type="Edm.String" sap:label="Sales Order Number" Nullable="false" MaxLength="10" />
<Property Name="TotalAmount" Type="Edm.Decimal" sap:label="Total Amount" Precision="16" Scale="3" sap:unit="Currency" MaxLength="10" />
<Property Name="Currency" Type="Edm.String" sap:label="Currency" MaxLength="5" sap:semantics="currency-code" />
<Property Name="CustomerID" Type="Edm.String" sap:label="Customer ID" MaxLength="10" />
<Property Name="CustomerName" Type="Edm.String" sap:label="Customer Name" MaxLength="35" />
as you see, some of the properties have additional information like sap:label, sap:unit and so on. Are these annotations???
Where can I use these information while building any UI5 app?
Thank you
Aakash
Hello Akash,
Here are some information for you
1. Yes, these are annotations. Anything that comes with 'sap:' are called SAP annotation.These are not defined in Official OData specification, these are defined by SAP to make the data more meaningful. There are many other examples of annotation. In SEGW you can create annotation bases projects which will contain many more complex more annotations.
2. They can be very useful in designing the UI.
For example: If you are displaying a feed in form of a UI5 table,
a. sap:label becomes your column heading
b. If sap:updatatble is true, then you may make your field editable in the UI5 table
There are smart template UIs, which are heavily dependent on complex annotations, but that is a different topic altogether.
Regards,
Atanu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Additionally, refer to the UI5 Development, this has the step by step development process, routing concepts, view, data binding and best practice. Go to Read me first and Building.
Hope this answers your question.
Regards,
Nagesh
You can refer to the below link for some information
https://help.sap.com/saphelp_nw74/helpdata/en/f5/aa4bb75c20445194494b264d3b3cd2/content.htm
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.