Skip to main content

Set Up Staging Database

You can set up one of the following databases as your staging database for Transaction, Drilldown, and SyncBack:

  • SAP HANA
  • Microsoft SQL Server

Note: The option to set SAP ASE as a staging database is deprecated from November 2022 release onwards.

Prerequisite Tasks

Before you set up the staging database, copy the setup files located at <SetupFolder>\Stage\<StagingDatabase> to the computer on which you want to run the setup files.

SQL Scripts to Create Read-Only Login Access (MSSQL as Stage)

To create a login and user with read-only access to all reconciliation objects (Tables, Views, Procedures, and other scripts), follow these steps:

  1. Run the sda_access.bat batch file by double-clicking it or running it in the command prompt.
  2. Enter the Following Details:
    • serverhost_st: Stage MSSQL Server Hostname
    • username_st: Stage MSSQL Server Username
    • password_st: Stage MSSQL Server Password
    • master_schema: Master Database/Schema Name
    • stage_database: Stage Database Name
    • stage_schema: Stage Schema Name
    • Login_Name: New Login Name
    • Login_Password: New Login Password
    • User_Name: New User Name
    • Role_Name: New Role Name

Set Up Staging Database in SAP HANA

To set up your staging database in SAP HANA, perform the following tasks:

  1. In SAP HANA, create a database user named MAG_SC_STG.
  2. Log in as MAG_SC_STG user, go to the <SetupFolder>\Stage\HANA\Tables folder, and perform the following:
    1. Open the Run.sql file in which a set of .sql files are listed.
    2. Run the .sql files in the order they are listed. The staging tables are created.
  3. Open the Virtual_source_tables.sql file at <SetupFolder>\Stage\HANA folder, and do the following:
    1. As indicated in the Virtual_source_tables.sql file, create remote sources using smart data access in SAP HANA that point to the SLT Replication Server database and SAP S/4HANA database.
    2. Run the virtual_source_tables.sql file. The virtual source tables are created.
  4. Go to the <SetupFolder>\Stage\HANA\Views folder, and do the following:
    1. Open the Run.sql file in which a set of .sql files are listed.
    2. Run the .sql files in the order they are listed. The views are created.
  5. Go to the <SetupFolder>\Stage\HANA\Procedures folder, and do the following:
    1. Open the Run.sql file in which a set of .sql files are listed.
    2. Run the .sql files in the order they are listed. The procedures are created.

    The tables and the related database objects are created for the staging user in SAP HANA for Transaction, Drilldown, SyncBack, and Reconciliation reports.

Set Up Staging Database in SQL Server

To set up your staging database in SQL Server, perform the following steps:

  1. In SQL Server, create a database named MAG_SC_STG.
  2. Go to the <SetupFolder>\Stage\MSSQL folder, and run the install_stage.bat file. The prompts requiring the staging database details are displayed.
  3. Provide inputs for the parameters as follows:
    1. Host name: Enter the host name of SQL Server on which the staging database is created.
    2. Username: Enter the user login name, who has access to the staging database in the server.
    3. Password : Enter the password of the login user to connect to the server.
    4. Staging schema: Enter the name of the staging database that you created in Step 1.

    The tables and the related database objects for the staging user are created in SQL Server for Transaction, Drilldown, SyncBack, and Reconciliation reports.

Staging Tables

The staging tables, such as the following are created in the staging database.

Table Description

CDC_RUNSTATUS

Indicates the status of the CDC job (ON/OFF).

FIN_HEADER
FIN_ACCT
FIN_CLRITM
FIN_CREDIT
FIN_DEBIT
FIN_PRDTAX
FIN_WHTAX
FIN_EXTENT
FIN_EXT_IT
FIN_COPA
FIN_EXTCHG
FIN_DOCCHG
FIN_CLRWHT

Indicates the staging tables for storing transactions data from source systems before they are moved to the SLT tables. The UNIQUE_ID column is present in every FIN table to identify the journals between the tables. The value in the UNIQUE_ID column is a concatenation of the logical system and the hash key which is generated. A flag column is present in all the FIN tables to move the new journals from the staging tables to the SLT interface tables. When a new record is inserted into the FIN% tables, the value in the flag column will be N. After the record is moved to the SLT staging tables, the value in the flag column is updated to Y.

CF_E_CIDOC
CF_E_CIITEM
CF_E_POACC
CF_E_PODOC
CF_E_POITEM
CF_E_PORMD
CF_E_PORSI
CF_E_POSCH
CF_E_SIACC
CF_E_SIDOC
CF_E_SIGLAC
CF_E_SIITEM
CF_E_SODOC
CF_E_SOITEM
CF_E_SOPART
CF_E_SOSLN

Indicates the staging tables for storing AVL data from applicable source systems before they are moved to the SLT tables.

MSC_MASTER_LOOKUP

Stores SAP S/4HANA pre-configurable master data for source and target systems. You need to map the journal types, logical system, user name, and other relevant information.

Was this article helpful?

We're sorry to hear that.