hana slt config en

48
SAP HANA Configuration Guide Trigger-Based Data Replication Using SAP LT (Landscape Transformation) Replication Server for SAP HANA SAP HANA Appliance Software SPS 04 Target Audience Consultants Administrators SAP Hardware Partner Others Public Document version 1.0 – 02/07/2012

Upload: mrudul007

Post on 09-Dec-2015

48 views

Category:

Documents


8 download

DESCRIPTION

HANA

TRANSCRIPT

Page 1: Hana Slt Config En

SAP HANA Configuration Guide Trigger-Based Data Replication

Using SAP LT (Landscape Transformation) Replication Server for SAP HANA

SAP HANA Appliance Software SPS 04

Target Audience

■ Consultants ■ Administrators ■ SAP Hardware Partner ■ Others

Public Document version 1.0 – 02/07/2012

Page 2: Hana Slt Config En

© Copyright 2004 SAP AG. All rights reserved.

No part of this publication may be reproduced or transmitted in any

form or for any purpose without the express permission of SAP AG.

The information contained herein may be changed without prior

notice.

Some software products marketed by SAP AG and its distributors

contain proprietary software components of other software vendors.

Microsoft, Windows, Outlook, and PowerPoint are registered

trademarks of Microsoft Corporation.

IBM, DB2, DB2 Universal Database, OS/2, Parallel Sysplex,

MVS/ESA, AIX, S/390, AS/400, OS/390, OS/400, iSeries, pSeries,

xSeries, zSeries, z/OS, AFP, Intelligent Miner, WebSphere, Netfinity,

Tivoli, and Informix are trademarks or registered trademarks of IBM

Corporation in the United States and/or other countries.

Oracle is a registered trademark of Oracle Corporation.

UNIX, X/Open, OSF/1, and Motif are registered trademarks of the

Open Group.

Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame,

VideoFrame, and MultiWin are trademarks or registered trademarks of

Citrix Systems, Inc.

HTML, XML, XHTML and W3C are trademarks or registered

trademarks of W3C®, World Wide Web Consortium, Massachusetts

Institute of Technology.

Java is a registered trademark of Sun Microsystems, Inc.

JavaScript is a registered trademark of Sun Microsystems, Inc., used

under license for technology invented and implemented by Netscape.

MaxDB is a trademark of MySQL AB, Sweden.

SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and

other SAP products and services mentioned herein as well as their

respective logos are trademarks or registered trademarks of SAP AG

in Germany and in several other countries all over the world. All other

product and service names mentioned are the trademarks of their

respective companies. Data contained in this document serves

informational purposes only. National product specifications may

vary.

These materials are subject to change without notice. These materials

are provided by SAP AG and its affiliated companies ("SAP Group")

for informational purposes only, without representation or warranty of

any kind, and SAP Group shall not be liable for errors or

omissions with respect to the materials. The only warranties for SAP

Group products and services are those that are set forth in the express

warranty statements accompanying such products and services, if any.

Nothing herein should be construed as constituting an additional

warranty.

Disclaimer

Some components of this product are based on Java™. Any code

change in these components may cause unpredictable and severe

malfunctions and is therefore expressively prohibited, as is any

decompilation of these components.

Any Java™ Source Code delivered with this product is only to be used

by SAP’s Support Services and may not be modified or altered in any

way.

Documentation in the SAP Service Marketplace

You can find this documentation at the following Internet address:

service.sap.com/instguides

SAP AG

Neurottstraße 16 69190 Walldorf Germany T +49/18 05/34 34 24 F +49/18 05/34 34 20 www.sap.com

Page 3: Hana Slt Config En

Typographic Conventions

Type Style Represents

Example Text Words or characters that appear on the screen. These include field names, screen titles, pushbuttons as well as menu names, paths and options.

Cross-references to other documentation

Example text Emphasized words or phrases in body text, titles of graphics and tables

EXAMPLE TEXT Names of elements in the system. These include report names, program names, transaction codes, table names, and individual key words of a programming language, when surrounded by body text, for example, SELECT and INCLUDE.

Example text Screen output. This includes file and directory names and their paths, messages, names of variables and parameters, source code as well as names of installation, upgrade and database tools.

Example text Exact user entry. These are words or characters that you enter in the system exactly as they appear in the documentation.

<Example text> Variable user entry. Pointed brackets indicate that you replace these words and characters with appropriate entries.

EXAMPLE TEXT Keys on the keyboard, for example, function keys (such as F2) or the ENTER key.

Icons

Icon Meaning

Caution

Example

Note

Recommendation

Syntax

Page 4: Hana Slt Config En

Application Operations Guide for <Application>

4 June 2012

Contents

1 Getting Started ....................................................................... 6

1.1 Global Definitions ................................................................... 6

1.2 Important SAP Notes .............................................................. 8

1.3 History of Changes ................................................................. 8

2 Introduction ............................................................................ 9

3 Configuration Overview ...................................................... 10

3.1 Configuration List .................................................................10

3.2 Configuration details and selection ....................................11

3.3 Remote Maintenance ............................................................12

4 Replication Settings Overview ........................................... 15

4.1 Replication Settings for Source Tables ..............................15

4.2 Add Source Table ..................................................................17

4.3 Managing Files ......................................................................18

4.3.1 Export to File ............................................................................ 18

4.3.2 Import from file ......................................................................... 19 4.3.2.1 Load All, Discard Original Settings............................................................ 20 4.3.2.2 Load All, Update Original Settings............................................................. 20 4.3.2.3 Load Selected Settings ............................................................................... 22

4.4 Tables in Target System .......................................................26

4.4.1 Update Replication Status ....................................................... 27

4.4.2 Add Tables from Target System ............................................. 27

5 Customizing the replication settings ................................. 28

5.1 Overview ................................................................................28

5.2 Source Table Management ...................................................28

5.2.1 Active source table .................................................................. 29

5.2.2 Source table overview.............................................................. 29 5.2.2.1 Displaying tables in the tables for replication settings ........................... 30 5.2.2.2 Add/delete a table ........................................................................................ 31 5.2.2.3 Copy settings ............................................................................................... 32

5.3 Table Settings ........................................................................33

5.3.1 IUUC_REPL_TABSTG .............................................................. 34 IUUC_REPL_TAB_DV ................................................................................................. 37

5.3.2 IUUC_ASS_RUL_MAP .............................................................. 40 5.3.2.1 Includes, and lines of code ......................................................................... 40

