We will use SAP provided GWSAMPLE_BASIC to create our first SAP Fiori Elements Application. This will make us familiar with the overall process of SAP Fiori Elements development.
7. Fill the project attributes. Click Finish.
The project gets created within PROJECTS workspace.
Add Annotations
Next, we will add annotations to the SalesOrder entity.
6. Click Insert Snippet.
The code is added to the annotation.xml
<edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" Version="4.0">
<edmx:Reference Uri="https://sap.github.io/odata-vocabularies/vocabularies/UI.xml">
<edmx:Include Namespace="com.sap.vocabularies.UI.v1" Alias="UI"/>
</edmx:Reference>
<edmx:Reference Uri="/sap/opu/odata/iwbep/GWSAMPLE_BASIC/$metadata">
<edmx:Include Namespace="GWSAMPLE_BASIC"/>
</edmx:Reference>
<edmx:DataServices>
<Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="zamarmn">
<Annotations Target="GWSAMPLE_BASIC.SalesOrder">
<Annotation Term="UI.LineItem">
<Collection>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="SalesOrderID"/>
<Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High"/>
</Record>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="CustomerID"/>
<Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High"/>
</Record>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="CustomerName"/>
<Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High"/>
</Record>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="GrossAmount"/>
<Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High"/>
</Record>
</Collection>
</Annotation>
</Annotations>
</Schema>
</edmx:DataServices>
</edmx:Edmx>
Run the application. Below is the output.
Adding annotation UI.HeaderInfo
...
<Annotations Target="GWSAMPLE_BASIC.SalesOrder">
<Annotation Term="UI.HeaderInfo" >
<Record Type="UI.HeaderInfoType">
<PropertyValue Property="TypeName" String="SALES ORDER"/>
<PropertyValue Property="TypeNamePlural" String="SALES ORDERS"/>
<PropertyValue Property="Title">
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="SalesOrderID"/>
</Record>
</PropertyValue>
</Record>
</Annotation>
<Annotation Term="UI.LineItem">
...
Deploy to SAP system