Skip to main content

Install Multitarget Application (MTA)

SAP Central Finance Transaction Replication by insightsoftware for SAP S/4HANA provides a multitarget application (MTA) that you can deploy and build or deploy directly into your SAP HANA database through SAP HANA Deployment Infrastructure (HDI) after setting up the staging database and SAP Data Services objects. After you deploy the application, the database objects, such as schemas, views, and virtual tables, are created in the SAP HANA database in SAP S/4HANA

Prerequisite Tasks

Ensure that the following prerequisite tasks are complete:

  • SAP HANA Extended Application Services, advanced model (XS advanced), and XSA Core package are installed.
  • The following XSA components are installed. The latest version of XSA that is compatible with the SAP S/4HANA database, is recommended.

    XSA Core

    SAP Extended APP Services (XSA Base Component)

    XSA Runtime

    XSA Monitoring

    XSA SAP WEB IDE

    XSA Complex

    XSA Cockpit

    XSA Services

  • Smart Data Access (SDA) is installed on the SAP S/4HANA database. The SDA connection points towards the insightsoftware staging database which is SQL Server if insightsoftware AWS Cloud is being used. For the on-premise installation:
    • A Unix ODBC is required for MS SQL Server remote sources.
    • If SAP S/4HANA is the staging database or remote source, the driver is pre-installed on the SAP S/4HANA server and no additional driver installation is required.

    Refer to the following resources for more information:

  • Remote Source Connection: An SAP HANA remote source, such as MAGSW_STAGE, is created using smart data access in the SAP S/4HANA database pointing to the staging database. For information about remote sources, see the SAP HANA documentation.

    Note: When creating the remote source, in the connection properties, you must select the DML Mode value as readwrite.

    Note: For staging database in insightsoftware AWS Cloud, contact the insightsoftware Cloud Ops team to get the customer specific AWS SQL SERVER connection details that includes Host Name, Port, Username, and Password. Then, use the details while creating the remote source connection in SAP S/4HANA. For staging database in on-premise application, get the connection details from the customer or database provided.

  • A user and role are created in the SAP S/4HANA database to eliminate the SYSTEM user dependency in the user-provided service in the SAP HANA XS Advanced Cockpit.

    To create MAGNITUDE_UPS_USER and MAGNITUDE_UPS_ROLE

    Note: Enable and use the SYSTEM user or an equivalent user to perform these steps.

    1. Run the following SQL query in the SAP S/4HANA database.
      CREATE ROLE MAGNITUDE_UPS_ROLE;
      GRANT CREATE VIRTUAL TABLE, CREATE VIRTUAL FUNCTION,
      CREATE REMOTE SUBSCRIPTION, PROCESS REMOTE SUBSCRIPTION EXCEPTION,
      ALTER, DROP ON REMOTE SOURCE MAGSW_STAGE

      TO MAGNITUDE_UPS_ROLE WITH GRANT OPTION;
      GRANT ROLE ADMIN TO MAGNITUDE_UPS_ROLE;
      CREATE USER MAGNITUDE_UPS_USER PASSWORD "Magnitude@1" NO FORCE_FIRST_PASSWORD_CHANGE;
      ALTER USER MAGNITUDE_UPS_USER DISABLE PASSWORD LIFETIME;GRANT MAGNITUDE_UPS_ROLE
      TO MAGNITUDE_UPS_USER WITH ADMIN OPTION;
    2. The user and role are created as shown in the following image.
  • A user-provided service named UPS_MAG_HDB is created in SAP HANA XS Advanced Cockpit as follows:
    1. Log on to SAP Web IDE for SAP HANA. The home page is displayed. To obtain the Web IDE link, refer to SAP Web IDE for SAP HANA SPS06- Installation and Upgrade Guide.
    2. Select Tools > SAP HANA XS Advanced Cockpit. The SAP HANA XS Advanced Cockpit page opens in a tab.
    3. On the right pane, select Spaces under the organization. The Organization: <OrganizationName> - Spaces page of SAP HANA XS Advanced Cockpit is displayed.
    4. Select a space. The Space: <SpaceName>- Applications page is displayed.
    5. In the left pane, select User-Provided Services. The Space: <SpaceName> - User-Provided Services page is displayed.
    6. Select New Instance. The New User-Provided Service Instance dialog box is displayed.
    7. Provide the instance details as follows.
      1. In the Instance Name box, enter the instance name as UPS_MAG_HDB.
      2. In the Credentials box, add the password, driver, port, host, user, and tags, of the Tenant Database of SAP S/4HANA System.

        {

        "password": "Magnitude@1",

        "driver": "com.sap.db.jdbc.Driver",

        "port": "<YOUR S4 HANA DB TENANT SQL PORT>",

        "host": "<YOUR S4 HANA DB TENANT HOST>",

        "user": "MAGNITUDE_UPS_USER",

        "tags": "hana"

        }

        Important: Do not modify the instance name, password, driver, user, and tags. Modify the values for the port and host, based on the SAP HANA database instance.

        Note: You can also add another ADMIN user role.

        To add a custom user role, you must have object privileges at the remote source:
        GRANT <object_privilege>[{, <object_privilege>}...] ON REMOTE SOURCE <source_name> TO <CUSTOMUSER> [ WITH GRANT OPTION ]
    8. Select Save. The user-provided service UPS_MAG_HDB is created.
  • Member Addition: Perform the following steps to add members:
    1. In the left pane, select Members. The Space: <Space name> - members page is displayed.
    2. Select Add Members. A dialog box to add members is displayed.
    3. Enter one or more usernames, select all the checkboxes under Assign Roles, and select OK. The new member is created.
    4. Select org. The Organization: org – Spaces page is displayed.
    5. Select Members in the left pane. The Organization: org – Member page is displayed.
    6. Select Add Members, enter details, and select OK.

