(DV-2011) ERP Report Definition

The ERP Report Test Case is a collection of Report Test Variants.


Creation of ERP Report Test Case

After you click on Variants button a screen for Report Variants selection is displayed.

Report Variants Selection

ERP Test Case variant selection screen


Here you can create a new or add an existing Report Variants into an ERP Report Test Case. All these functions are accessible from the toolbar menu.

Create New Report Variant 

Screen for creating a new Report Variant is displayed by clicking on the Create New Report Variant button (Ctrl + F3).


Create new Report Variant screen

In this screen you can define:

  1. RFC Destination – RFC destination that will be used for Report Variant execution.

  2. Variant Description – The description of the new Report Variant. Following placeholders are allowed in the description:
    • <REPORT> - will be replaced with name of the report defined in this variant
    • <VARIANT> - will be replaced with name of the report variant defined in this variant
    • <DATE> - will be replaced with current date on the system
    • <TIME> - will be replaced with current time on the system
  3. Report (required) – Technical name of the report to be used for image creation.

    Validate creates before and after images from report execution spool. Only reports that create such spools when executed in a background job should be used

  4. Report Variant (ABAP Variant) – Variant of the specified report to be used when the report is executed. These variants can be managed in transaction SE38.

  5. After Image Variant ID – ID of the Report Test Variant that is used for the after image creation. This allows you to compare the output of different Reports/Report Variants or outputs from different systems.

By clicking on Advanced Settings we can define comparison settings, that will be used at the comparison stage of the variant. If nothing is changed in comparison settings, default Simple Report Comparator will be used. We can change the following settings:

  1. Ignore Date and Time - Each report comparator is capable of ignoring time stamps in a number of standard formats that often cause the difference in the output of reports as they are executed at different times. Following date format patterns are recognized with all date notation (using delimiters '.', '/' and '-' ):   mm*dd*yyyydd*mm*yyyyyyyy*dd*mm, yyyy*mm*dd,  mm*yyyy, yyyy*mm. Following time format are recognized:  hh:mm:ss, hh:mm.

    Each recognized date and time is internally not removed but replaced with special character '#' in appropriate character length, e.g.: '16.04.2020' with '##########', '04/2020' with '#######' or '21:56:06' with '########'

  2. Compare Only Data – Each report comparator can ignore lines which don't contain any alpha-numerical character (0-9, a-z or A-Z).

  3. Report Comparison Type – Datavard Validate comes by default with five report comparators:
    • Simple Report Comparator compares the report output in B-image and A-image row by row so matching lines have to be in the same position. This comparison is suitable for auditing if frozen data was affected with some change on the same system after period of time. 
    • Advanced Report Comparator searches for exact match of row from Before Image in After Image rows independent of the position of row. Each row in before image and after image is normalized before comparison. Process of row normalization depends on selected comparison attributes and on defined mapping if was chosen.
    • Report Comparator with Threshold compares each line of Before Image with each line of After Image and calculates their similarity. It evaluates if the line has a match according to the line similarity threshold with default value 1 which represents the exact match. The overall similarity of reports is calculated as the arithmetic mean of matched values. 
    • Custom BADI Report Comparator allow you to implement own comparison logic. To create your own BADI comparator you need to create an implementation for BAdI /DVD/EQS_BADI_REP_COMPARE. Example BAdI implementation class /DVD/EQS_CL_BADI_REP_COMPARE is set by default with same processing as used in Advanced Report Comparator.BAdI Report Comparator Settings
    • Python Report Comparator uses language Python on the application server layer to compare before and after image. To use this comparator there must be Python version 2.7 or higher installed on the application server (or remote application server) then appropriate python script loaded to Validate repository and finally some additional expert setup has to be done. More is described in /wiki/spaces/KATE/pages/1628733460. This option of comparator is switch off by default in Validate Backend Settings. The python comparator does the same as Advanced Report Comparator with using predefined mapping and custom specific mapping but also with the option to propose (generate) mapping from deep analyses of before and after image report output. The alpha version of python comparator script is available on demand.  
      Python Report Comparator Settings
  4. Use Predefined Mapping – is used to match some of the known differences in standard report outputs caused by different versions of the SAP system. Option is available for all Report Comparator Types except Simple Report Comparator. 
  5. Mapping Name - input for the name of custom specific mapping. It allows to define own mapping to match some report's specific differences in standard report outputs caused by different versions of the SAP system or caused by custom changes and setup. Option is available for all Report Comparator Types except Simple Report Comparator. Combination of predefined mapping and custom specific mapping is allowed. In such case the predefined mapping is applied as first on all rows. How to define custom specific mapping is described in the section Define mapping for report comparison.
  6. Line Threshold - available only with Report Comparator with Threshold. It sets the threshold to evaluate the minimal similarity of the line from before image to any line from after image to consider it as a matched line. Valid input is float value of range from interval 0.01 to  1. The default value is 1 which means the exact match of lines.
  7. Report Threshold - available only with Report Comparator with Threshold. It sets the threshold to evaluate the minimal similarity of report outputs to consider them as identical. Valid input is the float value of range from 0.01 to 1. The default value is 1 which means the exact match of report outputs.
  8. Preset ID - available only with Python Report Comparator. When choosing Python Report Comparator as comparison type, Preset ID must be defined. More on why it is needed is described in /wiki/spaces/KATE/pages/1628733460.

Report Test Variant is created after you click on the Continue button (Enter). 

