How to test REST Http Client with SAP report

Published on September 29, 2016 by Daniel Lanza

 sap

This tutorial will explain how to check out if our SAP System can consume external or internal Web Services with a SAP report.

Requirements

Exercise

Firstly, find out what is your REST service to test. In this exercise we are going to consume an internal REST Web Service from a SAP Report.

GET -> http://hostname:port/zrest?myVar=50

Response:

{"message": You have entered myVar=50 as query parameter."}

Check the following post if you want to implement -> How to publish REST Web Service in SAP

Go to SE38 and find the following SAP report -> RSHTTP01.

Execute and fill up the parameters indicated in the following picture:

HTTP Client request
HTTP Client request

You will get the response.

HTTP Client response
HTTP Client response

This is a esay way to test external/internal REST Web Services connection without ABAP coding. If you get a 404 error code, ask the developer in charge of the REST Service or your SAP Basis Admin to fix connection problems.

comments powered by Disqus

See also

How to publish REST Web Service in SAP

This tutorial will explain how to publish REST Web Service when SAP Netweaver Gateway is not available. Exercise Go to http://hostname:port/zrest?myVar=50 and the server will respond with the following content: {"message": You have entered myVar=50 as query parameter."} Be in mind that this content could be JSON or XML format. In this exercise, it is a basic JSON object. Create custom class Firstly, create a class object with IF_HTTP_EXTENSION interface.

Read more

How to fill flight model in SAP Netweaver ABAP Trial 7.03 SP04

This tutorial will explain how to fill flight model in SAP Netweaver. Flight model Table Description Keys T000 Client client SCURX Currencies currency SBUSPART Business partner client, partner number STRAVELAG Travel agencies client, travel agency number SCUSTOM Customers client, customer number SCARR Carriers client, carrier ID SCOUNTER Sales counters client, carrier ID, sales counter number SPFLI Flight schedule client, carrier ID, connection number SFLIGHT Flights client, carrier ID, connection number, date of flight SBOOK Flight bookings client, carrier ID, connection number, date of flight, booking number, customer number Run the following report in SE38 transaction:

Read more

How to enable SOAMANAGER in SAP Netweaver ABAP Trial 7.03 SP04

This tutorial will explain how to enable SOAMANAGER in SAP Netweaver ABAP Trial 7.03. Requirements A virtual machine with: Windows 7 and SAP Netweaver ABAP Trial Web GUI for SAP Netweaver enabled Issue When accessing SOAMANAGER, error code 403 turns up. Error code 403 SOAMANAGER If we get error code 500, check Web GUI for Netweaver works properly. It is explained in the installation post Solution Go to SICF transaction, and activate the following service:

Read more