odbc-driver-for-abap-examples
SAP's example programs for the ODBC driver for ABAP, one subfolder per programming language, with the ABAP objects they use and a unixodbc configuration template for Unix clients.
Every example here needs the ODBC driver for ABAP installed on the client, which is downloaded from the SAP Marketplace; on Windows the standard ODBC driver manager is used, and on Unix unixodbc is required for almost all of them, with no other driver manager supported. The repository holds the examples sorted into a subfolder per language, a unixodbc configuration template, and a top-level ABAP folder with text representations of the ABAP objects most examples use, also released as an ABAP package. Features carry their own minimum versions: select from SAP system version 2021 FPS01 and driver 01.00.0000, call from 2025 / 2502 and driver 01.00.0018, insert and delete from 2025 / 2508 and driver 01.00.0021.
Facts
Where it sits
Who is behind it
In the atlas: maintains 222@SAP-samplesmaintainerHaasFrankMartinContributes to this
In the atlas: contributes to 1@D024110Guilherme DellagustinContributes to this
In the atlas: contributes to 27@dellagustin-saperlerbContributes to this
In the atlas: contributes to 1@erlerbLeon SternContributes to this
In the atlas: contributes to 1@leonstern4 contributors
What it declares
Every artifact
- Type
- Sample
- Origin
- By SAP
- Use as
- A reference
As a sample
- Form
- Code snippets
Connections
Connecting a data model and its queries to a database
Download
README
quoted from SAP-samples/odbc-driver-for-abap-examples under Apache-2.0, readExamples for the ABAP ODBC driver
Description
This repository contains examples for using the ODBC driver for ABAP in various programming languages.
Information on how to run the example programs and prerequisites can be found either as comments in the code or in readme.md files in the respective directories.
The folder examples contains the actual examples, most are sorted in subfolders for each programming language, the folder unix contains a configuration template for the unixodbc driver manager.
The top-level folder ABAP contains text representations of ABAP objects used in most examples.
The contents is also released as the ABAP package BASIS/SABP_MAIN/SABP/SABP_DBC2ABAP/SABP_DBC2ABAP_TEST, but some objects might not be available in older releases.
Additional ABAP folders may be present in sub-projects (e.g., devtoberfest_2025), each containing their own scenario. These are not necessarily included in the ABAP package mentioned above.
Requirements
All examples require the ODBC driver for ABAP to be installed on the client. It can be downloaded from the SAP Marketplace.
On Windows, the standard ODBC driver manager is used. For Unix systems, the ODBC driver manager unixodbc is required for almost all examples. Other driver managers are not supported.
Some features showcased in the examples have minimum version requirements:
| Features | SAP system version | ODBC driver version |
|---|---|---|
select | 2021 FPS01 | 01.00.0000 |
call | 2025 / 2502 | 01.00.0018 |
insert, delete | 2025 / 2508 | 01.00.0021 |
Download and Installation
The examples in this repository are provided as source code. They can be obtained by cloning the repository or by downloading individual files via the browser.
How to obtain support
Create an issue in this repository if you find a bug or have questions about the content.
The official documentation for the ODBC driver for ABAP exists in three flavours:
There is a number of SAP Technology blog posts discussing the various aspects of the ODBC driver for ABAP:
- Consuming CDS View Entities Using ODBC-Based Client Tools
- Using the ODBC driver for ABAP on Linux
- SQL Queries on CDS objects Exposed as SQL Service
- Access CDS Objects Exposed as SQL Services Using Microsoft SQL Server
- Data Science with SAP S/4HANA – How to connect HANA-ML with Jupyter Notebooks (Python)
- Build an Azure Data Factory Pipeline with the ODBC Driver for ABAP
- Taking Data Federation to the Next Level: Accessing Remote ABAP CDS View Entities in SAP HANA Cloud
- Expose and Use ABAP-Managed Database Procedures (AMDPs) in SQL Services
- Rust and ABAP ODBC
Contributing
Please see our guideline for contributions to SAP Open Source Software Projects.
Code of Conduct
Please see the SAP Open Source Code of Conduct.
License
Copyright (c) 2025 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.
Details
Sources
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
History in the atlas
- First seen.
For your agent
- Ref
artifact:sap-samples-odbc-driver-for-abap-examples- JSON
- /artifacts/sap-samples-odbc-driver-for-abap-examples.json
- MCP
- Connecting an agent