Self-Inner Join using SAP Quick Viewer (T-code SQVI)
Author : Biswanath Guha
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.
- Enter T-code SQVI to open SAP Quick viewer.
- Enter a name of quick view ‘ZTEST1’ and press ‘Create’ Button.
- Enter a Title and Comments . Then select data source as Table Join and click enter.
- Click on the ‘Alias’ button.
- Click on ‘Create’ button.
- Enter the table name ( EBVS table) and alias name (say, T1) on the pop-up of ‘Create Alias Table’.
- Now repeat step 5 and 6 to create another alias name (say, T2) of same table EVBS.
- Press ‘Enter’ or click Ok button.
- Click on insert table button to add table T1 and then T2.
- T1 and T2 will be automatically connected by Primary key (VSTELLE – Premise).
- Now right click on the link and delete the link if required.
- Select HAUS field from T1 table and drag and drop it to T2 table HAUS field, then both will be linked.
- Press back button .
- 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.
- Click on Selection fields.
- Select Premise from possible selection fields.
- Select Sort sequence sub-screen and select fields if ascending or descending sorting is required.
- Click Save button and execute.
- 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.