How to create a quick report using transaction SQVI

Sometimes you need to extract information from one or more SAP tables, and you don’t have a standard report. So, if you don’t have time or resources to develop an ABAP report, transaction SQVI can be a solution.

 

In the example, we’re going to create a report which shows you the Vendor for each Material given, if there’s a Contract between the our company and the Vendor.

For this report, you will need access to the following Tables:

  • EKKO – Purchasing Document Header
  • EKPO – Purchasing Document Item
  • LFA1 – Vendor Master (General Section)

 

One important remark about the order. It should be:

EKPO -> EKKO -> LFA1

Because you have the Material Code (MATNR), you enter them in EKPO to obtain the Doc. Number.

Then you select the Doc. Number (EBELN), and enter them in the EKKO, and obtain the Vendor (LIFNR)

Then you enter the Vendor code in the LFA1, to obtain Vendor data.

 

As you can see, it’s important to know a little bit about Tables in SAP. I assume that you are already searching for information in the tables, and you want to make your life easier by using this transaction.

 

1. Enter transaction SQVI

Enter a report name in the QuickView field, and press “Create”:

2. Fill in the following information:

  • Title
  • Data source: Table join
  • Basis mode

Then press “Enter”

3. System sends you direct to the “Data Source” tab.

Press “Insert table (Shift-F1)” to start selecting the tables:

4. Type the table name and press “Enter”

(In the example, don’t forget to start with “EKPO”)

5. Repeat the process with the other tables:

6. Delete wrong links

The system creates already some links between the tables. They are usually correct, but sometimes you need to correct it.

In the case, we are going to connect the tables using “Purchasing Document Number (EBELN)” only, so you can right-click the other link and delete it.

7. Another correction

The link with LFA1 is also incorrect. You can scroll down the EKKO to verify it. This one needs to be deleted:

8. Drag the field to create a link:

In the example, drag the “LIFNR” from table “EKKO” to table “LFA1”:

(it’s possible to create right outer joins, for example. This is a little bit more advanced, I will discuss it in a future post).

 

This done, press F3 (green arrow) to complete SQVI creation.

9. Select fields to be exhibited:

In the Tab “List fld. select.”, you show which fields you want your report exhibits:

10. Select the fields, using the left arrow

Select the following fields for this example:

  • Material Number
  • Purchasing Document Number
  • Item Number of Purchasing Document
  • Account Number of Vendor or Creditor
  • Name 1
  • Address

Use the binoculars to search the fields. You will need it.

11. Switch between technical name and long text, to make easier:

By switching between technical name and long text (Shift+F5), you can also see the table where the fields originates. This can make it easier for you:

12. Tab “Selection fields”

Now you choose which would be the parameters for your selection.

13. Selected Fields

In the example, select at least these fields:

  • Purchasing Document Category
  • Material Number
  • Plant
  • Deletion Indicator in Purchasing Document

14. Check:

When you save/execute it for the first time, the system verifies if everything is ok. Some warnings can be shown, specially if you are dealing with Currency:

15. Execute (F8):

The report is ready to be executed!

16. Fill in the relevant information, and click on “Execute (F8)”:

Don’t forget to put the “=” in the Deletion Indicator:

(PS: more than one Material Number)

17. Et voilà!

You have all the advantages of all ALV Reports you have in SAP like: change layout, export to Excel, etc..

18. Next time…

Just enter SQVI transaction, select the report and click on “Execute”:

This entry was posted in SAP - General use and tagged , , , , . Bookmark the permalink.