- 如何用 SAP BTP 平台上的图形建模器创建一个 OData
- Fiori-like Prototype ( SAP BTP 2
- SAP HANA Cloud 学习教程之二: 如何往SAP BT
- SAP OData服务性能测量的几种工具和手段
- 浅谈 SAP UI5 OData 模型构造函数的输入参数
- 使用 cf push 部署应用到 SAP BTP 时遇到错误消息
- Fiori-like Prototype ( SAP BTP A
- Fiori-like Prototype ( 2021 SAP
- 在 SAP BTP 里使用 SAP HANA Cloud 试用版
- SAP ABAP OData 服务嵌套创建功能的实现步骤(Cre
移动后端工具是一组工具,使开发人员能够对 OData 服务建模并生成 Java EE Web 应用程序以实现 OData 服务,以及在预先存在的数据库模式中自动创建必要的数据库表。
在本教程中,您将使用 SAP Business Application Studio 中的 MBT 图形建模器重建 SAP Gateway Demo 系统 (ES5) 上公开可用的 GWSAMPLE_BASIC OData 服务的一小部分。 因此,在进一步的教程中,您可以在其上扩展、连接和构建应用程序。
打开 SAP Business Technology Platform 上的 Business Application Studio,新建一个文件夹:
![](https://img.haomeiwen.com/i2085791/d955702a8325fb64.png)
命令栏里选择 MBT:New OData CSDL document(metadata)
![](https://img.haomeiwen.com/i2085791/3628aa019fd70beb.png)
![](https://img.haomeiwen.com/i2085791/6bc95481e7412e4b.png)
自动生成一个 metadata.csdl.xml 文件。创建一个新的 Complex types:
![](https://img.haomeiwen.com/i2085791/84e6f1612320d0ff.png)
根据实际业务需要,创建 Entity type,比如 SalesOrder 和 BusinessPartner:
![](https://img.haomeiwen.com/i2085791/409e76e3c9cca0f3.png)
根据实际需要,在图形建模器里,给 entity type 创建 property:
![](https://img.haomeiwen.com/i2085791/029cb1d65344c49c.png)
创建一个从 BusinessPartner 到 SalesOrder 的 Navigation Property,上图 Collection 前的 checkbox 记得勾上:
![](https://img.haomeiwen.com/i2085791/e0a3957366a9f04f.png)
![](https://img.haomeiwen.com/i2085791/674a4c3f41368625.png)
下图展示了从 BusinessPartner 到 SalesOrder 的 navigation 关系:
![](https://img.haomeiwen.com/i2085791/aee6767a1ff02fa8.png)
选择任务:MBT:Create tasks.json file:
![](https://img.haomeiwen.com/i2085791/c3fe9e93450d0605.png)
为 CloudFoundry Generate OData service:
![](https://img.haomeiwen.com/i2085791/e0078506ecc89789.png)
![](https://img.haomeiwen.com/i2085791/eeb0cdbfce716972.png)
选择基于 Java EE style 自动生成该 OData 服务的项目代码:
![](https://img.haomeiwen.com/i2085791/dc97cbfad73ae58d.png)
数据库类型,选择 H2 Database type:
![](https://img.haomeiwen.com/i2085791/1bb6a00bcc3e2fd9.png)
选择 metadata.csdl.xml, 点击 Open metadata:
![](https://img.haomeiwen.com/i2085791/53178bc689b092dd.png)
选择运行 task:csdl-to-war
![](https://img.haomeiwen.com/i2085791/c992df17f4f63def.png)
确保看到 Build Success 消息:
![](https://img.haomeiwen.com/i2085791/0ed6b5cf63cb6793.png)
对应的 CloudFoundry Java 应用已经处于运行状态了,代表该 OData 服务可以被消费了:
![](https://img.haomeiwen.com/i2085791/db1c94f4371239bd.png)
![](https://img.haomeiwen.com/i2085791/7ec593da2e0d6653.png)
更多Jerry的原创文章,尽在:"汪子熙":
![](https://img.haomeiwen.com/i2085791/97c4752c0e619c44.png)
网友评论