Introduction
In our previous blog we saw how to read JIRA data in SQL Server. Now let’s learn how to Import SAP S/4HANA OData Service Data Into MS Access. SAP S/4HANA provides OData REST API interface to access data in your application using HTTP Protocol. We will use ODBC XML Driver to read SAP data and load into MS Access.
So, let’s get started.
Requirements
- A first requirement, make sure that Microsoft Access installed
- Finally, make sure to have ZappySys ODBC PowerPack installed.
About SAP HANA / OData REST API Service
You can expose your SAP Data using ODATA REST API Service. Here is a good article which shows how to expose data as OData Service. For more information on SAP OData Service feature check this SAP help page. If you are new to OData Standard then read here to know more how OData can facilitate data extraction using HTTP REST API. If you need Sample XML based OData Service then use below test URLs.
1 2 3 4 5 |
https://services.odata.org/Northwind/Northwind.svc/ https://services.odata.org/Northwind/Northwind.svc/Customers https://services.odata.org/Northwind/Northwind.svc/Orders https://services.odata.org/Northwind/Northwind.svc/Invoices https://services.odata.org/Northwind/Northwind.svc/Products |
Now let’s look at how to read SAP Data using ODBC Driver. At this point we assume you have exposed your data as OData Endpoint.
Read SAP S/4HANA data using XML Driver
First let’s look at steps to configure XML Driver. We will read data from SAP S/4HANA OData Service and then in next section we will look at how to load data into MS Access or other target.
- First, Windows search, write ODBC and select the ODBC Data sources (32 bits)
- As a second step, in ODBC Data source Administrator press the Add button.
- In this step, create the new data source, select ZappySys XML Driver.
- Now edit that XML data source to configure it. Enter your OData Service URL its typically like below. Replace 3 parts with your own value (i.e. replace {MY-INSTANCE}, {MY-PROJECT}, {MY-TABLE})
1https://{MY-INSTANCE}/sap/opu/odata/sap/{MY-PROJECT}/{MY-TABLE}
1https://myXXXXXX-api.s4hana.ondemand.com/sap/opu/odata/sap/MyTestProject/PurchaseOrders - Now go to Data Format / Compression (Zip/GZip) tab and select Data Format as OData to get all the records.
- Finally, now using Query Builder and Code Generator we will generate the query and click on Preview the data.
- That’s it we are ready to load SAP S/4HANA OData Service data to MS Access.
Load SAP S/4HANA OData Service in MS Access
- In MS Access, go to External Data Ribbon and select New Data Source and select From Other Sources and ODBC Database.
- Select the Source and destination of the data, select Import the source data into a new table in the current database and press OK.
- Select your newly created JSON Driver Data Source and click OK.
- Select tables from the list of tables in the Import Objects screen and click OK.
- Select Save Import Steps from the screen and click on Save Import button.
- That’s it If everything is OK, you will be able to see the data.
How to link REST API data to Access
The linking process is very similar to importing data into the Access table. Follow steps of the previous paragraph – How to import REST API data to Access – but on step 2 select the second option to create a linked table instead. Then at last it’s asked to select a unique record identifier, don’t select anything:
SAP S/4HANA Integration with Other BI Tools
BI / Reporting Tools Integration |
ETL Tools Integration | Programming Languages Integration |
|
|
|
Troubleshooting Errors
While running in Access\Excel\other and reading data from DSN created with ODBC PowerPack, if you get this error "License type [ODBC_PP_TRIAL] not found or its expired"
Please refer to this article for the same: Troubleshooting "License type [ODBC_PP_TRIAL] not found or its expired" error in Microsoft Access
Conclusion
So in this blog, we learned how to Import SAP S/4HANA OData Service Data in Access using ODBC XML / SOAP API Driver in a very simple way. You can achieve many more functionalities with this tool. Check our blogs/articles on XML File / REST API Driver to find out what this tool is capable of more.
References
Finally, you can use the following links for more information about the use of SAP S/4HANA OData Service with our tools:
- SAP API Business Hub
- Landing Page for ODBC XML / SOAP API Driver, you can also find Tutorial Video here.
- Help File: Documentation of XML Driver.
- Blog/articles link: https://zappysys.com/blog/category/odbc-powerpack/odbc-drivers/xml-soap-api-driver/