Use Studio to Configure SAP S/4HANA OData Connector - Mule 4
Anypoint Studio editors help you design and update your Mule applications, properties, and configuration files.
To add and configure a connector in Studio:
Create a Mule project.
Add the connector to your Mule project.
Configure an input source for the connector’s flow.
Configure global elements for the connector.
If you are new to configuring Anypoint Connectors in Studio, see Use Studio to Configure a Connector.
In Anypoint Studio, create a new Mule project in which to add and configure the connector:
From the Studio main menu, select File > New > Mule Project.
Enter a name for your Mule project and click Finish.
Add Anypoint Connector for SAP S/4HANA OData to a Mule project to automatically populate the project’s XML code with the connector’s namespace and schema location, as well as to add the required dependencies to the project’s
In the Mule Palette view, click (X) Search in Exchange.
In Add Dependencies to Project, type
SAP S/4HANA ODatain the search field.
Click the connector name in Available modules.
Adding a connector to a Mule project in Studio does not make that connector available to other projects in your Studio workspace.
An input source initiates a flow when a specified condition is met. The act of dragging the connector’s operation from the palette onto the Anypoint Studio canvas automatically populates the XML code with the connector namespace and schema location.
Possible input source operations for this connector are:
Starts your app using a browser or a command such as
Starts your app at timed intervals
In Studio, drag the input operation you choose from the Mule Palette to the Source panel in the canvas, and supply the required parameters.
To use SAP S/4HANA OData Connector in a Mule app, configure a connector global element for connector operations to use in your application.
You can put placeholder values in the
mule-artifact.content configuration file in the
src/main/resources folder of your project.
You can either enter your credentials in the global configuration content or reference a configuration file that contains the values for your credentials. Using a configuration file is recommended for simpler maintenance and better reuse of your project. Keeping these values in a separate file is useful if you need to deploy to different environments, such as production, development, and QA, where access credentials might differ.
Use the Global Element Properties configuration dialog to configure a global element for SAP S/4HANA OData Connector:
In your project, click the Global Elements tab at the base of the canvas.
In the Global Configuration Elements screen, click Create:
In the Choose Global Type wizard, expand Connector Configuration, select SAP S 4HANA Config, and click OK.
Configure the following values in the General tab:
In the Connection drop-down menu, select the connection type:
For basic authentication, enter the following required values:
Service Base URL
The URL of the SAP S/4HANA instance you want to manage
The user name used to initialize the session
The password used to authenticate the user
OAuth 2 Application Connection Provider
For OAuth 2.0 authentication, enter the following required information:
Service base URL
The base URL of the service provider of the SAP S/4HANA system to access from the connector. All other endpoints are derived from this base URL.
The OAuth client ID that is registered with the service provider
The OAuth client secret that corresponds to the client ID and is registered with the service provider.
Token URL that corresponds to the URL of the endpoint that provides the access tokens
Click Test Connection to ensure that your access credentials are correct.
Click the Advanced tab inside the Connection section to configure the following values:
Studio Field Description
Discovery Service Enabled
Feature switch for service discovery. If disabled, the service discovery relative path is not applied.
Discovery Service Path
Relative path from the base URL to the service to use for automatic services discovery.
Common HTTP directory for all SAP services. You can leave this parameter blank and then specify the HTTP directory individually for every service in the unlisted services list.
List of services to add to the list of discovered services.
Service discovery resolution timeout
Connection timeout for service discovery.
Service discovery timeout unit
Time unit to use in the service discovery resolution timeout configuration.
Custom headers that can be included in each request sent.
Default query parameter
Custom query parameters to include in each request sent.
Configuration for executing requests through a proxy.
Click the Advanced tab in the configuration window to configure the following values:
Studio Field Description
The time zone to which the Date objects returned from S/4Hana are converted.
Batch buffer size
The maximum memory the connector can use to keep batch requests in memory. Any requests requiring additional memory are buffered on disk.
The unit of measure in which the batch buffer size parameter is expressed.
Click OK to save the global connector configuration.
After configuring the SAP S/4HANA OData Connector for use in Studio, see the Examples topic for more Studio information.