As mentioned in the introductory article SAP OData Development Tutorial - From Getting Started to Upgrading (including SEGW, RAP and CDP) , SAP OData service development, technically speaking, can be divided into three categories. Therefore, this tutorial is also divided into three parts, which will be introduced separately. This article is the article directory for this tutorial.
About the Author
Jerry Wang, joined the SAP Chengdu Research Institute after graduating from the University of Electronic Science and Technology of China with a master's degree in computer science in 2007. Jerry is a SAP Community Mentor and a SAP China Technology Ambassador. In his 15-year career in SAP standard product development, Jerry has participated in the research and development of standard products such as SAP Business ByDesign, SAP CRM, SAP Cloud for Customer, SAP S/4HANA, and SAP Commerce Cloud (e-commerce cloud).
Jerry has in-depth research on the development, testing, publishing, deployment, testing of SAP OData services, as well as the behind-the-scenes technical implementation details and usage scenarios of OData services based on various SAP technologies.
Development tutorial based on SEGW - Gateway Service Builder
- 1. Create a SAP OData project in the SAP ABAP transaction code SEGW
- 2. Configure and test the OData service created by the transaction code SEGW in the SAP ABAP system
- 3. How to use the SAP ABAP OData service diagnostic tool/IWFND/ERROR_LOG
- 4. Implementation Guide for GET_ENTITYSET Method of SAP ABAP OData Service Data Provider Class
- 5. How does the SAP ABAP OData service support the $filter operation
- 6. Use Postman tool to efficiently manage and test SAP ABAP OData service
- 7. How does the SAP ABAP OData service support the $orderby (sort) operation
- 8. How does the SAP ABAP OData service support the Create operation
- 9. How does the SAP ABAP OData service support the Delete operation
- 10. How does the SAP ABAP OData service support the update (Update) operation
- 11. Use HTTP PUT, PATCH and MERGE request to consume SAP ABAP OData service modification operation implementation and its differences
- 12. How does SAP ABAP OData service support $select to selectively read only part of model field values
- 13. Implementation of paging loading datasets for SAP ABAP OData service (Paging)
- 14. Introduction of performance evaluation and testing tools for several SAP ABAP OData services
- 15. Difference between EntityType and EntitySet in SAP ABAP OData service
- 16. How to modify SAP ABAP OData model to support $expand operation
- How to return data of multiple nodes in the same HTTP request through SAP ABAP OData $expand operation
- More articles are being written, so stay tuned
Develop OData services using the Restful ABAP Programming model (RAP for short)
- Currently writing, stay tuned
Develop OData services using the SAP Cloud Application Programming programming model
- Currently writing, stay tuned
In the previous article of this tutorial, we have completed the necessary OData model-level enhancements to support the $expand operation defined by the OData protocol:
16. How to modify SAP ABAP OData model to support $expand operation
These model enhancements are done in the ABAP server transaction code SEGW
.
We created in SEGW Authors
the Navigation Properties, which is described by the Relationship named BookAuthor
, according to the book_guid
field of the two Entity Types of Book and Author The navigation relationship between these two nodes is established, that is, through a Book instance, we expect to read all its Authors data through the $expand
operation:
In Postman, through the following url, in the same HTTP request, read the Book and its associated Author information at the same time:
https://{{host}}:{{port}}/sap/opu/odata/sap/ZBOOK_MANAGE_SRV/BookSet(guid'42010aee-2a94-1edd-8494-c9d14e91555e')?$expand=Authors
The green Authors after $expand=
is the field name of Navigation Property.
Let's first look at the effect achieved after developing according to the steps described in this article: In Postman, through a single HTTP request, all field values from the book node (yellow) and author node (green) are successfully read:
The remainder of this article begins by describing how to implement the OData model's DPC classes to support $expand
operations.
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。