Build MTA Through SAP Web IDE for SAP HANA

In this process, the Web IDE project is imported and the .mtar file is built.

To avoid errors and maintain consistency between the MAGSW package and your environment, you can create a sample project in SAP Web IDE to find the plugin_version and hdi-deploy version in your environment and ensure that the same values are reflected in the MAGSW folder (Web IDE project folder).

To create a sample project

  1. Log on to SAP Web IDE for SAP HANA. The home page is displayed.
  2. Right-click Workspace and select New > Project from Template.
  3. In the Template Selection window, select Multi-Target Application Project, and select Next.
  4. In the Basic Information section > Project Name field, enter a name for the project, for example TEST, and select Next. The Template Customization window is displayed.
  5. In the Template Customization section, select an appropriate option for Space, and select Next.
  6. In the Confirmation section, select Finish. A new project folder named TEST is created in the workspace directory.
  7. Right click the TEST folder and select New > SAP HANA Database Module. A new window to create a SAP S/4HANA database module appears.
  8. In the Module Name field, provide any name, for example TEST_DB, and select Next.
  9. In the Schema Name field, enter a name for the schema, for example, TEST_SCHEMA, and select Next.
  10. In the Confirmation section, select Finish. A new module TEST_DB is created in your workspace.
  11. Expand the TEST project folder and open the .hdiconfig file.

    Note: Select the “eye” icon if the .hdiconfig file is not displayed on expanding the TEST folder.

  12. Double click the .hdiconfig file, find the value for the plugin_version field, and copy the value.

Next, you must build the .mtar file as follows:

  1. Copy the MAGSW compressed file available at \\<SetupFolder>\SCT\HDI\Web IDE Projects to the computer on which you are running SAP Web IDE.
  2. In the SAP Web IDE for SAP HANA, right-click Workspace, select Import > File or Project. The Import dialog box is displayed.
  3. Select Browse, then MAGSW project, and OK. The MAGSW project is imported into the workspace.
  4. Right-click MAGSW > Project > Project Settings.
  5. Select the required space from the options in the Space dropdown list.
  6. Select Save and Close.
  7. If no builder is installed in the selected space, select the Install Builder button.
  8. When the builder is installed, an appropriate message is displayed.
  9. Select Save and Close.
  10. Expand the MAGSW folder, open the .hdiconfig file and check for the plugin_version.
  11. Compare this plugin_version with that of the sample project created in the earlier steps. If the versions are different, then change the plugin_version in the MAGSW folder and save it. In the following example, the versions are different. Hence, the plugin_version in the MAGSW folder is changed and saved.
  12. Depending on your staging database configuration details, edit the database and the schema name as follows:
    1. Expand MAGSW > magsw_db and go to virtual_tables.
    2. Expand the virtual_tables folder and right-click a virtual table. For example, right-click AGE_BUCKETS_VTAB.hdbvirtualtable, and select Open Code Editor.
    3. Alternatively, you can select the Open Virtual Table Editor.
    4. In the code editor, edit the database values for all the tables as shown in the following screenshot.

      For example, if your staging database is on SAP HANA and the staging database schema is SC_STG_DEV, replace "MAGSW_STAGE"."<NULL>"."MAG_SC_STG" with "MAGSW_STAGE"."<NULL>"."SC_STG_DEV" as shown in the following screenshot. Select the Advanced Repository Search in the right-hand pane and replace the values.

    5. Confirm that you want to replace all the instances of MAG_SC_STG with SC_STG_DEV.

      A message is displayed to indicate that the action is successful.

  13. Right click the MAGSW_DB folder and select Build.
  14. When the build is completed successfully, the following message is displayed in the console.
  15. Now, build the MAGSW folder.
  16. The build process starts and the log messages indicating the build status are displayed in the console. Fix the errors, if any, and build again. A message is displayed stating that the build was successful. The .mtar file is created.
  17. The generated .mtar file is present in the mta_archives folder which is inside the MAGSW folder.
  18. To view the objects that are created, go to HANA Database > MAGSW_SC schema.
  19. As a SYSTEM user of the SAP HANA database in SAP S/4HANA, run the following statement using SAP HANA Studio or any other IDE:

    GRANT "MAGSW_SC::access_role" TO SAPHANADB;

Was this article helpful?

We're sorry to hear that.