Add Existing Report Variant 

The Add Existing Report Variant button displays all of the existing Report variants in the system and you can select one or more variants to be added into the current Test Case.

Add Report Variants of Run 

The Add Report Variants of Run button displays all of the ERP Reports that have been run in the system and you can select one of these variants to be added into the current test case.

Copy Report Variants of Run 

You can create copies of Report variants by selecting multiple variants in selection table and then clicking on  Copy Report Variants toolbar button. For each selected variant new variant is created with exactly the same settings as the source variant. 

Message log from copying variants 

Generate Report Variants 

The screen for the generation of Report Variants is displayed after clicking on Generate Report Variants button (Shift+F7). 

'Generate Report Variants' screen

In this screen you can define:

  1. Description suffix – will be added to the description of generated variants, if they do not have a description specified in Reports Selection. Description of the variants is generated in the form 'Gen. Variant for $REPORT_NAME'. If the description suffix is a specified string, then '- $SUFFIX' is added to the description.
  2. Reports Selection – In this table, you can specify the pairs of report names with report variant names for the Before and After Image together with their RFC Destinations. For each pair, a new Report Variant is generated. It is possible to use patterns with an asterisk sign (*) in the report name and report variant name and define more Report Variants at once. Patterns can be used only in before image report names and report variants names, after image will be created with the same names.

Report Test Variants are created after you click on the Continue button (Enter). 

Generate by standard  (by default hidden under expert setting)

The screen for the generation of Report Variants from a predefined list of standard reports is displayed after clicking on Generate by standard button.  

'Generate by standard' screen

In this screen you can define:

  1. Before Image RFC destination – RFC destination that will be used for Report Variant Before Image execution. Leave the field empty for execution on the current system.
  2. After Image RFC destination – RFC destination that will be used for Report Variant After Image execution. Leave field empty for execution on the current system.
  3. Report Variant name prefix – prefix with asterisk sign (*) or exact report variant name to be used when the report is executed. Test variants will be created for every match of Report Variants name prefix with all available Report variants of reports selected in Reports selection.
  4. Reports selection – list of currently supported standard reports in various SAP modules. Select the checkbox to choose reports for the generation of test variants.

After you click on the Continue button (Enter), Report Selection is sent to the screen for generation of Report Variants, where you can check your Reports selection again. Test Variants are created after you click on the Continue button in Report Generation screen. 

Create After Images as copies

Select multiple variants and create after image variants for them. To access this functionality, in the context menu of the selected variants choose 'Create After Images as copies'. A dialog is then displayed where you can define the RFC destination that will be applied to all of the generated after image variants. All other settings are also copied from source variants.

Create After Image Variants as copies

Edit Report Variant

You can edit the existing Report variants by double-clicking on them in the table view. Only Variants that are not already in use in Test Runs can be edited. If a Report Variant is already used in the Test Runs, then the details can only be reviewed, but not changed. 
When variant details are displayed, you can check where this variant is used. By pressing the Where Used  button a table is displayed that contains all Test Plan/Test Case/Run ID information where this variant is used. 


Where Used List for Variant

Mass Edit Variants

You can edit more Report variants at once. Mass edit is done by selecting the required variants in the list and clicking on 'Mass Edit Variants'  button, a Dialog for mass edit of variants is then displayed. 

These are settings for comparison and variants, which are applied to every variant user selected. Changes to these values are done after clicking on 'Continue' (Enter) button. By marking the 'Edit' checkbox (on the left) only the values, which you want to be changed will be replaced in selected variants. Only variants that are not yet used in test runs can be changed by mass edit. Before the change, mass edit checks if the variant is used as before or after image in any test run. If the variant is not editable, or there is another problem, a warning/error message is displayed in the log. 

Report Variant Editor

Variant editor

(DV-2011) Variant Editor provides a central location where you can manage all the backend-testing variants

Delete Report Variants

Deleting the existing Report Variants can be done easily by selecting the desired rows and clicking on the delete button in ALV toolbar.

Any Report Variants that are still in use in the Backend Testing will be locked; therefore it is first necessary to delete these Report Variants from the given runs (or specific runs) before proceeding in deleting them permanently from the Report Variant Editor (i.e. system).

Transport Report Variants

It is possible to add the specified Report Variants to a transport to be transferred to another system (with Validate installed). To specify which of the Report Variants are to be transported you need to select them from the list. There are options for filtering and sorting in the ALV table that can be used to select the specified Report Variants more easily. 



Selecting Report Variants to be transported


After selecting the desired Report Variants and clicking on the  Transport Report Variants button, choose your transport request. You can select the request and confirm the transport for the selected Report Variants. 
It is important to note that the Report Variants only carry information about Validate related items, and not the transformation structures themselves so they should be imported only to the system where Validate is installed and the same SAP reports variants with the same structure exist.

Cleanup Report Variants

You can delete all unused Report variants by clicking on  Cleanup Report Variants button. The first screen with preselection filters of variants is displayed and you can restrict which variants should be checked for deletion. After you confirm this screen, a check is done to find all unused variants. A variant is unused if it is not assigned to any Test Case or Test Run.  


Report Variant Cleanup Preselection

All variants evaluated as not used are displayed in the dialog window. When you confirm the selection in this window variants are deleted from the system.

Define mapping for report comparison

Mapping is maintained via table maintenance (transaction SM30) in DB table /DVD/EQS_REPMAP.