Page tree
Skip to end of metadata
Go to start of metadata

There are many operations that you can perform to configure the comparison. Each of the tabs detail the operations that you can perform.

Maintaining comparison table and fields

For the comparison, you select data fields from one table or multiple tables arranged hierarchically after one another. To do this, create comparison tables in which you specify the data sources and data fields that you want to compare.

Regardless of the type of data source, the objects that you compare are represented as tables in this application.

You can select as many tables as you want for each system. You join the tables to one another using foreign keys. You assign foreign keys in the root table or the higher-level child table to the primary keys in the child tables. First create the root table: The first table that you create in a system automatically becomes the root table. Subsequent tables that you create become child tables. When the systems are compared, the information from the child tables is read using the foreign keys for the root table.

Procedure

  1. In edit mode, Inside the box Data Model for Comparison, on the editor, do a right click, click on Add / Remove and select Add table to Source 1 or Source 2, depending on which source you wish to add a table to.

  2. In the dialog box that appears. Specify the data source that you want to compare and select the data fields that you want in include in the comparison.



  3. Press pushbutton OK and the data sources and data fields that you have selected are displayed graphically.

  4. Save your entries.
  5. To create additional tables in the first system, in the context menu for the comparison table, choose Add / Remove and select Add table to Source 1 or Source 2, depending on which source you wish to add a table to.
  6. To create the data fields for additional tables, repeat steps 2 to 3.
  7. To create tables for the second system, in the context menu for the comparison table, choose Add / Remove and select Add table to Source 1 or Source 2, depending on which source you wish to add a table to.
  8. Save your entries.

You have selected the tables and data fields that you want to compare. Now create the foreign keys.

Hint: For ABAP-based systems, do not include client fields (CLIENT or MANDT) in your data model as in this case the selection will not work as expected. The generated extractors will contain OpenSQL coding that handles the client automatically (based on the logon client of the RFC destination).

Maintaining Foreign Keys

Foreign keys specify the relationship between root and child tables within a system. Assign data fields in the root table or higher-level child table, as foreign keys, to the primary keys in the child tables.

When you create multiple tables in a system, you assign foreign keys. This specifies relationships between the tables in a system. You must have defined the relationships between the various tables in a system to be able to validate the comparison object (Validate Comparison Object) and generate the function modules and SQL statements.

Procedure

  1. To create foreign keys for the first system, choose  Comparison in Edit mode.
    • Create the foreign keys by dragging the arrows on the outer side of the child tables (left for Source 1 and right for Source 2), to its higher-level tables. Join the tables so that the arrow goes from the child table to the root table (higher-level).
      • Save your entries.
  2. You have created the foreign keys.

    To delete foreign key relations, first click on the arrow, then right click and select remove element.

In this step you can choose the filter type and enter the filter criteria. You can use various types of filters in Cross Database Comparison to restrict the data being compared for the sources. You can create filters for both source systems or for one source only. (Further details about filtering see Filtering in Cross Database Comparison).

To maintain filter for the first or the second source system, choose Comparison in Edit mode. 

Choose the field in the data model for that you want to set filter. If you want to use an instance filter, set the check box. If you want to use object filter, enter the filter value. 

You can enter a filter type for a variable filter which allows that the filter values in the comparison instance can be entered in a field with the correct data type. Use the dropdown list box to select the correct filter type. Use the special filter type “relative timestamp” to enter relative timestamps in the comparison instance. (Further details about filtering see Filtering in Cross Database Comparison)

In the Instance Specific Filters screen area, specify values for the instance specific filters. You can create multiple comparison instances with different instance specific filters for the same comparison object. The data type of the fields depends on the filter type you entered during comparison object creation. If you chose filter type “relative timestamp”, you can use relative timestamps. (See Using relative date syntax


In the Cross Database Comparison (CDC) application, you usually extract only data, which is needed for the comparison. You can now extract further context fields just for information purpose on the comparison result UI.

There are two types of the context fields:

  • The field is only available in one of the source systems (e.g. some native key field or additional attribute), and therefore cannot be included as a common mapping field
  • The field is available in both source systems but always has different content (e.g. created-by fields) by purpose, and therefore is not suitable as a mapping/comparison field

On selecting the context field, an icon appears on the field of the data model.

 


In this step, you specify which data fields in the tables in the first system you want to compare with which data fields in the tables in the second system and which data fields are used as comparison keys. You assign this mapping a name with which you can later identify it.

You also create fixed and variables filters that you use to restrict the comparison. For fixed filters, you specify the data field and the exact value of the filter as soon as you create the comparison object. For example, you specify the restriction Country="DE" when you create the comparison object.

For variable filters, you specify when you create the comparison object that a certain data field is to be used as a variable filter, for example the Country data field. The variable filters are displayed in the comparison instance, where you can specify values for them, such as Country="DE". This allows you to create multiple comparison instances for the same comparison object and specify different filter values for each – for example, Country="DE" for one comparison instance and Country="IN" for another comparison instance.

Procedure

  • Choose Comparison → Edit.
  • Define the assignment by dragging the arrows provided between the tables from left to right.
    • A dialog box is displayed for each mapping assignment.

  • Enter the following data:

    • Tag Name: Enter a name for the assignment.
    • Comparison Key No.: You create at least one comparison key for the comparison and specify the sequence of the comparison keys.
  • Enter 123, and so on, to define the sequence of the comparison keys. Leave the field empty (0) for the data fields for the actual comparison.
    Ideally you can use the primary keys of the source tables as a comparison key. Alternatively make sure you chose another unique secondary key. It is mandatory to extract a unique and sorted comparison key. Extracting non-unique (=duplicated) comparison keys from a source system will later on result in a termination of the comparison run.

  • Variable Filter: Enter X to indicate that the assignment is a variable filter.
    If you do not want to use the assignment as a filter, leave the field empty.

  • You have the possibility to enter a filter type for the variable filter which allows that the filter values in the comparison instance can be entered in a field with the correct data type. Use the dropdown list box to select the correct filter type. Use the special filter type “relative timestamp” to enter relative timestamps in the comparison instance. For further details about filtering see Filtering Data
  • You have the possibility to choose pre-defined conversion IDs (such as delete leading zeroes, convert to upper case) for both source systems that allow you to convert the data before it is compared. You can also define and use your own conversion IDs by creating an implementation for enhancement spot DSWP_CDC_CONVERSION and entering the conversion ID in maintenance view CDC_V_CONV_TYPE. For further details about data conversion see Conversions

  • To undo the mapping, select the filed, right click and delete the mapping

The CDC application supports iteration, which means that you have the possibility to re-compare inconsistent objects. Iteration is useful if data changes frequently. It helps you to exclude temporary differences from the comparison result. Iteration can be started automatically after the first comparison is finished or manually. To start iteration automatically, enter at least one of the following parameters:

  • Maximum Number of Iterations: The maximum number of iterations that will be started automatically. If one of the exit conditions is met before the maximum number of iterations is reached, iteration will stop anyhow.
  • Delay: Time delay between two iterations (in seconds)
  • Exit Condition (%): Iteration stops if this percentage of inconsistent objects or a value below is reached.
  • Exit Condition (total): Iteration stops if this number of inconsistent objects or a value below is reached.

Change Documents in Comparison allow to track by whom and when a field value was inserted/changed/deleted.

Supported for header data attributes, multi-lingual descriptions, source-specific parameters, variable filter criteria.

Procedure

  •  To display changes, choose   Comparison Display
  • Choose →



  • No labels