0% found this document useful (0 votes)
53 views29 pages

Odata + UI5

This document discusses several topics related to APIs and web development including: 1. SAP Annotations for OData Version 2.0 and OData URI conventions 2. The REST architectural style constraints of uniform interface, statelessness, cacheability, being client-server, layered, and optionally code on demand. 3. The differences between REST (using resources and representations) and SOAP (using actions). 4. Using HTTP methods and URIs to work with OData APIs and identify resources. 5. Benefits of JSON over XML such as being lighter weight. 6. Some SAP-specific APIs and transactions including for traces, cache cleanup, image upload/download.

Uploaded by

sidhishkumar223
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views29 pages

Odata + UI5

This document discusses several topics related to APIs and web development including: 1. SAP Annotations for OData Version 2.0 and OData URI conventions 2. The REST architectural style constraints of uniform interface, statelessness, cacheability, being client-server, layered, and optionally code on demand. 3. The differences between REST (using resources and representations) and SOAP (using actions). 4. Using HTTP methods and URIs to work with OData APIs and identify resources. 5. Benefits of JSON over XML such as being lighter weight. 6. Some SAP-specific APIs and transactions including for traces, cache cleanup, image upload/download.

Uploaded by

sidhishkumar223
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 29

https://wiki.scn.sap.com/wiki/display/EmTech/SAP+Annotations+for+OData+Version+2.

https://api.covid19api.com/?$metadata

https://www.odata.org/documentation/odata-version-2-0/uri-conventions/

https://blogs.sap.com/2016/07/24/update-process/ “ update process

Tcode

/IWFND/MAINT_SERVICE

REST(Representational state transfer) API

The REST architectural style describes six constraints.

1- Uniform Interface
2- Stateless
3- Cacheable
4- Client- Server
5- Layered system
6- Code on Demand(optional)

REST Vs SOAP

Resources Action

(Employee,Customer,Sales Order) {GetEmployee,GetCoustomer,getOrder}

We identify the resources in the RESTful API through URI.

URL is one of the form of URI.

Representation—JSON and xml

JSON is very light weight so it very popular in web programming.(30-40% lighter than XML file).

Getting the representation of the resource(copy of resource not the reference to the resource).
we use http method in OData API
OData Trace ‘/IWFND/TRACES’

Cache Clean ‘/IWFND/CACHE_CLEANUP’


Image upload/download

In define method of class MPC_EXT class

1- Content-Type
2- Slug
In the post command you need to add the headers “Content-Type” and “slug”. For example for PDFs
content type should be “application/pdf” and slug needs to contain the key – in my case filename.
Note that if you use Gateway client tool you don’t have to supply content type parameter.
Query URL

https://www.odata.org/documentation/odata-version-2-0/uri-conventions/

UI5
Aggregation
Event Object
Hooker Methods
Formatter:

Resource Model
Fiori App---
Accessing this pointer in asysn call.
Component.JS
Ques
SEPM_DG --- Regenerate the EPM data

Bapi_epm_product_get_list

S_nwdemo_model_ddic

You might also like