---
schema_version: "1"
id: 3305724ed8ba60b4301c423037f926e5530bbe7cea572e73d349600f9742dfe8
title: Upgrading and Migrating SAP S/4HANA OData Connector to 2.x
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/sap-s4hana-cloud-connector/latest/sap-s4hana-cloud-connector-upgrade-migrate.md
canonical_url: https://docs.mulesoft.com/sap-s4hana-cloud-connector/latest/sap-s4hana-cloud-connector-upgrade-migrate
source_site: docs.mulesoft.com
content_type: documentation
content_hash: a8e68b6ebc12b78d89f03cee294376a6da6dba32033cc65252338bde98016d26
description: MuleSoft Documentation Site
release: "2.9"
latest: true
---
---
product: SAP S/4HANA OData Connector
version: 2.9
is-latest-version: true
---

# Upgrading and Migrating SAP S/4HANA OData Connector to 2.x

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

Upgrade Anypoint Connector for SAP S/4HANA OData (SAP S/4HANA OData Connector) to take advantage of
the increased security offered by using OAuth 2.0 authentication to connect to SAP S/4HANA OData.

## Supported Upgrade Paths

This is a direct upgrade from version 1.2.1 version to 2.x.x.

<table><colgroup><col> <col></colgroup><thead><tr><th>From Version</th><th>To Version</th></tr></thead><tbody><tr><td><div><div><p>1.2.1</p></div></div></td><td><div><div><p>2.x.x</p></div></div></td></tr></tbody></table>

## What’s Changed

### 2.9

- The **Batch update entity** operation now uses the correct syntax for the OData v4 URI for fields
  that have the EDM type as GUID.

- The connector now throws the correct error types:

  - When there is an invalid filter provided in the operation, the connector now throws
    `S4HANA:INVALID_FILTER` instead of `S4HANA:INVALID_ENTITY`.

  - When there are authentication issues (such as an incorrect username, password, or URL), the
    connector now throws `S4HANA:UNAUTHORIZED` instead of `S4HANA:NO_SUCH_SERVICE`.

- The connector now proactively re-triggers service discovery before each operation if the service
  list is empty.

### 2.8

- SAP S/4HANA OData Connector now provides support for old pagination logic (version 2.6.2 and
  earlier) in the **Query** operation. To support this change, a Legacy Pagination checkbox is added
  in the Advanced tab of the **Query** operation.

### 2.7

- SAP S/4HANA OData Connector now provides support for OData API v4 in addition to OData API v2.  
  To support OData API v4, the connector now includes the new **OData v4 service discovery relative
  path** field in the connection types. For information about the **OData v4 service discovery
  relative path** field, see
  [SAP S/4HANA OData Connector Reference](https://docs.mulesoft.com/sap-s4hana-cloud-connector/latest/sap-s4hana-cloud-connector-reference).

### 2.6

The connector now supports custom namespaces. To support custom namespaces, the connector now
includes the new **Scoped service discovery relative path** and **Services attributes** fields in
the connection types and the new **Service Attribute** type.

Use custom namespaces to define and organize custom objects and developments, such as programs,
function modules, or tables. The naming convention for a custom namespace is `Z` or `Y` followed by
an identifier. For example, if there are custom programs that manage customer data, you can create a
custom namespace called `ZCUST` to organize all custom programs related to customer data.

Custom namespaces enable you to maintain better control over your custom objects and developments
and avoid naming conflicts with SAP standard objects or custom objects by other organizations, as
well as improve the maintainability and upgradability of the system.

### 2.5

You can now use the new **Batch Upsert Custom Business Object** operation and the modified **Batch
update entity** operation to support custom business objects.

### 2.4

Added support for a configurable cache of metadata for S/4HANA services to improve performance by
not executing a metadata request in every operation call.

### 2.3

Added support to enable or disable the automatic retrieval of a CSRF token before a
resource-modifying request, such as a POST request.

### 2.2

You can now configure the response, client, and connection timeout parameters.

### 2.1

SAP S/4HANA OData Connector now provides support for the OData APIs exposed by SAP S/4HANA S/4HANA
on-premise.

### 2.0

- OAuth 2.0 is now supported.  
  The **OAuth 2.0 Application Connection Provider** option is added to **Connection** types. For
  information about the configuration parameters for this connection type, see
  [SAP S/4HANA OData Connector Reference](https://docs.mulesoft.com/sap-s4hana-cloud-connector/latest/sap-s4hana-cloud-connector-reference).

- Mule runtime engine (Mule) 4.2.1 or later is required.

- The default value for the **Service directory** field was removed.

- Because the base package has changed, all exported classes now have different fully qualified
  names.

- The group ID of the connector’s JAR has changed.

## Requirements and Limitations

Be aware of the following requirements and limitations before you upgrade to the latest version.

### Requirements

You must use Mule 4.2.1 or later.

### Limitations

This upgrade breaks backward compatibility with 1.x.x versions of the connector.

## Upgrade Prerequisites

Before you upgrade, create a backup of your files, data, and configurations in case you need to
restore to them.

## Upgrade Steps

Follow these steps to perform the upgrade:

1.  In Anypoint Studio, create a Mule project.

2.  In the **Mule Palette** view, click **Search in Exchange**.

3.  In **Add Dependencies to Project**, enter `sap s/4hana odata` in the search field.

4.  In **Available modules**, select **SAP S/4HANA OData Connector** and click **Add**.

5.  Click **Finish**.

6.  Verify that the `mule-sap-s4hana-cloud-connector` dependency version is updated to the version
    of the connector you are using in the `pom.xml` file in the Mule project.

Studio upgrades the connector automatically.

## Post Upgrade Steps

After you install the latest version of the connector, verify the upgrade:

1.  In Studio, verify that there are no errors in the **Problems** or **Console** views.

2.  Verify that there are no problems in the project `pom.xml` file.

3.  Test the connection and verify that the operations work.

## Troubleshooting

If there are problems with caching the parameters and metadata, try restarting Studio.

## Revert the Upgrade

If it is necessary to revert to the previous version of SAP S/4HANA OData Connector, change the
`mule-sap-s4hana-cloud-connector` dependency version in the project’s `pom.xml` to the version to
which you want to revert.

## See Also

[Salesforce Help](https://help.salesforce.com)
