XSOData
Overview
The information on this page will help you learn how to develop the design-time data-persistence model for an XSK application using the XSODATA syntax.
Reference
SAP Help Portal
Sample
service namespace "products.odata" {
"products.db::Products.Orders" as "Orders"
navigates("Items4Orders" as "Items")
create events(before "products.xsjs:ProductsLib.xsjslib::beforeCreateOrder")
delete using "products.xsjs:ProductsLib.xsjslib::deleteOrder";
"products.db::Products.Item" as "Items"
create events(before "products.xsjs:ProductsLib.xsjslib::beforeCreateItem")
update forbidden;
association "Items4Orders" principal "Orders"("Id")
multiplicity "1" dependent "Items"("OrderId") multiplicity "*";
}
annotations {
enable OData4SAP;
}
More Details
Inside an *.xsodata
file we can specify which properties can be exposed using the 'with' and 'without' section:
service namespace "np" {
"sample.odata::table1" as "Table1" without ("COLUMN1");
"sample.odata::table2" as "Table2" with ("COLUMN1", "COLUMN2");
}
XSK XSODATA Annotations Support
SAP ODATA Annotations for XSOData XS2
SAP Annotations for OData Version 2.0
Annotation Element | Annotation Supportability |
---|---|
Element edm:Schema | |
Element edm:EntityContainer | |
Element edm:EntitySet | |
Element edm:EntityType | |
Element edm:Property | |
Element edm:NavigationProperty | |
Element edm:FunctionImport | |
Element sap:value-constraint | |
Element edm:Parameter | |
Element edm:AssociationSet |
If you want to check the whole list of annotations, visit the official SAP OData Annotations v2.X documentation.
- Supportable OData Service-Definition Features
FEATURES | SUPPORTED IN XSK | REMARKS |
---|---|---|
Aggregation | ||
Association | DONE | |
Key Specification | DONE | |
Parameter Entity Sets | ||
Projection | DONE |
HANA TableType | Supported type for OData |
---|---|
CALC VIEW | |
GLOBAL TEMPORARARY | |
SHARED TEMPORARARY | |
NO LOGGING TEMPORARY | |
SYNONYM | |
SYSTEM TABLE | |
TABLE | |
USER DEFINED | |
COLUMN VIEW | |
VIEW | |
JOIN VIEW | |
OLAP VIEW | |
HIERARCHY VIEW |