5.3.3 IUUC_SPC_PROCOPT.............................................................. 46

5.3.4 IUUC_PERF_OPTION ............................................................... 46

6 Appendix .............................................................................. 47

Page 5: Hana Slt Config En

Application Operations Guide for <Application>

June 2012 5

6.1 Related Guides ......................................................................47

6.2 Related Information ..............................................................47

Page 6: Hana Slt Config En

Getting Started

Global Definitions

6 June 2012

1 Getting Started

This guide does not replace the daily operations handbook that we recommend customers to create for their specific production operations.

Target Groups

1. Technical Consultants

2. System Administrators

3. Solution Consultants

4. Business Process Owner

5. Support Specialist

1.1 Global Definitions

The following table contains key terms related to the SAP LT Replication Server:

Term Definition

Advanced Replication Settings A transaction that runs on the SAP LT Replication Server that you can use to specify advanced replication settings. For example, you can: • Modify target table structures • Specify performance optimization settings • Define transformation rules

Configuration The definition of the parameters that the SAP LT Replication Server uses to replicate data from one or more source systems to one or more target systems. The configuration specifies the source system, the target system, and the relevant connections.

Configuration and Monitoring Dashboard An application that runs on the SAP LT Replication Server that you use to specify configuration information (such as the source and target systems, and relevant connections) so that data can be replicated. You can also use it to monitor the replication status.

Database trigger A piece of code that updates a database automatically in response to a certain event.

Data transfer Job A job that is used for the data transfer process in the SAP LT Replication Server.

Initial load A step within the trigger-based replication process that loads data from the source system

Page 7: Hana Slt Config En

1 Getting Started

1.1 Global Definitions

June 2012 7

to target system.

Initial load Job A job that is used for the initial load process in the SAP LT Replication Server.

Latency The length of time to replicate data (a table entry) from the source system to the target system.

Logging table A table in the source system that records any changes to a table that is being replicated. This ensures that the SAP LT Replication Server can replicate these changes to the target system.

Master job A job that exists for each configuration that calls the initial load jobs and the data transfer jobs in the SAP LT Replication Server.

Maximum latency The maximum time taken to replicate data (a table entry) from the source to target system.

Median latency The median time taken to replicate data (a table entry) from the source to target system.

Minimum latency The minimum time taken to replicate data (a table entry) from the source to target system.

Reading type A technique for reading data from tables in the target system during the initial load process.

Replication phase A phase in the trigger-based replication process whereby only changes to the source database (recorded by databases triggers) are replicated to the target database, thereby facilitating real-time data replication.

SAP LT Replication Server An SAP system that facilitates the replication of data from one or more source systems to one or more target systems. The source systems can be SAP or non-SAP systems.

Tables for replication settings The set of tables in the SAP LT Replication Server that contain the replication settings for a specific configuration.

Trigger-based replication A technique for replicating data where an initial load is first performed that loads data from the source to the target system, and a replication phase begins whereby only changes to the source database (recorded by databases triggers) are replicated to the target database, thereby facilitating data replication in real-time.

Transformation rules A rule that you can specify in the Advanced Replication Settings transaction for source tables such that data is transformed during the replication process. The transformed data will then be present in the target table. For example, you can specify a rule to: • Convert fields • Fill empty fields

• Skip records

Page 8: Hana Slt Config En

Getting Started

Important SAP Notes

8 June 2012

1.2 Important SAP Notes

Check regularly for updates available for the Application Operations Guide.

Important SAP Notes

SAP Note Number

Title Comment

1.3 History of Changes

Make sure you use the current version of the Application Operations Guide.

The current version of the Application Operations Guide is at service.sap.com/instguides

on SAP Service Marketplace.

The following table provides an overview of the most important changes in prior versions.

Version Important Changes

1.0 First version of the guide

1.1 Revised by information development

Page 9: Hana Slt Config En

2 Introduction

1.3 History of Changes

June 2012 9

2 Introduction

This guide describes the replication settings that are available for the SAP LT Replication Server. You access the Replication Settings UI by using transaction IUUC_REPL_CONTENT.

