Self-Inner Join Using SAP Quick Viewer (Tcode SQVI)
Self-Inner Join Using SAP Quick Viewer (Tcode SQVI)
Self-Inner Join Using SAP Quick Viewer (Tcode SQVI)
Introduction : SAP Quick viewer tool is used to fetch data graphically without writing codes. It helps the end
user to fetch data from a single table or inner joining multiple tables . It may be in Development , Quality
or Production server. Main advantage is that no need to transport any query report. It does not ask for any
Workbench Transport Request as it saves in local object at that server. T-code is SQVI.
Problem Description : Sometimes it requires to do self-inner join between a single table in SAP Quick Viewer
tool.
Solution : Suppose, in SAP ISU enter a Premise to fetch the connection object from T1 aliased table and pass
the connection object to T2 aliased table to fetch all Premise in the connected to that connection object. Means
Connection object can have multiple premise.
1. Enter T-code SQVI to open SAP Quick viewer.
2. Enter a name of quick view 'ZTEST1' and press 'Create' Button.
3. Enter a Title and Comments . Then select data source as Table Join and click enter.
4. Click on the 'Alias' button.
5. Click on 'Create' button.
6. Enter the table name ( EBVS table) and alias name (say, T1) on the pop-up of 'Create Alias Table'.
7. Now repeat step 5 and 6 to create another alias name (say, T2) of same table EVBS.
8. Press 'Enter' or click Ok button.
9. Click on insert table button to add table T1 and then T2.
10.T1 and T2 will be automatically connected by Primary key (VSTELLE - Premise).
11.Now right click on the link and delete the link if required.
12.Select HAUS field from T1 table and drag and drop it to T2 table HAUS field, then both will be linked.
13.Press back button .
14.In the List field selects sub-screen , add fields from the Available fields . Select Connection Object field
and move it to left field in list. Select the Premise to display fields.
15.Click on Selection fields.
16.Select Premise from possible selection fields.
17.Select Sort sequence sub-screen and select fields if ascending or descending sorting is required.
18.Click Save button and execute.
19.Enter Premise XXXXX and output will be displayed in ALV List Viewer.
Conclusion : SAP Quick Viewer is a useful tool . In any environment, required data can be fetched from a
single table or from various connected table by using inner join , self-inner join or left outer join.