Skip to content

SAP-samples/abap-odata-client-proxy-samples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

OData Client proxy samples

REUSE status

Description

The OData Client proxy allows to consume OData services but also pure REST services programmatically using ABAP. The following sample code can be used to perform more complex requests than the ones that are provided as code snippets within the ABAP Development Tools in Eclipse.

It also contains a sample for the consumption of a pure REST service.

CP REST sample

This sample code uses the well-known Swagger Petstore Sample which can also be found on GitHub.

It shows how the OData proxy client can be used to also consume pure REST services that are no OData service.

In the ABAP sample code you will have to replace the constant petstore_url.

CONST: petstore_url type string value ‘’ .

with the URL that points to the hosted version that is described in the above mentioned GitHub repository or an instance that you are running on your own.

Requirements

The ABAP code can be used on:

  • SAP BTP, ABAP Environment
  • SAP S4HANA Cloud, ABAP Environment
  • SAP ABAP Platform 2021 and later

Download and Installation

  1. Create a package (e.g.) TEST_CP_REST_SAMPLE
  2. Start the report ZABAPGIT or ZABAPGIT_STANDALONE depending on what you have installed in your system
  3. Create an offline repository or an online repository with the package and with the URL of this GitHub repository
  4. Pull changes
  5. Use mass activation to activate the objects that have been imported in step 3

Known Issues

How to obtain support

Create an issue in this repository if you find a bug or have questions about the content.

For additional support, ask a question in SAP Community.

Contributing

If you wish to contribute code, offer fixes or improvements, please send a pull request. Due to legal reasons, contributors will be asked to accept a DCO when they create the first pull request to this project. This happens in an automated fashion during the submission process. SAP uses the standard DCO text of the Linux Foundation.

License

Copyright (c) 2022 SAP SE or an SAP affiliate company. All rights reserved. This project is licensed under the Apache Software License, version 2.0 except as noted otherwise in the LICENSE file.

About

Sample code to show customers and partners how to use the OData client proxy API to call public REST and OData services.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages