This driver provides single-point access to multiple ODBC data sources via ODBC. This product supplies reliable data access to any HMI, SCADA, Historian, or Enterprise application that supports OPC, DDE, FastDDE, and SuiteLink.
Note that we have renamed the original table columns to use mixed-case names.The Advanced Simulator Driver was designed to plug into our industrial based communications server product. Currently, only CDS view entities can be exposed to ODBC consumers.Īfter defining the new CDS view entities, the definition may look as follows. On the next screen, select “Define View Entity” and click “Finish”. To do this, right click on the tables in the project explorer in ADT, then select “New Data Definition” and fill out the data requested in the following pop up. The new CDS view entities will be called ZORDERSVIEW and ZORDERITEMSVIEW. We create CDS view entities on top of the two tables, using the ADT wizard. Insert zorderitems from table sy-dbcnt ).
( orderid = '3' pos = '1' item = 'Bottle Water' amount = '5' ) ( orderid = '2' pos = '2' item = 'Apple' amount = '5' ) ( orderid = '2' pos = '1' item = 'Orange' amount = '10' ) ( orderid = '1' pos = '3' item = 'Orange Juice' amount = '2' ) ( orderid = '1' pos = '2' item = 'Banana' amount = '5' ) ( orderid = '1' pos = '1' item = 'Apple' amount = '5' ) We have also created some test data in the tables with the following ABAP sample code: class zcl_fill_orders definitionĭata: lt_orderitems type table of zorderitems. The definition in ADT looks as follows: : : : : : #RESTRICTEDĬreationdate : : 'ORDER : : : : #RESTRICTED
As an example, we have chosen two demo table entities ZORDERS and ZORDERITEMS. We first created a package Z_PACKAGE_SQL, where we place our test objects.
The blog describes how to use the ODBC driver for ABAP on Linux.
We plan to describe o ther use cases for the new ODBC driver in other blog post s.
The “ODBC driver for ABAP” itself is available on Windows and Linux. In this blog post, we will show the Microsoft Excel use case on W in dows. The ODBC application could be any c lient t ool capable of loading an ODBC driver or it could be a program written in a program language capable of using an ODBC driver ( e.g. To access CDS view entities in an ABAP system via ODBC, th e se entities first need to be properly exposed in the back – end system before accessing them via the “ODBC driver for ABAP” in an ODBC application. Only read access to the exposed ABAP CDS objects is allowed. In its current version, the “ODBC driver for ABAP” supports the use of a technical user in the ABAP system, with privileged access (no DCLs) only. Data from different entities can be joined in an ad-hoc fashion and data can be aggregated for analytical queries. Ĭompared to the ODATA interface, the ODBC interface has the advantage that it allows unrestricted SQL access to all exposed ABAP CDS view entities.
Full ABAP SQL semantics apply and even application-server-level buffering can be used as well as ABAP-level access control and read access logging. In this case, authentication and authorization is done using an ABAP user. ABAP-level security concepts are bypassed.Īll those problems go away when you treat the ABAP system itself as a database by accessing the ABAP system directly using ODBC. Database session variables are only set correctly if a view is accessed from the ABAP system. Typecasts might not be performed as expected, for example, NUMC data types might not be correctly padded, or currency data might not be correctly shifted. Names and internal structures in the ABAP database might not be stable because the lifecycle is managed by the ABAP system. Some of the problems are listed in SAP Note 2511210. Direct SQL read access to the underlying SAP HANA database of an ABAP system is not a good choice. There are situations where you would like to have external SQL read access to CDS objects owned by the ABAP system. Open Database Connectivity (ODBC) is a standard API for accessing databases. In this blog post, we would like to show you how you can access CDS view entities in an ABAP system using SQL via ODBC.