Presentation is loading. Please wait.

Presentation is loading. Please wait.

REST Client Tutorial by Pavan Ethic Coder

Similar presentations


Presentation on theme: "REST Client Tutorial by Pavan Ethic Coder"— Presentation transcript:

1 REST Client Tutorial by Pavan Golesar @ Ethic Coder

2 Chrome Add-on

3 Prerequisite Installation of (Add-on) Advance Rest Client on system (refer description) Link SAP Gateway and REST Client Integration (.pdf) is shown in description of this video or you may refer to blog PDF section User Management (User Self-Service) OData Service Basic knowledge of API Tools like POSTMAN or Advance Rest Client References: - Pavan Golesar Self Made Notes YouTube Channel Ethic Coder - SAP Tutorials for Beginners and Learners

4 Basic Questions over this topic
How to perform GET operation in REST Client? How to create user in SAP using User Self Service? How to test OData Services using API TOOL-- REST Client! Testing User Management OData Service ! Testing OData Service using Rest Client ! OData Service Testing using Json format for POST operation? How to perform POST Operation in REST CLIENT ? How to add headers in REST Client? How to use "ADVANCE REST CLIENT" ?

5 Some imp points to remember
You will mostly work with "Method", "Headers" and "Body" tabs. Choose the appropriate method on "Method" tab. If you are using a GET method, then you don't need to use "Headers" or "Body" tab. If you are using a PUT or a POST, then put your XML in "Body" tab and add application/atom+xml as "Content-Type" header on "Headers" tab. If you are trying to run a GET method followed by PUT or POST, you do not need to delete the contents of "Headers" and "Body" tabs. They will be promptly ignored. Don't forget to use "https" instead of "http".

6 Problems and Solutions
Error Message at Client: While calling a service operation through REST client, you encounter RFC call ended with "System Failure" exception” Error Analysis: This is a very common error while using the RFC tool in Service Builder. There can be many reasons for this error and error can be pin pointed by looking at the back-end error log. One other option is to go to your Data Provider Class (DPC) and find the place where RFC is called and put a external breakpoint and debug. Common problems Mandatory parameters are not supplied to RFC, Problem with RFC destination, Problem with the RFC itself (interface changed, not active etc.)

7 Problems and Solutions
Error Message at Client: The specified HTTP method is not allowed for the resource identified by the Data Service Request URI Error Analysis: For each http method you need to be aware of the right URI convention. Common problems: For a ‘POST’ method URI should point to a Collection. Example:  ….. /sap/opu/odata/<NameSpace>/<ServiceName>/<CollectionName> For a ‘PUT’ and ‘DELETE’ methods URI should point to an Entry. Example: ….. /sap/opu/odata/<NameSpace>/<ServiceName>/<CollectionName>(<keys and values>) If you are using a $batch, the request has to be a 'POST'

8 Problems and Solutions
Error Message at Client: While executing a query/read, encountered In the context of Data services and unknown error occurred Error Analysis: This is usually problem with the properties involving Date, Time, UoM etc. There seems to be problem with RFC model importer in Service Builder. Common problems: If your RFC/model has a date property, check that it is of type Edm.DateTime and Precision is 0. Service Builder usually gives a Precision as 8. After changing it to 0, generate the runtime artifacts again, clear the cache and run the operation.

9 References www.abaper.weebly.com SCN.sap.com
Pavan Golesar’s Self made notes 2017


Download ppt "REST Client Tutorial by Pavan Ethic Coder"

Similar presentations


Ads by Google