Sap Query - Passo a Passo Sv01

18
1 SAP QUERY – SQ01 GUIA PASSO A PASSO - O texto transcrevi da internet (as telas são próprias). SAP Query enables data from multiple tables to be extracted in one report, as long as at least one field of data can be linked from one table to another e.g. by Document Number. Unilike table browser (SE16), report from SAP Query can be saved. You will need the required tables and fields before running SAP Query (if not known, refer to the list of tables PDF within the Data Extraction section). Click on the Quick Viewer button.

Transcript of Sap Query - Passo a Passo Sv01

Page 1: Sap Query - Passo a Passo Sv01

1

SAP QUERY – SQ01GUIA PASSO A PASSO - O texto transcrevi da internet (as telas são próprias).

SAP Query enables data from multiple tables to be extracted in one report, as long as at least one field of data can be linked from one table to another e.g. by Document Number.

Unilike table browser (SE16), report from SAP Query can be saved.

You will need the required tables and fields before running SAP Query (if not known, refer to the list of tables PDF within the Data Extraction section).

Click on the Quick Viewer button.

Page 2: Sap Query - Passo a Passo Sv01

2

The next screen enables new report to be created or saved reports to be run or amended.

Note: The Help topics at the botton of the page are referenced to the SAP Library on Internet Explorer.

Page 3: Sap Query - Passo a Passo Sv01

3

In this example we are creating a report to show all vendors for a particular Company with name, address, payment method and bank details.

This will involve joining three tables:

TABLE NAME What it containsFields Description (not a comprehensive list) SAP name

LFA1 Vendor Master VendorNameCityPostal CodeSearch TermStreetAddressCreated OnAccount Group

LIFNRNAME1ORT01PSTLZSORTLSTRASADRNRERDATKTOKK

LFB1 Vendor Master Data by Company

VendorCompany CodePersonnel Number

LIFNRBUKRSPERNRERDATAKONTZWELSZTERM

LFBK Vendor Back Details VendorBank KeyBank account numberAccount Holder

LIFNRBANKLBANKNKOINH

Note: A query will only work with actual tables and some e.g. BSEG are too large to work with. The system will let you know if it cannot work with a specific table. When this happens, logical databases should be used instead. These can be identified using transaction SE12 (See separate instructions).

Page 4: Sap Query - Passo a Passo Sv01

4

To create a new report.

Enter a name for the report in the QuickView display box.

Click “Create”

Enter a meaningful title for the report in the new box that has appared.

Page 5: Sap Query - Passo a Passo Sv01

5

If more than one table is to be used then select “Table join” from the Data source box.

Select “Basic mode” then, click the “green tick”.

Page 6: Sap Query - Passo a Passo Sv01

6

On the next screen, click “insert table”.

To avoid resorting fields later, tables should be entered in the correct sequence.

In this example we will display the Company data then the Address data and finally, the Bank data.

Enter table LFB1.

“Green tick”.

Click “Insert table” again and enter the next table (LFA1).

“Green tick”.

Enter the last table name (LFBK).

“Green tick”.

Page 7: Sap Query - Passo a Passo Sv01

7

The screen should now look like this.

This shows all available within the select tables and all the links between them.

In this instance there is only one link between all tree tables and that is the vendor number (LIFNR). The links need to be checked as sometimes they are not correct.

To check a link – right click on the line and select ‘Display join condition’. Both fields should be the same (apart from the numbering).

To delete an incorrect join – right click on the line and select ‘Remove join condition’.

To add the correct join – click and drag the field from the left hand table to the corresponding field on the right hand table and release.

Once the tables and joins have been set, click the Green “Back” Arrow.

Page 8: Sap Query - Passo a Passo Sv01

8

The following screen should be displayed.

On the left hand side are the tables selected.

The right hand side shows the available fields for selection / report layout.

Page 9: Sap Query - Passo a Passo Sv01

9

For some reason the field name text is different to the field description on the actual table, however, the left hand screen can be expanded to display the SAP field name (which is constant) and to specific list and selection fields from each table.

As the link to vendor number has already been made, this field only has to be selected from one of the tables. Likewise for other fields that appear more than once, they only have to be selected once, for where they are to appear in the report.

As each field is selected it appears on the right hand side display, when this process is complete click on “Execute”.

Page 10: Sap Query - Passo a Passo Sv01

10

The next screen enables the selection criteria to be entered.

If this is not as expected then go back to the previous screen and add/delete selections boxes.

Page 11: Sap Query - Passo a Passo Sv01

11

Select “Table” and Green tick;

Page 12: Sap Query - Passo a Passo Sv01

12

“Green tick” the next screen to run the report.

A spreadsheet titled “Worksheet in Basis (1)” should be displayed.

Click on File, Save copy as …

Rename the file and save in the SAP download area (it’s a good idea to create a specific folder in your audit directory for this purpose).

Page 13: Sap Query - Passo a Passo Sv01

13

To run or change an existing query.

Click on Quick viewer.

Page 14: Sap Query - Passo a Passo Sv01

14

Click the button to the left of the required query (to highlight it)

Click “Change” to add or remove display / selection fields.

Or click “Execute” if changes are not required to the fields.

This takes you to the selection screen. Selections can be entered and the report run.

Page 15: Sap Query - Passo a Passo Sv01

15

Como converter QuickView (SQVI) para consulta SAP

Criando um QuickView via transação SQVI é bastante simples de usar SAP Query. No entanto, QuickView é usuário dependente, como é ligado ao ID de usuário específico, e outros usuários não podem usá-lo. Se você tem um QuickView e quer compartilhar com outras pessoas ou adicionar mais funcionalidades que não são suportados pelo QuickView, você precisa convertê-lo para o SAP Query. Por favor, consulte as etapas seguintes: 1. Ir para a transação SQ01 para exibir SAP ferramenta de consulta.2. Selecione Consulta -> Convert QuickView. Após caixa de diálogo Converter QuickViewer será mostrado como abaixo.

3. Clique no botão de seleção (verde) e novos campos serão exibidos. Digite um nome para sua consulta SAP, o Grupo de Consulta (normalmente levará grupo de consulta padrão) e digite um nome InfoSet.

4. Clique no botão de seleção (verde) e para completar sua consulta SAP está agora disponível em sua lista de Consulta SAP.