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.
This project handles the following aspects:
- Create a python based API
- Call this API from SAP ABAP systems
- Create a cloud native container for multi target deployment
flowchart LR
subgraph cloud-native-container["Multi Target Container"]
pyapi4abap["Python API for ABAP Service"]
end
subgraph sap["SAP ABAP System"]
subgraph demo_code["B-Tocs pyapi4abap demo code"]
sap_hello["SAP Demo for /hello - HTTP GET"]
sap_check["SAP Demo for /check - HTTP GET with params"]
sap_process[SAP Demo for /process - HTTP POST]
end
subgraph sdk["B-Tocs ABAP SDK"]
sdkcore-->pyapi4abap
end
sap_hello-->sdkcore
sap_check-->sdkcore
sap_process-->sdkcore
end
subgraph cloud-native-world["Deployment Target"]
subgraph onpremise["Data Center On-Prem"]
container_at_home
end
subgraph datacenter["Data Center"]
container_at_3rd_party
end
subgraph hyperscaler["HyperScaler"]
container_at_hyperscaler
end
subgraph sapbtp["SAP BTP"]
container_at_sapbtp
end
subgraph saas["SaaS"]
container_at_saas
end
end
pyapi4abap --> container_at_home
pyapi4abap --> container_at_3rd_party
pyapi4abap --> container_at_hyperscaler
pyapi4abap --> container_at_sapbtp
pyapi4abap --> container_at_saas
- Create a python based API
- Call this API from SAP ABAP systems
- Create a cloud native container for multi target deployment
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 ...".
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.
Check the FastAPI documentation.
last updated: 16.05.2024 mdjoerg