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 Concur 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.sapconcur.SAPConcurDriver
- Provide the JDBC URL. For example:
jdbc:sapconcur:InitiateOAuth=GETANDREFRESH;OAuthClientId=MyOAuthClientId;OAuthClientSecret=MyOAuthClientSecret; or jdbc:cdata:sapconcur:InitiateOAuth=GETANDREFRESH;OAuthClientId=MyOAuthClientId;OAuthClientSecret=MyOAuthClientSecret;
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:sapconcur:" or "jdbc:cdata:sapconcur:" and can include any of the connection properties in name-value pairs separated with semicolons.
Authenticating to SAP Concur
SAP Concur uses the OAuth authentication standard. To authenticate using OAuth, you will need to create an app to obtain the OAuthClientId, OAuthClientSecret, and CallbackURL connection properties. See Using OAuth Authentication for an authentication guide.
Important connection property: LoginId
Login ID of the user. Can be used if the user account associated with the OAuth 2.0 access token has a Concur account with one of these roles: Web Services Administrator for Professional or Can Administer for Standard. Setting the Login ID to "ALL" will retrieve information for all accounts at the expense of certain tables that do not support this argument.