Code Display

The Code tab displays the ABAP, DDL source, XML code or text associated with an object selected from a Hierarchy dataset, or compared by the Quick Compare Wizard. If the code or text is the same on each of the compared systems, the Code tab is marked with Same icon.. If the code or text is different, the Code tab is marked with Different icon..

Code Display.

When displaying ABAP code, the code display uses the standard ABAP syntax highlighting available in the SAP Front-End Editor.

The main area of the code tab consists of two scrolling panels. The left-hand panel displays code from the System 1 RFC Destination; the right-hand panel displays code from the System 2 RFC Destination.

Code Shading

Shading is used to indicate differences in the code:

  • Code lines that are in System 1 only are shaded red in the left-hand panel. The corresponding lines in the right-hand panel are marked with cross hatching to show that the code has been removed in System 2.
  • Code lines that are in System 2 only are shaded green in the right-hand panel. The corresponding lines in the left-hand panel are marked with cross hatching to show that the code has been removed in System 1.
  • Code lines that are different in each system are shaded red in the left-hand panel and green in the right-hand panel. Code characters that are different in each system have a darker red or green shading.
  • Code lines that are the same in System 1 and System 2 have no shading.

Scrolling the Display

Each panel has vertical scrollbar, which is shaded gray and positioned at the panel’s right margin. These allow the panels to be scrolled synchronously; scrolling in the left-hand panel is reflected in the right-hand panel, and vice versa.

A horizontal black line in each scrollbar indicates the position of the cursor in each panel. Click a black line to display the cursor’s position in the corresponding panel.

Navigating Code Differences

Two additional scrollbars in the code display’s right margin allow you to navigate to different portions of shaded code.

  • Click a red area in the first scrollbar to scroll to the corresponding red-shaded section of the left-hand panel.
  • Click a green area in the second scrollbar to scroll to the corresponding green-shaded section of the right-hand panel.

Text retrieved for SAPScript Text objects may be prefixed by the following formatting characters:

Formatting Characters Description

[* ]

Default paragraph

[B ]

Justified paragraph

[C ]

Centered paragraph

[L ]

Left justified paragraph

[/*]

Comment line

If the Code tab displays results from the Compare Objects and Make Hierarchy actions, the results shown are influenced by the ‘Source Code’ settings in the associated Object Attribute Filter.

  • If only the CODE attribute is set, the Code tab will indicate that the source code is the same if the only differences found are in the source’s code comments. Comment differences are still shown in the source code display.
  • If the CODE_AND_COMMENTS attribute is set, both code and comment differences will affect the status of the Code tab.
  • If both attributes are set, the CODE_AND_COMMENTS attribute takes priority.

Code retrieved for Form Object Forms (SFPF), Form Object Interfaces (SFPI) and Transformations (XSLT) is limited to 1000 lines. The 1001st code line for these object types reads ‘Results truncated at 1000 lines’.

Hierarchy Datasets

Quick Compare Wizard