Ready to get started?

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

 Download Now

Learn more:

SAP Ariba Procurement Icon SAP Ariba Procurement ODBC Driver

The SAP Ariba Procurement ODBC Driver is a powerful tool that allows you to connect with live data from SAP Ariba Procurement, directly from any applications that support ODBC connectivity.

Access SAP Ariba Procurement data like you would a database - read, write, and update SAP Ariba Procurement 0, etc. through a standard ODBC Driver interface.

Connect to SAP Ariba Procurement Data from PowerBuilder



This article demonstrates how to use the CData ODBC Driver for SAP Ariba Procurement to connect to SAP Ariba Procurement data and execute queries in PowerBuilder.

The CData ODBC Driver for SAP Ariba Procurement can be used from any platform or development technology that supports ODBC, including PowerBuilder. This article shows how to connect to SAP Ariba Procurement data and execute queries from the Database Painter and controls such as the DataWindow.

Connect to SAP Ariba Procurement as an ODBC Data Source

If you have not already, first specify connection properties in an ODBC DSN (data source name). This is the last step of the driver installation. You can use the Microsoft ODBC Data Source Administrator to create and configure ODBC DSNs.

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.

Create a Profile for the ODBC Driver for SAP Ariba Procurement

Follow the steps below to use the Database Painter tool to create a database profile based on an ODBC DSN (data source name) for SAP Ariba Procurement. In the Database Painter, you can use wizards and the UI to work with SAP Ariba Procurement data.

  1. In PowerBuilder, click Tools -> Database Painter.
  2. In the Objects window in the Database Painter, right-click the ODBC node and click New Profile.
  3. On the Connection tab, enter a name for the profile and select the SAP Ariba Procurement DSN in the Data Source menu.
  4. To view and modify a table, right-click a table and then click Edit Data -> Grid.

Using SAP Ariba Procurement Data with PowerBuilder Controls

You can use standard PowerBuilder objects to connect to ODBC data sources and execute queries. The following example shows how to retrieve SAP Ariba Procurement data into a DataWindow. You can add the following code to the open method:

SQLCA.DBMS = "ODBC" SQLCA.DBParm = "ConnectString='DSN=CData SAPAribaProcurement Source'" CONNECT USING SQLCA; dw_orders.SetTransObject(SQLCA); dw_orders.Retrieve();