头图

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

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

When the author just learned SAP ABAP OData service development, the difference between the two concepts of EntityType and EntitySet has always been plausible, so I wrote an article to emphasize it.

When to use EntitySet?

Therefore, when we use the OData request to read the business data corresponding to the model, semantically speaking, what is read is the business data set in the system, so the name of the EntitySet must be maintained in the OData request url, and it must be maintained correctly.

Let's see a practical example: we use the following url in Postman to read the detailed data of a certain book:

https://{{host}}:{{port}}/sap/opu/odata/sap/ZBOOK_MANAGE_SRV/BookCollection(guid'42010aee-2a94-1edd-8494-c9d14e91555e')

The url fragment BookCollection is the EntitySet automatically created for us by the SEGW transaction code. It seems that there is no problem with the syntax.

After executing it, I get an HTTP 404 error:

Why do I specify the name of the EntitySet, but the data read request still reports an error?

We follow the method described in this step of this tutorial to check the root cause of the 404 error in the background:

3. How to use the SAP ABAP OData service diagnostic tool/IWFND/ERROR_LOG

See the error message:

The request URL or the metadata definition is incorrect.

For specific solutions, see this article .


注销
1k 声望1.6k 粉丝

invalid