Ready to get started?

Download a free trial of the SAP Ariba Procurement Driver to get started:

 Download Now

Learn more:

SAP Ariba Procurement Icon SAP Ariba Procurement JDBC Driver

Rapidly create and deploy powerful Java applications that integrate with SAP Ariba Procurement.

Query SAP Ariba Procurement Data in DataGrip



Create a Data Source for SAP Ariba Procurement in DataGrip and use SQL to query live SAP Ariba Procurement data.

DataGrip is a database IDE that allows SQL developers to query, create, and manage databases. When paired with the CData JDBC Driver for SAP Ariba Procurement, DataGrip can work with live SAP Ariba Procurement data. This article shows how to establish a connection to SAP Ariba Procurement data in DataGrip.

Create a New Driver Definition for SAP Ariba Procurement

The steps below describe how to create a new Data Source in DataGrip for SAP Ariba Procurement.

  1. In DataGrip, click File -> New > Project and name the project
  2. In the Database Explorer, click the plus icon () and select Driver.
  3. In the Driver tab:
    • Set Name to a user-friendly name (e.g. "CData SAP Ariba Procurement Driver")
    • Set Driver Files to the appropriate JAR file. To add the file, click the plus (), select "Add Files," navigate to the "lib" folder in the driver's installation directory and select the JAR file (e.g. cdata.jdbc.saparibaprocurement.jar).
    • Set Class to cdata.jdbc.saparibaprocurement.SAPAribaProcurement.jar
    Additionally, in the advanced tab you can change driver properties and some other settings like VM Options, VM environment, VM home path, DBMS, etc
    • For most cases, change the DBMS type to "Unknown" in Expert options to avoid native SQL Server queries (Transact-SQL), which might result in an invalid function error
  4. Click "Apply" then "OK" to save the Connection

Configure a Connection to SAP Ariba Procurement

  1. Once the connection is saved, click the plus (), then "Data Source" then "CData SAP Ariba Procurement Driver" to create a new SAP Ariba Procurement Data Source.
  2. In the new window, configure the connection to SAP Ariba Procurement with a JDBC URL.

    Built-in Connection String Designer

    For assistance in constructing the JDBC URL, use the connection string designer built into the SAP Ariba Procurement JDBC Driver. Either double-click the JAR file or execute the jar file from the command-line.

    java -jar cdata.jdbc.saparibaprocurement.jar

    Fill in the connection properties and copy the connection string to the clipboard.

    In order to connect with SAP Ariba Procurement, set the following:

    • ANID: Your Ariba Network ID.
    • ANID: Specify which API you would like the provider to retrieve SAP Ariba data from. Select the Buyer or Supplier API based on your business role (possible values are PurchaseOrdersBuyerAPIV1 or PurchaseOrdersSupplierAPIV1).
    • Environment: Indicate whether you are connecting to a test or production environment (possible values are TEST or PRODUCTION).

    Authenticating with OAuth

    After setting connection properties, you need to configure OAuth connectivity to authenticate.

    • Set AuthScheme to OAuthClient.
    • Register an application with the service to obtain the APIKey, OAuthClientId and OAuthClientSecret.

      For more information on creating an OAuth application, refer to the Help documentation.

    Automatic OAuth

    After setting the following, you are ready to connect:

      APIKey: The Application key in your app settings. OAuthClientId: The OAuth Client Id in your app settings. OAuthClientSecret: The OAuth Secret in your app settings.

    When you connect, the provider automatically completes the OAuth process:

    1. The provider obtains an access token from SAP Ariba and uses it to request data.
    2. The provider refreshes the access token automatically when it expires.
    3. The OAuth values are saved in memory relative to the location specified in OAuthSettingsLocation.
  3. Set URL to the connection string, e.g., jdbc:saparibaprocurement:ANID=AN02000000280;API=PurchaseOrdersBuyerAPI-V1;APIKey=wWVLn7WTAXrIRMAzZ6VnuEj7Ekot5jnU;AuthScheme=OAuthClient;InitiateOAuth=GETANDREFRESH
  4. Click "Apply" and "OK" to save the connection string

At this point, you will see the data source in the Data Explorer.

Execute SQL Queries Against SAP Ariba Procurement

To browse through the SAP Ariba Procurement entities (available as tables) accessible through the JDBC Driver, expand the Data Source.

To execute queries, right click on any table and select "New" -> "Query Console."

In the Console, write the SQL query you wish to execute. For example: SELECT DocumentNumber, Revision FROM Orders WHERE OrderStatus = 'CHANGED'

Download a free, 30-day trial of the CData JDBC Driver for SAP Ariba Procurement and start working with your live SAP Ariba Procurement data in DataGrip. Reach out to our Support Team if you have any questions.