The system landscape comprises a dedicated replication server (the SAP LT Replication Server connected to a source system and to the target SAP HANA database (target system).

A master control job that runs in the SAP LT Replication Server initiates all required processing steps. In particular, after adding a table to a configuration for replication, a logging table and database triggers must be set up in the source system in order to keep track of data changes for real-time replication. In the target SAP HANA system, a new database table must be created for the data read from the source system. The data can then be transferred to the SAP HANA system.

The first step is an initial load that loads all data from the source system to a table in the target system. The table entries are first retrieved from the source table, and then processed in the SAP LT Replication Server before they are sent to the target SAP HANA database. After the initial load is finished, a delta replay phase starts which continuously copies any recorded changes from the logging table to the target table such the data is replicated in real time.

This approach has the following advantages:

The impact on the source and target systems is minimized as most of the processing occurs in the dedicated SAP LT Replication Server.

The replication settings are stored centrally, and can be edited from one central location - in the SAP LT Replication Server. These replication settings specify which tables are to be transferred to the target system

The replication settings are stored in five tables in the SAP LT Replication Server. In the Replication Settings UI, you can all access all replication settings from one central transaction.

For a configuration, the replication settings are stored in five different tables in the SAP LT Replication Server:

Table Description

IUUC_REPL_TABSTG Contains the settings that specify how changes of table structure from source to target system, for example the table name, different line type defined in DDIC

IUUC_REPL_TAB_DV You can change the structure of the table at field level without defining a new line type in DDIC in the sender or SAP LT Replication Server.

IUUC_ASS_RUL_MAP You can specify mapping rules that are executed during the replication process.

IUUC_SPC_PROCOPT You can apply Customizing settings for database triggers in order to record changes to the source table.

IUUC_PERF_OPTION Contains settings regarding the performance of the replication, for example you can define settings for the reading type and portion sizes.

Table 1 Tables used for storing the replication settings for a configuration.

Page 10: Hana Slt Config En

Configuration Overview

Configuration List

10 June 2012

3 Configuration Overview When you execute transaction IUUC_REPL_CONTENT, the system displays an overview of all available configurations for the SLT Replication Server. You can view a list of all configurations as well as information about source and target systems. To display additional information about a configuration, choose the Display Details pushbutton.

You can also specify replication settings for a configuration that exists in a remote system (a remote SLT Replication Server).

Figure 1 The initial screen of the Replication Settings UI.

3.1 Configuration List

In the initial screen, the system displays a summary of all the configurations that exist in the current SAP LT Replication Server, see

Figure 2. In addition to the configuration name, you can view information about the source and target systems. In general, the schema name does not uniquely identify a configuration. For instance, an SAP HANA database schema could be filled from different source systems. The name of the configuration and the target system would be the same, so the configurations could only be distinguished by their source systems. You can use the SAP LT Replication Server to replicate database tables from SAP and non-SAP sources into an SAP HANA system. For non-SAP systems, the underlying database is accessed directly by SQL statements.

Page 11: Hana Slt Config En

3 Configuration Overview

3.2 Configuration details and selection

June 2012 11

Figure 2 A highlighted schema, and pushbuttons.

The following table details the fields from the Available Schemas table:

Field Description

Schema Name The name of the target database schema

Target Type Type of the target system

Source Type Type of the source system (either an SAP system or a non-SAP system)

Target System This field contains a concatenation of the host and instance number for the target system

Source System This field contains a concatenation of the system ID, host number and instance number for the source system

3.2 Configuration details and selection

You can view detailed information for a schema, for example the mass transfer ID and the SAP release of the source system. To view this information, choose the Display Details pushbutton.

Page 12: Hana Slt Config En

Configuration Overview

Remote Maintenance

12 June 2012

The mass transfer ID is an identifier that is used to group the objects contained in a configuration. The tables that contain the replication settings have the mass transfer ID as a key field in addition to the source table name.

To specify the replication settings for a configuration, select the relevant configuration and choose the Select Schema pushbutton (the system displays a new screen for this purpose).

3.3 Remote Maintenance

In complex system landscapes, it might be necessary to use more than one SAP LT Replication Server, and each server has its own configurations. Instead of logging onto each of these systems in order to specify the replication settings, you can specify the settings remotely. You can specify an RFC connection, and read and write the replication settings to the relevant database tables in the remote SAP LT Replication Server. Note that the RFC user must have sufficient authorizations to run transaction IUUC_REPL_CONTENT in the remote server.

To specify replication settings for a remote system, select the Change to Remote Replicator checkbox, and choose the appropriate RFC connection from the dropdown list. Note that you can create RFC connections in transaction SM59. The system updates the configuration list with the configurations from the remote system. When you have specified the relevant setting for the remote schemas, you can change back to the local system schemas by selecting the empty RFC connection from the end of the dropdown list.

Figure 3 Screen for selecting an RFC connection to a remote SAP LT Replication Server.

Figure 4 Select the checkbox to activate the input field and choose the RFC connection from the dropdown list.

Page 13: Hana Slt Config En

3 Configuration Overview

3.3 Remote Maintenance

June 2012 13

Figure 5 The system displays a dialog box that informs you that the connection is established and operating correctly.

Figure 6 The schema list for a remote SLT replication server. The RFC connection field shows the name of the used connection as defined in transaction SM59.

Page 14: Hana Slt Config En

Configuration Overview

Remote Maintenance

14 June 2012

Figure 7 To change back to local schemas, select the empty line from the dropdown field.

Page 15: Hana Slt Config En

4 Replication Settings Overview

4.1 Replication Settings for Source Tables

June 2012 15

4 Replication Settings Overview

After you select a configuration, the system displays a new screen that contains a summary of the configuration. On the left-hand side, you can view information about the schema details such as the schema name, mass transfer ID, and the SAP LT Replication Server as well as information about the source and target systems. You can add tables in order to specify specific replication settings, and also import and export settings. You can also retrieve source tables which are already processed from the SAP LT Replication Server. On the right-hand side, you can view all the tables, together with their custom replication settings which have been added either manually or from the replication server. In addition, you can view the replication status. Checkboxes indicate which of the tables for the replication settings have entries for each source table.

Figure 8 Overview of all the tables (together with their custom replication settings) that are contained in a schema.

4.1 Replication Settings for Source Tables

The system displays the source tables in table Replication Settings for Source Tables. The table contains the following fields:

Field Description

Source Table Name The name of the table in the source system

Replication Status Current replication status of the table

REPL_TABSTG This table contains custom table settings such as a changed table names or structures. A selected checkbox indicates that this table contains entries

Page 16: Hana Slt Config En

Replication Settings Overview

Replication Settings for Source Tables

16 June 2012

for the relevant source table.

ASS_RUL_MAP This table contains the settings for mapping rules that are used during the replication process. A selected checkbox indicates that this table contains entries for the relevant source table.

SPC_PROCOPT This table contains the settings for database triggers. A selected checkbox indicates that this table contains entries for the relevant source table.

PERF_OPTION This table contains the performance settings, such as the reading type. A selected checkbox indicates that this table contains entries for the relevant source table.

The Source Table Name field can be changed. If you change this field, all the settings that exist for the table are copied to this new source table. The Replication Status field indicates whether a table is already being replicated or not. Changes made to the settings of tables that are being replicated will have no effect as the corresponding runtime objects have already been created. In general, if you want to change the settings of such tables, you must reload the tables - that is, stop and restart the replication.

Below the table, there are standard pushbuttons for managing tables. You can use these pushbuttons to select or deselect all entries, add a line before the currently selected line, delete the marked lines, or sort the entries. If you delete a table name from this list, all settings for this table will also be deleted. To edit the replication settings for selected tables, choose the Edit Settings for Selected Tables pushbutton.

Page 17: Hana Slt Config En

4 Replication Settings Overview

4.2 Add Source Table

June 2012 17

Figure 9 Overview of all tables together with their custom replication settings. The first column contains the source table names. The replication status for any of the tables has not been set yet meaning that they are either not in replication or their status has not been updated yet. The checkboxes indicate whether a source tables has entries in the corresponding settings tables. For instance, the table SAPLANE has custom settings in IUUC_REPL_TABSTG, IUUC_ASS_RUL_MAP, and IUUC_PERF_OPTION but none in IUUC_SPC_PROCOPT.

4.2 Add Source Table

To add a source table in order to customize the replication settings, you have two options. You can either, add a line and change its name (see Figure 9), or you can use the input field on the left-hand side of the screen. If you use the input field, the system checks whether the table already exists in the list or not.

Page 18: Hana Slt Config En

Replication Settings Overview

Managing Files

18 June 2012

Figure 10 Adding a table manually.

4.3 Managing Files

Exporting replication settings to a file is a convenient way of saving replication settings for later use in a different replication. The entries of the replication settings tables (see Table 1) and also the code for the includes specified as mapping rules in table IUUC_ASS_RUL_MAP (see section 5.3.2 for more information) are saved to a file. When importing a saved configuration, only the entries of the replication settings tables are uploaded to the system. Code for includes is not created – if the new configuration runs on the same server, these includes would already be there, if a different server is used, they must be created manually. In addition, during the upload, the mass transfer ID and the SAP release of the sender system will be updated in the relevant tables automatically.

Figure 11 Pushbuttons for importing and exporting a configuration.

4.3.1 Export to File

When you export the replication settings to a file, (pushbutton Save Settings to File), the system displays a dialog box where you can specify the location for the file (see Figure 12). All entries of the settings tables as well as includes specified as mapping rules in IUUC_ASS_RUL_MAP will be saved in the file.

Page 19: Hana Slt Config En

4 Replication Settings Overview

4.3 Managing Files

June 2012 19

Figure 12 Dialog box for saving the settings as a template to file.

4.3.2 Import from file

Figure 13 Dialog box for importing settings from file.

You can import replication settings from a file. You have the following options for uploading settings:

Load All, Discard Original Settings

Page 20: Hana Slt Config En

Replication Settings Overview

Managing Files

20 June 2012

- The system uses the uploaded settings only; the existing settings are not used

Load All, Update Original Settings

- The existing settings are updated with the information specified in the uploaded settings.

Load Selected Settings

- You can decided with of the uploaded and existing settings should apply

4.3.2.1 Load All, Discard Original Settings

Figure 14 Upload option 1: Load All, Discard Original Settings.

You can discard the existing settings, and use new settings for all tables. All the entries in the settings tables are deleted and the uploaded entries are used. If a table has Customizing settings in the original configuration but none in the new one, it will not have any settings afterwards. For example, if the tables ‘SAIRPORT’ and ‘SPFLI’ have customized settings, but the template contains only entries for ‘SPFLI’ and ‘SFLIGHT’, the new configuration after the upload would only contain settings for tables ‘SPFLI’ and ‘SFLIGHT’, not for ‘SAIRPORT’.

4.3.2.2 Load All, Update Original Settings

Figure 15 Upload option 2: Load All, Update Original Settings.

Page 21: Hana Slt Config En

4 Replication Settings Overview

4.3 Managing Files

June 2012 21

You can use this option to keep the original settings for a table if the table is not contained in the template file (see Figure 16). For example, if tables ‘SAIRPORT’ and ‘SPFLI’ have customized settings but the template has entries for the tables ‘SPFLI’ and ‘SFLIGHT’, the new configuration would include all three tables. This option is particularly useful if settings are uploaded from several files.

Figure 16 Originally, the tables in the section highlighted on the top of the screen, and some of the tables highlighted in the section on the bottom of the screen have customized replication settings, (see Figure 9). When updating the settings from a template file that only contains settings for the tables in the bottom section, tables from the both sections will have custom settings. In the first case, (see Figure 14), the settings for the tables in the top section would be deleted.

Page 22: Hana Slt Config En

Replication Settings Overview

Managing Files

22 June 2012

4.3.2.3 Load Selected Settings

Figure 17 Upload option 3: Load Selected Settings.

You can use this option to merge original and uploaded settings manually for each table. You can compare the settings for each table, and you can choose which one will be used or whether the settings for this table should be deleted (see Figure 18). The default behavior is to keep the original settings if they exist, and use the template if they do not (the opposite behavior of the previous option (see Figure 15). In addition, you can compare the original and uploaded settings for each table, see Figure 19, and decide which should be used. It is also possible to use neither and omit the settings for a table, that is, to use neither the original nor the uploaded configuration for that table, (see Figure 20 and Figure 21 as an example).

Page 23: Hana Slt Config En

4 Replication Settings Overview

4.3 Managing Files

June 2012 23

Figure 18 List of all tables either contained in the current (original) settings or in the imported template. The checkboxes in the second and third column indicate what kind of settings exists. In this example, the first five tables are part of the current configuration only. The next four tables have settings defined in the current configuration as well as in the template and the remaining tables are only included in the file.

Page 24: Hana Slt Config En

Replication Settings Overview

Managing Files

24 June 2012

Figure 19 Comparison of original settings and those imported from file (template). Here, the only difference is the target table name. Choose the pushbutton Keep Current Settings to use the current setting (‘Z_SCOUNTER’), the pushbutton Use Template to use the uploaded (‘ZFLIGHTS_SCOUNTER’), or use the pushbutton Omit Table to omit both settings and use the original name (‘SCOUNTER’).

Page 25: Hana Slt Config En

4 Replication Settings Overview

4.3 Managing Files

June 2012 25

Figure 20 Example of the settings that will be used for the different tables. The resulting overview list is shown in Figure 21.

Page 26: Hana Slt Config En

Replication Settings Overview

Tables in Target System

26 June 2012

Figure 21 Overview of the replication settings for the tables from Figure 20 for the upload. The omitted tables ‘SCOUNTER’, ‘SCPLANE’, ‘SCURR’, ‘SCURX’, and ‘SCUSTOM’ do not appear any more.

4.4 Tables in Target System

Before customizing the replication settings for a table, it is generally advantageous to check the replication status. If a table is already in replication, it usually must be reloaded for the changed settings to take effect. You can use the pushbutton Update Replication Status to obtain the replication status of each table already contained in the configuration, and the pushbutton Add Tables from Target System to add all tables to the list which are already processed.

Figure 22 Section Tables in Target System.

Page 27: Hana Slt Config En

4 Replication Settings Overview

4.4 Tables in Target System

June 2012 27

4.4.1 Update Replication Status

Figure 23 The tables ‘DD02L’, ‘DD02T’, and ‘DD08L’ are always loaded automatically when a new configuration is created. When manually adding these tables to the Replication Settings for Source Tables table, their replication status will be empty, but can be updated from the SAP LT Replication Server see Figure 24.

Figure 24 The replication status of the tables ‘DD02L’ and ‘DD02T’ has been obtained from the SAP LT Replication Server. The table ‘DD08L’ was not added manually and therefore is not shown when updating the status.

4.4.2 Add Tables from Target System

If the tables are added from the SAP LT Replication Server (pushbutton Add from Target System), all tables which are in process or which have been processed will be added to the table list and the replication status of all table will be set (see Figure 25).

Figure 25 After adding the tables from the target system, the third table currently in replication, ‘DD08L’, has also been added.

Page 28: Hana Slt Config En

Customizing the replication settings

Overview

28 June 2012

5 Customizing the replication settings

5.1 Overview

To customize the replication settings, choose the Edit Settings for Selected Tables pushbutton. It consists of the following sections (see Figure 26):

Configuration Details

- You can view information about the current configuration.

Active Source Table

- You can add lines to the tables for replication settings for only active tables

Replication Settings for Tables

- You can add or delete source tables. You can specify an active source table for which lines can be added to the tables for replication settings. You can also see whether entries exist for the tables for replication settings for a source table.

Tables for Replication Settings

-You can view the tables for the replication settings. Note that source table names cannot be changed in the settings tables.

Figure 26 The screen for editing the replication settings shows the schema details on top left, the bottom left is used for managing the source tables and the right side contains the settings tables.

5.2 Source Table Management

In section Replication Settings for Tables, you can view all source tables in the configuration. You can choose which table settings are displayed. All the replication settings can be modified with the exception of the Source Table Name field. This field cannot be changed as accidental changes

Page 29: Hana Slt Config En

5 Customizing the replication settings

5.2 Source Table Management

June 2012 29

might invalidate the entire settings – and, if so, the code generator would not be able to find the settings for a source table, or, even worse, might apply them to a different source table.

5.2.1 Active source table

In order to add new settings for a source table, you must make the table active (see Figure 27). To do this, either double-click an entry in the overview list, or enter the name in the Add Settings for Table field and choose return.

Figure 27 Active source table.

Note that the table does not need to be part of the configuration yet. The system adds an entry to the Replication Settings for Tables table automatically after you add a new line to any of the tables for replication settings. For instance, the overview does not contain the table ‘SPFLI’ (see Figure 28). If you want to customize the replication settings for that table, enter the name in the Add Setting for Table field and you can add settings for the source table ‘SPFLI. Note that you can also double-click its name in the Replication Settings for Tables table, (see Figure 28). The system copies the name to the Add Settings for Table field and you can then change the replication settings.

5.2.2 Source table overview

In the Replication Settings for Tables table, you can see which tables are parts of the configuration. The source table name is in the first field and the last four columns indicate which settings are customized for that table (see Figure 21). If the Display flag is set for a source table, the corresponding entries for the settings tables are shown. Besides changing which tables are displayed, you can add tables to the configuration, copy the settings for one table to another, or set the active table by double-clicking a table name.

Page 30: Hana Slt Config En

Customizing the replication settings

Source Table Management

30 June 2012

Figure 28 List of the source tables with individual replication settings: The second column shows if the configuration for the source table given in the first field will be displayed or not. The last four flags indicate if corresponding entries in the settings tables IUUC_REPL_TABSTG, IUUC_ASS_RUL_MAP, IUUC_SPC_PROCOPT, and IUUC_PERF_OPTION (from left to right) exist.

5.2.2.1 Displaying tables in the tables for replication settings

In order to change the displayed tables, you have two options. The first option is to select a table individually. To do this, select the display checkbox (see Figure 29). If the table is not displayed before, its settings will be shown and vice versa. Note that the active table cannot be removed from display. The second option is to select several tables by marking lines in the table list and pushing the ‘Display Selection’ pushbutton (see Figure 30). Only the settings for the marked tables will be shown afterwards, i.e. if a table is displayed before but not in the selection, it will not be shown. The active table will be reset.

Figure 29 Change whether a table will be displayed or not by checking the Display checkbox. The settings for table ‘SAIRPORT’ are not displayed and those for ‘SBOOK’ are shown. If you select the Display checkbox for ‘SAIRPORT’, the system will display its replication settings.

Page 31: Hana Slt Config En

5 Customizing the replication settings

5.2 Source Table Management

June 2012 31

Figure 30 Besides setting displayed status for each table individually, it is also possible to select and display the settings for several tables at once. You can use the pushbuttons on the left for selecting or deselecting all tables, and the Display Selection pushbutton to display the marked tables.

5.2.2.2 Add/delete a table

Apart from the active table field, new tables can be added in the Replication Settings for Tables table too. To do this, a new line must be added and the empty table name changed to the required source table. The new table will not have any settings yet, though.

Similarly, you can also delete lines from the Replication Settings for Tables table list. In this case, all corresponding entries in the replication settings tables will be deleted as well, that is, those tables will not have any custom replication settings. Note that the active table name will not be reset. If you delete the active table from the overview list, you can add settings for that table right away without entering the name in the active table field.

Page 32: Hana Slt Config En

Customizing the replication settings

Source Table Management

32 June 2012

Figure 31 In order to add or delete source tables, you can use the buttons located below the overview list. If you add a line (left hand side), a blank line is added, where you can manually add the table name. When removing entries (right hand side), the replication settings for the tables will be deleted. In this example, the entries in IUUC_REPL_TABSTG (the other tables do not have custom settings for this source table - the relevant checkboxes are not selected) for table ‘SBOOK_2’ would be removed.

5.2.2.3 Copy settings

In the Replication Settings for Tables table, you can change the source table names. The replication settings for the old table would then be applied to the new source table. After entering the new name in the Table Name field (see Figure 32), the system displays a dialog box that asks you how you want to proceed. The options are to either rename the table name, or to copy the settings. If you copy the settings, the table name in the Replication Settings for Tables table and all associated entries in the settings tables will be changed to the new name. There will be no replication settings for the old source table any more. Whereas in the latter case, all entries will be copied to the new name such that old and new source table will have identical settings apart from the table name.

Figure 32 Change of table name in the table list

Page 33: Hana Slt Config En

5 Customizing the replication settings

5.3 Table Settings

June 2012 33

Figure 33 Options for changing the table name in the Replication Settings for Tables table. ‘Rename’ – all settings assigned to the original table (‘SBOOK’) will be assigned to the new table (‘SBOOK_2’). ‘Copy’ – the settings for the original table will be copied for the new table and both tables will have the same replication settings afterwards.

Figure 34 The two options when changing the source table name in the overview list. If you rename the source table, only the new table will have custom replication settings (left). When copying the settings, both tables will have identical settings (right).

5.3 Table Settings

On the right-hand side of the settings screen, there are the actual settings tables. Four of the five settings tables, IUUC_REPL_TABSTG, IUUC_ASS_RUL_MAP, IUUC_SPC_PROCOPT, and IUUC_PERF_OPTION can be accessed from tab pages where these tables can be edited directly. The fifth table, IUUC_REPL_TAB_DV, can be accessed from the IUUC_REPL_TABSTG tab page.

All tab pages have generic functionality for selecting or deselecting all entries. New lines can be added, where the active source table will be filled into the table name field, (see section 5.2.1). If there is no active source table, no lines can be added. Furthermore, selected lines can be deleted. The file interface introduced in section 4.3 is implemented through the two pushbuttons on the right without having to navigate back to the previous screen.

Page 34: Hana Slt Config En

Customizing the replication settings

Table Settings

34 June 2012

Figure 35 UI for editing the table settings. This UI comprises four tab pages, one for each of the four main settings tables. The first two buttons can be used to select or deselect all table entries. The next two buttons are for adding and deleting lines followed by buttons for sorting the entries by their table names in ascending or descending way. In addition, you can import all settings from a file or export them to a file.

5.3.1 IUUC_REPL_TABSTG

The table IUUC_REPL_TABSTG contains the settings for the basic table properties, such as table name and structure, in the target system. The fields of IUUC_REPL_TABSTG are listed in Error! Reference source not found..

Page 35: Hana Slt Config En

5 Customizing the replication settings

5.3 Table Settings

June 2012 35

Figure 36 IUUC_REPL_TABSTG describes the changes of the target table properties with respect to the source system. Error! Reference source not found. lists all fields and gives a brief description.

By default, the table created in the target system will have the same name and structure as the source table. It might, however, be necessary to change the name or alter the table structure depending on your requirements. For instance, tables from different sources could be replicated to one target system, some table fields might have become obsolete, or several fields could be combined into one field.

A new table name can be entered in the Target Table Name field. Modifications to the table structure can be achieved in two different ways (see Figure 37). Firstly, a different ABAP Dictionary data type can be used. This type would be either defined in the source system or in the replication server and must be entered in the Target Table Type field. If the target structure (database table, table type or structure) is defined locally on the SLT replication server, the checkbox (local target type) must be selected. The second way for changing the target structure is to define deviations in IUUC_REPL_TAB_DV. This settings table can be accessed by using the Edit Table Structure pushbutton (see Section 0). The Deviation checkbox will be set automatically if entries exist. Note that both methods for changing a table structure can be used at the same time. If a different ABAP Dictionary data type is defined, this type will be used as starting point for later modifications in IUUC_REPL_TAB_DV. The table name can be changed in the Target Table Name field.

The new table structure can be reviewed by double-clicking an entry in the Target Table Type field. All modifications, that is, the ABAP Dictionary type and entries in table IUUC_REPL_TAB_DV, will be evaluated and the system displays the new structure (see Figure 38).

The option No Drop prevents the recreation of the target table when a source table is added to a configuration. By default, the target table will be dropped if it exists and created again from the new configuration. This behavior has advantages regarding data and structural consistency but also has its limitations if more than one source table is replicated into a target table. For each of the source tables, the target table would be dropped and a new one created thereby losing all data that had already been loaded. In order to avoid the data loss that can result from this default behavior, the No Drop flag must be set.

Page 36: Hana Slt Config En

Customizing the replication settings

Table Settings

36 June 2012

The option ‘Row Store’ controls how the data is stored on the SAP HANA database. In contrast to many other databases, SAP HANA groups the data in columns and not by lines. Select this option if you want the data to be stored in rows instead of columns.

The size of read portions is the number of entries in one portion during the initial load for the default reading type DB_SETGET. It has no effect for other reading types, e.g. access plan, or for delta replication. For the latter, up to 5000 entries are selected in one portion.

The last field in IUUC_REPL_TABSTG is the partition command. It is a line of native (SAP HANA) SQL code executed during the creation of the table in the target system. The partition command can be used to split the target table into several smaller packages. For example, ‘PARTITION BY HASH (MANDT, CARRID) PARTITIONS 4’ would create the table with four hash partitions selected by the fields Client (mandt) and carrid.

The following table details the fields from table IUUC_REPL_TABSTG.

Field Description

Mass transfer ID [not shown in UI]

Mass transfer identifier of the configuration.

Table Name [no input field in UI]

Name of the source table in the source system, unique key field; is filled automatically from the active source table when adding a new line.

Target Table Type DDIC type of the target table if different from source table; Could be structure (note that a structure does not define any key fields), table type, or database table.

Local Target Type Target table type is defined on the replication server (‘X’) or source system (‘ ‘).

Target Table Name Name of the table in the target system.

No Drop Whenever a new table is added to a replication configuration, the target table is deleted from the target system (if it exists) and created again. Select this option in order to avoid dropping the target table, for example if several source tables are replicated into one target.

Row Store Data will be stored in rows instead of columns (default for SAP HANA are columns).

Size of Read Portions Number of records read in one package during the initial load when reading type is 3 (db setget), default is 10000. Has no effect during the delta replay phase or for different reading types.

Deviations from Table Structure [not an input field]

Indicates that the structure of target table deviates from the source table, the deviations are defined in the table IUUC_REPL_TAB_DV.

Partition command Partition command when creating the target table in the target system.

Page 37: Hana Slt Config En

5 Customizing the replication settings

5.3 Table Settings

June 2012 37

Figure 37 There are two options for changing the table structure. Either a different DDIC type (database table, table type or structure) can be defined either on the source system or on the replication server. Or the current structure can be modified through IUUC_REPL_TAB_DV, which can be accessed through the Edit Table Structure pushbutton (see section 0).

Figure 38 Review of the used table structure. By double-clicking an entry in the Target Table Type field in the tab page IUUC_REPL_TASTG, the used table structure in the target system will be displayed. If a different DDIC type is used it will be displayed here, together with any changes defined in table IUUC_REPL_TAB_DV.

IUUC_REPL_TAB_DV

IUUC_REPL_TAB_DV provides a way to modify the table structure in the target system without creating a new DDIC type in either the source system or on the replication server. This settings table can be accessed from the Edit Table Structure pushbutton in the IUUC_REPL_TABSTG tab

Page 38: Hana Slt Config En

Customizing the replication settings

Table Settings

38 June 2012

page (see

Figure 36).

The system displays a dialog box (see Figure 39) where you can modify or delete the fields of the original structure. In the upper part, you can view the original table structure. For each field, you can select whether you want to keep it, change the data type, or delete it, that is, remove it from the target table. In the lower part, you can insert new fields by specifying their name, position, and data type. Note that it is not possible to add key fields.

Page 39: Hana Slt Config En

5 Customizing the replication settings

5.3 Table Settings

June 2012 39

Figure 39 The screen for changing the table structure. The upper part shows the current table fields and allows you to modify or delete individual fields. In the lower part, you can add new fields and specify their position in the new table structure. All modifications are saved in table IUUC_REPL_TAB_DV.

Page 40: Hana Slt Config En

Customizing the replication settings

Table Settings

40 June 2012

Figure 40 Changing the data type of a field.

5.3.2 IUUC_ASS_RUL_MAP

The fields for settings table IUUC_ASS_RUL_MAP are listed in Table 2, and contain mapping rules. These rules are realized through custom ABAP coding that will be executed during processing. The code can be defined either in a ABAP Dictionary include or directly as a line of code in the settings table (see Figure 43).

Two different mapping schemes are supported - event-based rules, and parameter rules. For event-based rules, custom coding can be inserted at eight predefined points of processing. All fields of source and target tables can be accessed. Whereas the latter are used to calculate a target field from up to three source fields. Parameter rules are easier to use, but offer less flexibility than event-based rules. Both are described in more detail below.

In either case, the macro SKIP_RECORD can be used to prevent a record from being replicated. A skipped entry will be not be replicated.

Figure 41 IUUC_ASS_RUL_MAP is contained in the second tab, see Error! Reference source not found..

5.3.2.1 Includes, and lines of code

Figure 42 The two possibilities for specifying the custom coding. A DDIC include must be defined locally on the SAP LT Replication Server, whereas a line of code is stored directly in the settings table IUUC_ASS_RUL_MAP.

A line of code will be stored directly in the settings table IUUC_ASS_RUL_MAP. No ABAP Dictionary objects must be created. A serious limitation is the restriction to 72 characters for each line of code; this means that only simple mapping rules can be realized. In contrast, ABAP

Page 41: Hana Slt Config En

5 Customizing the replication settings

5.3 Table Settings

June 2012 41

Dictionary includes do not have any size limitations and can therefore be used to implement complex mapping rules. In order to review or modify the code, double-click on the name of the include. If the include does not exist, the system calls transaction SE38 instead.

Figure 43 The settings for IUUC_ASS_RUL_MAP. The first input field, Event, determines which type of mapping rule is used. If the field Event is empty, parameter rules will be used, otherwise event-based rules are used. The next four fields are only relevant for parameter rules. The last two fields define the code either through a DDIC include or directly in the settings table.

Field Description

Mass transfer ID [not shown in UI]

The mass transfer ID of the configuration.

Table Name [no input field]

The name of the source table in the source system, this is a unique key field, and is filled automatically from the active source table when adding a new line.

SAP Basis Release [no input field]

The Basis release of the SAP source system. This field will be filled automatically from the source system and also updated when importing settings from file.

Event Event at which the provided mapping rules will be executed for event-based rules. For parameter rules, this field must be empty.

Export Field Name Receiving field for parameter rules; this field is not relevant for event-based rules. Accessed as e_<fieldname> in the code.

Import Parameter 1 Import field for parameter rules; this field is not relevant for event-based rules. Accessed as i_<fieldname>_1 in the code.

Import Parameter 2 Import field for parameter rules; this field is not relevant for event-based rules. Accessed as i_<fieldname>_2 in the code.

Import Parameter 3 Import field for parameter rules; this field is not relevant for event-based rules. Accessed as i_<fieldname>_3 in the code.

Page 42: Hana Slt Config En

Customizing the replication settings

Table Settings

42 June 2012

Insert Include Name The name of the ABAP include that will be executed.

Insert Line of Code The line of code that will be executed

Table 2 Fields of the settings table IUUC_ASS_RUL_MAP.

5.3.2.2 Parameter rules

Parameter rules are used for simple value mappings. Their main advantage is their easy definition, whereby the target and source fields are specified directly in table IUUC_ASS_RUL_MAP. However, they offer less flexibility than event-based rules.

The Event field in IUUC_ASS_RUL_MAP (cf. Table 2) must be left blank for parameter rules and the target field name must be entered in the Export Field Name field. Up to three fields of the source table can be specified as input parameters for the ABAP code in the corresponding fields (Import Parameter 1, Import Parameter 2, and Input Parameter 3). If no input parameter is used, the first import field must contain the value ‘Dummy’ (including the quotation marks).

The export parameter of the code will be of the format ‘e_<fieldname>’, where <fieldname> is the name of the table field entered as export field in IUUC_ASS_RUL_MAP. The three import parameters can be addressed through ‘i_<fieldname_1>_1’, ‘i_<fieldname_2>_2’, and ‘i_<fieldname_3>_3’ with corresponding values for the fieldname. Two examples for parameter rules are given in Table 3Table 4.

Field name Value

Table Name SPFLI

SAP Basis Release 700

Event

Export Field Name CITYTO

Import Parameter 1 ‘DUMMY’

Import Parameter 2

Import Parameter 3

Insert Include Name

Insert Line of Code E_CITYTO = ‘HONOLULU’.

Table 3 Example for an entry of IUUC_ASS_RUL_MAP. In this example, the field CITYTO of the table SPFLI will be changed to Honolulu regardless of the original entry of the field CITYTO.

Field name Value

Table Name SPFLI

SAP Basis Release 700

Event

Export Field Name CITYTO

Import Parameter 1 CITYTO

Import Parameter 2

Import Parameter 3

Page 43: Hana Slt Config En

5 Customizing the replication settings

5.3 Table Settings

June 2012 43

Insert Include Name

Insert Line of Code IF I_CITYTO_1 = ‘HONOLULU’. E_CITYTO = ‘HANA’. ENDIF.

Table 4 Example for an entry of IUUC_ASS_RUL_MAP. All flights sent to Honolulu in the previous example will be rerouted to Hana Airport on Maui instead. Other import parameters could be used as well and it would not be necessary to include the target field.

Page 44: Hana Slt Config En

Customizing the replication settings

Table Settings

44 June 2012

5.3.2.3 Event-based rules

You can use event-based rules to execute custom ABAP coding at specific points of processing (see Table 5). A schematic listing of the replication process is shown in Table 5 with the events highlighted in green. The individual field mapping performed for parameter rules is printed in red italics.

Note that the begin of block (BOT) and begin of loop (BOL) events as well as the end of loop (BOL) and end of block (BOT) events would be executed directly one after another for simple structures like transparent tables. For more complex structures, such as cluster tables, the block events BOT and EOT would be triggered before looping over the clusters, whereas the loop events BOL and EOL are executed before looping over the entries of the logical tables in a cluster. Similarly, begin of record (BOR) and end of record (EOR) would do the same if no parameter rules are defined.

The data of source and target work areas can be accessed through field symbols in begin of record (BOR) and end of record (EOR) events. The field symbols follow a generic name scheme <wa_s_tablename> for source and <wa_r_tablename> for target work areas, where tablename denotes the source table name. For instance, the work areas for the table SPFLI would be <wa_s_spfli> and <wa_r_spfli>.

BOP – Begin of processing

DO

Get next portion from source system

BOT – Begin of block

LOOP AT source structures

BOL – Begin of loop

LOOP AT source table

MOVE-CORRESPONDING source work area TO target work area BOR – Begin of record

Individual field mapping (parameter rules)

EOR – End of record

Insert target work area into target table

ENDLOOP

EOL—End of loop

ENDLOOP

EOT – End of block

Write to target system

ENDDO

EOP – End of processing

Table 5 Schematic representation of the replication process.

The data is loaded in blocks. For each block, the system loops through the entries of the source tables and performs the ABAP command MOVE-CORRESPONDING from the source table work area to the target structure. The target structure is then inserted into the target table. The events for event-based rules are highlighted in green. The individual field mapping of the parameter rules in red italics.

Field name Value

Table Name SPFLI

SAP Basis Release 700

Page 45: Hana Slt Config En

5 Customizing the replication settings

5.3 Table Settings

June 2012 45

Event BOR

Export Field Name

Import Parameter 1

Import Parameter 2

Import Parameter 3

Insert Include Name

Insert Line of Code <WA_R_SPFLI>-SPFLI = ‘HONOLULU’.

Table 6 Example of event-based rules. The same mapping as in Table 3 is performed but now linked to the Begin of Record event.

Field name Value

Table Name SPFLI

SAP Basis Release 700

Event BOR

Export Field Name

Import Parameter 1

Import Parameter 2

Import Parameter 3

Insert Include Name

Z_SPFLI_MAP

Insert Line of Code

Table 7 Example of event-based rules. Instead of a line of code, an ABAP include will be inserted. The code is listed in Table 8.

* INCLUDE Z_SPFLI_MAP

“ redirect all Honolulu flights to Hana

IF <wa_s_spfli>-cityto = ‘HONOLULU’

OR <wa_s_spfli>-airpfrom = ‘HNL’.

<wa_r_spfli>-cityto = ‘HANA’.

<wa_r_spfli>-airpto = ‘HNM’.

<wa_r_spfli>-countryto = ‘US’.

ELSE.

“ skip all other records

SKIP_RECORD.

ENDIF.

Table 8 Example of an ABAP include for event-based rules. All table fields can be accessed through field symbols. Instead of one event-based rule, three parameter rules must be defined to achieve the same goal.

Page 46: Hana Slt Config En

Customizing the replication settings

Table Settings

46 June 2012

5.3.3 IUUC_SPC_PROCOPT

In the third tab page, you can use the settings table IUUC_SPC_PROCOPT to customize the code for the triggers that record the changes in the source tables. Note that this option is intended for expert users only. We strongly recommend that you contact SAP for support before using this feature, as incorrect use can result in serious data inconsistencies.

Note that you can also use the settings table IUUC_ASS_MAP_RULE to define rules for the database triggers.

Any rules that you define here only applicable for the replication process, they do not affect the initial load.

Figure 44 The trigger options for recording changes can be customized in IUUC_SPC_PROCOPT.

5.3.4 IUUC_PERF_OPTION

You can use settings table IUUC_PERF_OPTION to optimize the performance of the initial load of the individual tables, see Figure 45.

Figure 45 For each table, several parameters can be used to optimize performance.

Field Description

Mass transfer ID [not shown in UI]

The mass transfer ID of the configuration

Table Name [no input field in UI]

The name of the source table in the source system. This is a unique key field that is filled automatically from the active source table when adding a new line

No of Parallel Jobs The maximum number of jobs that will be used for loading the table

Field Name for Parallelization

The field name used for parallelization

Page 47: Hana Slt Config En

6 Appendix

6.1 Related Guides

June 2012 47

Seq. No. The sequence number for processing the source tables. Tables with low numbers will be loaded first

Reading Type The reading type for the table

Table 9 Relevant fields of the table IUUC_PERF_OPTION.

Reading type Description

1 – Access Plan Calculation An access plan is used for reading the table; the data will be split into portions which are then loaded into the target system.

2 – Pool tables Similar to the access plan reading type but the entire table will be read as one portion.

3 – DB setget (Cluster tables) Default option. Uses the function module DB_SETGET to fetch a predefined number of entries from the source table. These entries are ordered by their primary keys.

4 – INDX CLUSTER (IMPORT FROM DB)

Opens a database cursor in the source system and copies the data from the source table into an INDX table on the source system. The entries of the INDX table are then replicated ordered by their indices.

5 – INDX CLUSTER with FULL TABLE SCAN

Similar to the former type 4 but forces a full table scan.

6 – INDX CLUSTER filled from external

The INDX table is filled from an external report. Note that this reading type is not used for SAP HANA replication.

7 – INDX CLUSTER child table FTS

This reading type is not used for SAP HANA replication.

Table 10 Different reading types; the default option is DB setget.

6 Appendix

6.1 Related Guides

You can find more information about installation and configuration in the Master Guide.

6.2 Related Information

The following table contains links to information relating to the Application Operations Guide.

Content Quick Link to the SAP Service Marketplace

(service.sap.com)

Master Guide, Installation Guide and Upgrade Guide

instguides

ibc

Related SAP Notes notes

Released Platforms platforms

Page 48: Hana Slt Config En

Appendix

Related Information

48 June 2012

Network Security securityguide

network

Technical Infrastructure Ti

SAP Solution Manager solutionmanager