OData (Open Data Protocol) is an ISO/IEC approved, OASIS standard that defines a set of best practices for building and consuming RESTful APIs.
Apache Olingo.
Go through OData model in AS ABAP.
T-Code: SEGW
Project Structure.
Data Model:包括需要定义的entity,以及entity之间的关系,entity type定义数据结构,entity sets定义数据存取操作等。
Service Implementation:定义entity set的操作,包括CRUD。
Runtime Artifacts:包括SAP系统中生成的类。
Service Maintenance:service发布系统信息。
>>> [1] 具体教程参考:UI5开发 – 创建OData Model
Data Model:
Service Implementation:
Runtime Artifacts:
Service Maintenance:
>>> [2] 具体教程参考:UI5开发 – OData Model编程
基于DPC_EXT进行定制开发:
重写从基类继承的方法(定制开发所需):
PLANTSET_GET_ENTITY:
>>> [3] 具体教程参考:UI5编程 – 注册service到SAP gateway server
T-Code:/n/IWFND/MAINT_SERVICE
SAP Gateway Client:
XML format:
JSON format:
Postman API Toolkit:
Request header:
Response:
Chrome Toolkit:
XML format in Chrome:
JSON format in Chrome:
Reference: