JDBC Driver for SAP Cloud for Customer

Build 23.0.8839

Establishing a Connection

Creating a JDBC Data Source

You can create a JDBC data source to connect from your Java application. Creating a JDBC data source based on the CData JDBC Driver for SAP Cloud for Customer consists of three basic steps:

  • Add the driver JAR file to the classpath. The JAR file is located in the lib subfolder of the installation directory. Note that the .lic file must be located in the same folder as the JAR file.
  • Provide the driver class. For example:
    cdata.jdbc.saphybrisc4c.SAPHybrisC4CDriver
  • Provide the JDBC URL. For example:
    jdbc:saphybrisc4c:User=user;Password=password;
    
    or
    
    jdbc:cdata:saphybrisc4c:User=user;Password=password;

    The second format above can be used whenever there is a conflict in your application between drivers using the same URL format to ensure you are using the CData driver. The URL must start with either "jdbc:saphybrisc4c:" or "jdbc:cdata:saphybrisc4c:" and can include any of the connection properties in name-value pairs separated with semicolons.

Connecting to SAP Cloud for Customer

To identify your SAP Cloud for Customer instance, set the following:
  • Tenant: The full domain name of your SAP Cloud for Customer tenant.
  • Url: The URL corresponding to your SAP Cloud for Customer instance. You must specify this if it differs from the default service of "c4codata". Otherwise, omit this connection property.

Authenticating to SAP Cloud for Customer

User Credentials

Set the AuthScheme to Basic and specify the following:

  • User: Your SAP Cloud for Customer username.
  • Password: Your SAP Cloud for Customer password.

Azure AD

Set the AuthScheme to AzureAD.

Configuring a Custom Extension

This configuration requires a custom extension to SAP Hybris. This extension can be created using the yempty tool.

Connection Configuration

After configuring your custom extension, set the following to authenticate:

  • InitiateOAuth: GETANDREFRESH.
  • OAuthClientId: The application Id of the connector application, found in the Overview section of the app registration.
  • OAuthClientSecret: The client secret value of the connector application. Azure AD displays this when you create a new client secret.
  • CallbackURL: The redirect URI of the connector application. For example: https://localhost:33333
  • SSOProperties: Set the following additional properties, each separated by a commma, in the format A=B;C=D; etc.
    • Resource: The URL of your environment.
    • AzureTentant: The Id of the Azure AD tenant where the applications are registered.

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 23.0.8839