Introducing Table Settings

Objective

After completing this lesson, you will be able to do table settings.

Table Settings

As we have seen, there are two types of structural changes:

  • Simple changes: adding a non-key field
  • Complex changes: changing a data type or length and adding or deleting key fields

Simple changes to a source system table structure do not interrupt the replication process. The replication of data can continue without the need for a new initial load.

In the event of a complex table structure change, the status of such a table changes to Failed. Thus, to resume the replication process for the table, you must stop and restart the table manually using the Data Provisioning button in transaction LTRC. However, if you select the Restart if Complex Changes Occur checkbox, whenever the system detects a complex change to the structure of the table, the system stops the replication process and restarts it automatically.

If you select the checkbox here, it will be applied to all tables in this configuration.

Under Options for Restart, the checkbox is selected next to Restart If Complex Changes Occur.

On the Table Settings tab, you can change the settings for a target table.

By default, the table created in the target system has the same name and structure as the source table. However, it might 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 be obsolete, or several fields could be combined into one field.

Screenshot of the Table Settings tab with options to configure

You can specify a new table name, which is entered in the Alternative Table Name field. For instance, you might want to name your target table according to your source system. For example, KNA1 from the T40 system is called KNA1_T40 in the target system.

A screenshot showing the following fields for input under Target Table Definition: Alternative Table Name, Structure Table, Template Location

Note

If the source system is an SAP S/4HANA system, and is capable of replicating CDS views (see SAP Note 2991278 - Extracting Delta Data from CDS Views in SAP S/4HANA using Change Data Capture Annotation), then it is not possible to specify an alternative table name. Refer to SAP Note 3084177 - Alternative Table Name field missing in LTRSTable SettingsSAP Landscape Transformation Replication Server (SLT).

You can modify the table structure in the following ways:

  • You can use a different ABAP dictionary table. This could be a copy of the existing table structure with adjusted fields. This type must be defined in either the source system or in the SAP LT Replication Server system. You enter the type in the Structure Template field.
  • You can define changes on the Table Structure page.

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 a starting point for modifications using the Table Structure page.

Table Properties screen with Table Store option set to Column (default).

The Table Store field defines how data is stored in the target database. Data can be stored in columns (the default setting) or rows. The third option is the History Column Store. If you select this option, the system records every change to the source table with a timestamp.

In the Partition Command field, you can specify a partition command for when the target table is created in the target system. The code that you specify here is executed when the table is created in the target system. You can use the partition command to split the target table into several smaller packages. For example, PARTITION BY HASH (MANDT, CARRID) PARTITIONS 4 creates a table with four hash partitions, selected by the Client (mandt) and CARRID fields. This is, for example, required by the SAP HANA database as the limit per partition is 2 billion records. Thus, you need to create partitions if you want to load more records. For performance reasons, it might make sense to partition, even if you will not reach the 2 billion records limit.

A screenshot of the Processing Settings section with fields for size, refresh behavior, technical language, and index options.

The options for the processing settings are as follows:

  • Size of Read Portions (legacy)

    The size of read portions refers to the number of entries in one portion during the initial load for the default reading type 3 - DB_SETGET. It has no effect for other reading types, for example, access plan or delta replication.

    For delta replication, up to 5000 entries are selected in one portion (refer to note 3005284).

    This refers to DMIS < SP13.

  • Refresh Behavior

    If a table is available in the target system, you can recreate the table (for example, if you want to reuse the structure of the table). To do this, you can choose one of the following options in the Refresh Behavior field:

    • Default:

      The system drops the target table completely (structure and data). The system recreates the tables again based on the configuration.

    • No Action:

      If the table exists in the target system, it is used for the replication. There is no change to the structure or data.

    • Drop:

      If you want to drop the target table completely (structure and data), choose the Drop option. The system recreates the tables again based on the configuration.

    • Truncate:

      If you want to preserve the structure, but remove all data from the table, choose the Truncate option.

      Note

      If you want to load into an existing table (or, for example, load from two systems into the same target table), change the default behavior.
  • Technical Language

    The technical language is the language used to create the column text in the target system. By default, the system uses the logon language of the user who created the configuration, but you can change the language here.

  • Restart if Complex Changes Occur

    The setting that you specify here takes priority over the settings under Options for Restart (the restart settings that apply to all tables in the configuration).

  • View for Initial Load and View for Replication

    This setting refers to loading from a view. This is explained later.

  • Secondary Index Options

    You can choose one of the following options:

    • Create unique index in the target system.
    • Create non-unique index in the target system.
    • Create non-unique index and unique index in the target system.
    • Do not create secondary index in the target system.

Table Structure

A screeenshot showing table structure data for ZSFLIGHT_00, listing fields with position, key, data type, and length, for example. Beside this, there is a section View Modified Table Structure with the same field options.

You can change the target table structure on the Table Structure tab. You can view the existing table structure and the new table structure side by side.

With this option, you can minimize the target table to save memory. Alternatively, you can enhance it to fill the additional field with a transformation rule on the fly. Data type changes could be required if you plan to fill a field with additional values or if another data type is expected by the target application.

Three screenshots: one showing the original table structure, another of the modification overview where a new field (SID) is added, and the modified table showing SID added as a field.

You can modify the structure in the following ways:

  • Add a New Field

    To add a new field, choose Add. Specify the field name, and information such as the position of the field in the table and the data type.

  • Change a Field

    Change the characteristics of a field. Select a field and choose Edit. For example, you can change the position of the field in the table or the length of the field.

  • Remove a Field

    Remove a field from the table. Select a field and choose Remove. Choose Mass Change to change several fields at the same time. Choose View Modified Table Structure toggle to view the modified table structure. All modifications, that is, the ABAP dictionary type and changes made on the Table Structure tab, are considered. The system displays the new structure.

Note

If a new field is positioned immediately after a key field, the new field also becomes a key field. This occurs after you choose View Modified Table Structure or when you choose Save. For example, if a key field is located in position 2, and you place a new field in position 3, then the new field becomes a key field.