Skip to main content
Skip table of contents

SAP Replication Task Definition

Definition

The SAP Replication task extracts the entire SAP authorization model into a Memority technical staging repository; via built-in inbound import functionalities, this authorization model can then be imported into Memority as standard IM Roles and Resources, and presented within the user portal.

A SAP Replication Task goes thus hand-to-hand with:

  • a SAP Transaction Connector, aimed at importing replicated SAP transactions into Memority as IM Resources, see SAP Transaction Connector

  • a SAP Transaction Connector, aimed at importing replicated SAP roles into Memority as IM Roles, see SAP Role Connector

To trigger an SAP Replication Task, an Orchestration Task must be configured, encompassing:

  • the SAP Replication task

  • the SAP Transaction import task

  • the SAP Role import task

This is represented in SAP Role Connector | Overview

It is also possible to trigger a SAP Replication Task via API.

Configuration

You can access the SAP Replication Task Definition configuration :

  • by clicking on "Synchronization" â†’ "Replication Tasks"

  • by clicking on "System" â†’ "Configurations"->”Synchronization Service” and perform an import/export.

Properties

General properties

Property Name

Type

Mandatory

Description

id

String

YES

The task identifier.

name

String

YES

The task name.

description

String

NO

The task description.

Replication properties

Property Name

Type

Mandatory

Description

sapConnectorId

ConnectorId

YES

SAP connector definition id

sapInstanceId

String

YES

An arbitrary “SAP Destination name”, aimed at uniquely identifying the target SAP System instance.

For example: S4HCLNT200

This can be any value, but it must be consistent with one configured in the SAP Transaction and Role connectors participating in the same Orchestration Task. For more information see SAP Transaction Connector | Configuring-the-SAP-Transaction-Connector

replicationTaskPostProcessingId

String

NO

The id of the Replication Task Post Processing Definition holding the post processing task settings (see Replication Task Post Processing Definition).

Filtering properties

Property Name

Type

Mandatory

Description

transactionsFilterRule

RuleDefinition

NO

Filter rule for transactions replication, enabling to ignore some transactions.

It is a boolean “Condition Rule”. If configured, then the SAP transaction must match the Condition Rule (by returning true) so that the transaction is replicated.

rolesFilterRule

RuleDefinition

NO

Filter rule for roles replication, enabling to ignore some roles.

It is a boolean “Condition Rule”. If configured, then the SAP role must match the Condition Rule (by returning true) so that the role is replicated.

If role “A” is filtered out, and role “B” references role A, then B won’t be replicated either.

Paging properties

Property Name

Type

Mandatory

Description

pageSize

Integer

NO

SAP page size for replication.

Default value is 5000.

Scheduling properties

Property Name

Type

Mandatory

Description

executionPlan

-

NO

Configure the execution plan if the task is scheduled (see Execution Plan).

REST API

Memority Syncronization service exposes the following replication REST API.

Replication REST API

Resource

Method

Body

Permission

Description

Response

{tenant}/api/sync/conf/replication-tasks/

GET

-

ReplicationTask:read

List all the replication task definitions

As usual for configuration management.

{tenant}/api/sync/conf/replication-tasks/

POST

JSON

ReplicationTask:create

Create a new replication task definition

As usual for configuration management.

{tenant}/api/sync/replication-tasks/{task-id}

GET/PUT/DELETE

-

ReplicationTask:read/update/delete

Get or update or delete a replication task definition

As usual for configuration management.

All APIs below relate to instances administration

{tenant}/api/sync/replication-tasks/{task-id}/~run

POST

-

Replication:run

Launch an orchestration task by providing the identifier of an ReplicationTaskDefinition task configuration (path variable).

The execution of this method is asynchronous, it immediately returns to the caller an UUID, the task instance id, that can then be used in the API methods below.

Success

HTTP code 200.

Body: a task instance id as a simple string (not JSON): an UUID identifier enabling to monitor the task progress, or cancel the running task (see below).

Errors

HTTP code 404 if the task configuration id is not found.

{tenant}/api/sync/replication-tasks/{task-id}/instances

GET

-

Replication:progress

Get the report of all the replication task executions of the given task definition

Success

HTTP code 200.

Body: a JSON list of task reports (see above)

{tenant}/api/sync/replication-tasks/{task-id}/instances/{task-instance-id}

GET

-

Replication:progress

Monitor the execution of a replication task. It returns a task report

The task-instance-id path parameter is the task tracking id that was immediately returned when the task was launched (see above).

Success

HTTP code 200.

Body: JSON Task report information of a given task instance (see below)

Errors

HTTP code 404 if the task instance id is not found.

{tenant}/api/sync/replication-tasks/{task-instance-id}/~cancel

POST

-

Replication:run

Cancel a Replication Task.

Success

HTTP code 200

Body: empty.

Errors

HTTP code 404 if the task instance id is not found.

HTTP code 409 ("conflict") if the task cannot be canceled because it is in a terminal state.

Example

Here is a simple XML representation of a SAP Replication Task Definition.

CODE
<dmn:SapReplicationTaskDefinition id="sapReplicationTask">
  <name>sapReplicationTask</name>
  <description>Description of SAP replication task</description>
  <active>true</active>
  <pageSize>5000</pageSize>
  <sapConnectorId>sap-connector</sapConnectorId>
  <sapInstanceId>S4HCLNT200</sapInstanceId>
  <transactionsFilterRule>
      <script>
          <![CDATA[((String) ACCOUNT.value('TCODE'))?.startsWith('/AIF')]]>
      </script>
  </transactionsFilterRule>
  <rolesFilterRule>
      <script>
          <![CDATA[((String) ACCOUNT.value('AGR_NAME'))?.startsWith('SAP_')]]>
      </script>
  </rolesFilterRule>
</dmn:SapReplicationTaskDefinition>

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.