SampleSampletypeA worked example you read or clone. Evidence: it demonstrates, it never provides.See every one →What this type is →independently maintainedindependently maintainedoriginPublished by one person or a small company outside SAP. Says nothing about quality; the readings say that.See every one →Starting point

pyapi4abap

A template that pairs a Python FastAPI service with ABAP demo reports calling it through an SM59 RFC destination, with a step-by-step guide from the first endpoint to a container image.

Three demo endpoints and the ABAP that calls them: /hello as an HTTP GET, /check as a GET with parameters and /process as a POST, with one ABAP report per method in the abap folder, installed with SE38 and pointed at an SM59 destination of type G. The guide runs from creating the Python project, through exposing the service and maintaining the destination with SSL where the service uses HTTPS, to building a container image and deploying it. The ABAP half uses the B-Tocs ABAP SDK, and the reports show creating a connector object, setting the endpoint, reading the response and its content type, and building and parsing JSON. Where no network route runs from the SAP system to the service, the maintainer names an ngrok tunnel as a workaround for developer scenarios, and an ABAPer with no Python interest can skip the Python part and start the stack as a local container.

Facts

Last pushLicenceMIT

Where it sits

Lives in
Add-on to
B-Tocs ABAP SDKB-Tocs ABAP SDKartifactAn ABAP package that carries the outbound web service call for an SAP ABAP server, with the utility and security classes it needs under it and one plugin per integration on top.
Requires
B-Tocs ABAP SDKB-Tocs ABAP SDKartifactThe ABAP side of the template: the demo reports call the API through the SDK's connector and logger.
Optional
DockerDockeroutside the atlasRunning the Python stack as a container, the route the README gives for skipping the Python part and the one the deployment steps build on.container engine

Who is behind it

B-Tocs.org CommunityB-Tocs.org CommunityPersonMaintains this
In the atlas: maintains 6, contributes to 5
@b-tocs
maintainer

What it declares

Every artifact

Type
Sample
Origin
Independently maintained

As a sample

Form
does not say

Connections2

README

quoted from b-tocs/pyapi4abap under MIT, read
b-tocs/pyapi4abap/README.mdOn GitHub

B-Tocs Python API Template for SAP ABAP

B-Tocs Logo

This repository is a simple template for building Python based APIs for SAP ABAP and multi target scenarios. The python API based on FastAPI. For the ABAP part the B-Tocs ABAP SDK is used.

Big Picture

This project handles the following aspects:

  1. Create a python based API
  2. Call this API from SAP ABAP systems
  3. Create a cloud native container for multi target deployment
Multi Target Container SAP ABAP System B-Tocs pyapi4abap demo code B-Tocs ABAP SDK Deployment Target Data Center On-Prem Data Center HyperScaler SAP BTP SaaS Python API for ABAP Service sap_hello-- sap_check-- sap_process-- SAP Demo for /hello - HTTP GET SAP Demo for /check - HTTP GET with params SAP Demo for /process - HTTP POST sdkcore-- container_at_home container_at_3rd_party container_at_hyperscaler container_at_sapbtp container_at_saas

Step-By-Step Guide

  1. Create a python based API
    1. Install requirements - python, git, vsc
    2. Create a new python project
    3. Check the code and API
  2. Call this API from SAP ABAP systems
    1. Expose API to the internet
    2. Connect SAP to the API
    3. Call the API endpoints from ABAP programs
    4. Enable API Debugging
  3. Create a cloud native container for multi target deployment
    1. Build and start local docker container
    2. Deploy the container image to a container registry
    3. Use a container image for a target platform
For ABAPers without Python interests

You can skip part 1 of the Step-By-Step Guide and start the python stack as local container as described in 3.3. Continue with 2.1 "Expose API ...".

FAQ

Where I can get more examples for using the B-Tocs ABAP SDK?

Check the project site of the B-Tocs ABAP SDK. There are some other projects listed using this SDK. The projects LibreTranslate and Ollama are recommended for this.

How I can add more description and configuration to the swagger UI?

Check the FastAPI documentation.


last updated: 16.05.2024 mdjoerg

MIT, read

Details

Sources3
GitHub APIdiscovered herechecked
github.com/b-tocs/pyapi4abaptree, pushes, contributors, CIchecked
README.mdquoted, and what the entry declareschecked

Sources are graph entities: the same page may back several entries, and an unreachable source flags every row that rests on it.

Compatibility and provenance
discovered viaGitHub API
first seen in the atlas
ecosystem and domainabap, protocols-and-apis
History in the atlas1
  1. First seen.
For your agent
Ref
artifact:b-tocs-pyapi4abap
JSON
/artifacts/b-tocs-pyapi4abap.json
MCP
Connecting an agent