Connect to SAP SuccessFactors Data from PowerBuilder

Ready to get started?

Download for a free trial:

Download Now

Learn more:

SAP SuccessFactors ODBC Driver

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

Access SAP SuccessFactors data like you would a database - read, write, and update SAP SuccessFactors Benefits, Compensation, Jobs, etc. through a standard ODBC Driver interface.



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

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

Connect to SAP SuccessFactors 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.

You can authenticate to SAP Success Factors using Basic authentication or OAuth with SAML assertion.

Basic Authentication

You must provide values for the following properties to successfully authenticate to SAP Success Factors. Note that the provider will reuse the session opened by SAP Success Factors using cookies. Which means that your credentials will be used only on the first request to open the session. After that, cookies returned from SAP Success Factors will be used for authentication.

  • Url: set this to the URL of the server hosting Success Factors. Some of the servers are listed in the SAP support documentation (external link).
  • User: set this to the username of your account.
  • Password: set this to the password of your account.
  • CompanyId: set this to the unique identifier of your company.

OAuth Authentication

You must provide values for the following properties, which will be used to get the access token.

  • Url: set this to the URL of the server hosting Success Factors. Some of the servers are listed in the SAP support documentation (external link).
  • User: set this to the username of your account.
  • CompanyId: set this to the unique identifier of your company.
  • OAuthClientId: set this to the API Key that was generated in API Center.
  • OAuthClientSecret: the X.509 private key used to sign SAML assertion. The private key can be found in the certificate you downloaded in Registering your OAuth Client Application.
  • InitiateOAuth: set this to GETANDREFRESH.

Create a Profile for the ODBC Driver for SAP SuccessFactors

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 SuccessFactors. In the Database Painter, you can use wizards and the UI to work with SAP SuccessFactors 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 SuccessFactors 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 SuccessFactors 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 SuccessFactors data into a DataWindow. You can add the following code to the open method:

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