Вы находитесь на странице: 1из 5

Diff-Tool

Use

Summary

The Diff Tool is used for comparing any two ABAP data structures.

For example, you can compare two internal tables, structures, object instances, or even strings.

Here, differences in type (for example, different table types) as well as differences in contents are displayed in

table form.

In addition, there is the option of displaying the two variables to be compared in the respective detailed views.

These detailed views are linked and synchronized with the Diff Tool. This means that when you double-click an

entry in the Diff Tool, the detailed display will be updated automatically. This update then displays the

difference.

Detailed Description and Hints on Use

The Diff Tool is an absolutely standard Debugger tool. It can be displayed on all desktops ( Work Areas). (To

be found under Special Tools)

There are, however, certain special aspects to be noted:


 Only one instance of the Diff Tool can be displayed per desktop.

 A dedicated "Diff Desktop" is available for executing variable comparisons with the Diff tool.

The tool comprises two transactions:

 "History": Here you will find all the variable pairs that have been compared so far. If you double-click

one of these pairs, a new comparison will be started.

 "Compare ABAP Variables": This is the actual work interface for comparing variables

Variable Compare - Procedure and Description

In the area Compare ABAP Variables, you will find two fields ready for input: variable1 and variable2. Here you

enter the description of the two variables to be compared.

After you have confirmed the input, the current contents of the variables are presented to the right of the input

fields.

if both variables do not exist or they are not suitable for a comparison transaction, a corresponding message

will be issued and an icon that displays the type differences will appear beside the variables.

The following variable types can be compared:

 Simple data type (C,N,D, T, I P,F) with simple data type

 Simple data type with String, XString

 Structure with structure

 Internal table with internal table (watch out for header line !)

 Object reference with object reference

 Data reference with data reference

If both variables exist and are suitable for a comparison, the following pushbuttons / input fields appear under

the variables after you have confirmed your entries:

 The pushbutton Start Comparison ( ) for starting the type and value comparison.

 The pushbutton (icon) Display Variable ( ) opens the appropriate detail views for both variables

and synchronizes them.


 The input field Max. No. of Hits enables you to limit the number of hits displayed. If there is already a

results list, any change in the maximum number of hits will automatically restart the comparison with

the new settings.

After you have started the comparison, the differences will be presented in table form.

Note the following here:

 For value comparison, the semantics of the ABAP command "IF" are used. This means that two

variables are taken as having the same value if the IF command would also determine equality

 To limit the runtime, no deep comparison is executed for subcomponents of the types table, object

reference, data reference. In such cases, the system only checks whether the two elements are

different, without supplying details on the differences. In the results list, you will find the pushbutton

Start Comparison ( ) for these subelements so that you can restart the Diff Run and get details

of the differences in question. Through the History button, you can return to the original results list.

Setup of the results list (columns):

 Index

 Diff: For interrupted deep comparisons (subcomponents with the types table, object references, data

references), there is a pushbutton here called Start Comparison ( ) so that you can get details on

the differences by restarting the Diff Run.

 General Difference: Type differences are marked with an exclamation symbol ( ).

 Description: Explanatory text

 Found Location: Naming of the exact component of the variable, including offset and length

specification where the difference was found

 <Variable1> and <Variable2>: In the column headings, you will find the two original variable names. In

the respective hit lines, you will see the value of the found location displayed.

Display of Hits in Detailed Views

For the different ABAP data types, specialized detail views are available in the new ABAP Debugger (for

example, for internal tables you have the Table Display).


In the Diff tool, you can display the two variables to be compared in the respective detail views at any time. (->

pushbutton Display Variables ).

These detailed views are linked and synchronized with the Diff tool.

Synchronized in this connection means that scrolling in detailed display 1 automatically triggers scrolling in

detailed display 2.

Being synchronized and linked with the DIFF tool in the detailed views is displayed with the icon Linked with

Diff Tool ( ).

As soon as a detailed view is closed or a different variable is displayed by the user in the detailed view, the link

to the Diff Tool is interrupted and the detailed views are again completely independent.

This separation from the Diff tool can also be achieved through the service function Separate Detail Displays in

the Diff tool.


Double-clicking a hit means that this found location is presented in the appropriate detailed views. Using the

scroll icon ( ), you can navigate to the next hit.

In the services ( Tools Services) for the Diff Tool, you will find the standard functions for searching in the hit list

as well as saving the hit list in a local file.

Вам также может понравиться