Sqvi

Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

SQVI Data Validation Tool Quickviewer on BI

Applies to:
SAP BW 3.X and BI NetWeaver 2004s

Summary
The objective of this article is to explain the importance and usage of Quick Viewer in BI to compare large amount of data between ODSs, Master data tables and other RDBMS tables. We often do comparison between database tables to find the difference in each to trouble shoot the errors also we compare various custom tables which are maintained for look up and if data is not available for lookup we can use this tool to compare how many records is having a problem. For Example we generally join two ODSs to compare the matching and not matching records to see any mismatches. This paper describes on how to compare the database tables within SAP BI and also R/3 systems using QuickViewer without using other external tools like excel to compare. We have a ready made tool within BW and R/3 to perform this activity. Author: Harishraju Govindaraju

Company: Accenture Services Private Ltd Created on: 20 February 2009

Author Bio
Harishraju Govindaraju is working as SAP BI Consultant in Accenture Services Private Ltd and having extensive expertise in SAP BI and ABAP.

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 1

SQVI Data Validation Tool - Quickviewer on BI

Table of Contents
Scenario .............................................................................................................................................................. 3 Creating a QuickView...................................................................................................................................... 3 LEFT OUTER JOIN......................................................................................................................................... 6
In a Nutshell: ................................................................................................................................................................ 6

Executing QuickView ...................................................................................................................................... 8


Output: ......................................................................................................................................................................... 8

Restrictions/Limitations: .................................................................................................................................. 9 Relate Contents ................................................................................................................................................ 10 Disclaimer and Liability Notice .......................................................................................................................... 11

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 2

SQVI Data Validation Tool - Quickviewer on BI

Scenario
For an example, we need to validate whether we have captured all sales order header and item records correctly, we would need to validate both the Header ODS and Item ODS which we generally do by downloading the data to excel or other tools and compare each other to find the discrepancies. With this tool, you can easily compare both the ODSs and come to a conclusion which all documents are missing either in header or item level ODS. This tool can be used to compare only when you have a common key or column between tables.

Creating a QuickView
Call the Quickviewer using transaction SQVI.

Enter the name of the QuickView. QuickView names can contain a maximum of 14 characters. Choose Create.

Enter a title and comment for the QuickView, if you think they are relevant.

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 3

SQVI Data Validation Tool - Quickviewer on BI

The first step in creating a QuickView is selecting its data source. You can choose one of the following: Table Table join Multiple tables can be linked together to form a join. The result set is a table, each of the lines of which contains all the fields of all the tables used in the join. Logical database Logical databases are pre-defined paths for accessing database tables. These paths can be made available to various reports in code form. Logical databases are especially useful if the structure of the data you want to read corresponds to a hierarchical view. InfoSet InfoSets are used in SAP Query. InfoSets can be based, among others, on logical databases. Since the number of fields in a logical database can be extremely large, you can also hide fields. In addition, you can define help fields that users can edit like database fields. If you choose an InfoSet as your data source, the InfoSet must come from the standard query area. InfoSets from the global query area may not be used when creating a QuickView.

I will be using Table Join option to compare data between ODSs. Choose Basis mode if you want to create the list directly with no list design.

To insert the tables for comparison, go to Menu EDIT Insert Table

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 4

SQVI Data Validation Tool - Quickviewer on BI

Give the technical name of the table. In this case I am giving the technical name of the ODS active data table.

Similarly add other table for comparison. The system will automatically join the relevant fields whose technical names and characteristics are same. You can also customize the join as required. In this case I am joining Sales document and Source system as my join criteria.

The above is a simple join which displays all the data that are common in both. But I need to search all those matching records and unmatched records. For which I will be using a LEFT OUTER JOIN.

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 5

SQVI Data Validation Tool - Quickviewer on BI

LEFT OUTER JOIN A LEFT OUTER JOIN is one of the JOIN operations that allow you to specify a join clause. It preserves the unmatched rows from the first (left) table, joining them with a NULL row in the shape of the second (right) table. In a Nutshell: The result of a left outer join for table A and B always contains all records of the "left" table (A), even if the join-condition does not find any matching record in the "right" table (B). All the unmatched records of table A will be matched to a Null in table B.

In the above example DEPTNO column is the common key between the two tables. Now we could see DEPTNO E01 is not part of the second table, which is displayed in the result table with a null, here indicated by -. So by filtering on D.DEPTNO to null in result table we could get all the records that are not present in second table. To use Left outer join, Right click the join and you will get the below option to select the Left Outer Join.

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 6

SQVI Data Validation Tool - Quickviewer on BI

In the left panel, we could see the two tables being displayed with the following options. List Fields Checking the fields in list fields enables us to display those fields in the final output. Selection Fields Checking the fields in selection fields helps us to customize our selection screens before your report is executed.

Once the list fields and selection fields are defined for the tables, SAVE and Check the query. After Saving, Hit the Back button.

We now see our query ZCOMPARE_ODS created.

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 7

SQVI Data Validation Tool - Quickviewer on BI

Note: All quick views are user specific and can be seen only by the same user who has created the quick view.

Executing QuickView To execute a QuickView , select Execute or Execute with variant. If you select Execute with variant, you see a dialog box where you can enter the variant name.

Once we execute the query, we get the selection screen based on our formatting. Also you can execute this report in both foreground and background. Output: The left out join output will display both the matched and unmatched records. But as of now I am interested in only seeing the unmatched records. Unmatched records are those records that are present in table A and not present in table B. In order to display only the unmatched records I restrict the sales documents of the second ODS to Null in the selection screen as shown below.

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 8

SQVI Data Validation Tool - Quickviewer on BI

The Output explains that the below document numbers are present in left table but not in the right table.

Restrictions/Limitations:
This tool can be used to compare only when you have a common key or column between tables. And it is recommended to run this report with some selections which fetches considerable amount of data.

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 9

SQVI Data Validation Tool - Quickviewer on BI

Relate Contents
For more information, visit the Business Intelligence homepage.

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 10

SQVI Data Validation Tool - Quickviewer on BI

Disclaimer and Liability Notice


This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade. SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document, and anyone using these methods does so at his/her own risk. SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample, including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this document.

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 11

You might also like