cancel
Showing results for 
Search instead for 
Did you mean: 

query - instruction

Former Member
0 Kudos

hallo all

I need to build few query

but I have never do it before

so please - anyone have a STEP BY STEP instruction ?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Nevargu,

Creating a query is not difficult.The only thing which you need to take care are the joins in transaction SQ02.

Sometimes in a query SAP will link the fields just based on their names.For e.g VBELN in VBAK and VBELN in VBRK can be linked but this is of no use.

You should only link those fields in a query whose value(same) exist in both the tables otherwise you will not get any result in the query.

Apart from this you can follow the steps as suggested by other people.

Reward points if it helps.

Regards

Karan

Answers (3)

Answers (3)

former_member183879
Active Contributor
0 Kudos

hi

u can give ur email id where i can send the material on queries.

former_member188826
Active Contributor
0 Kudos

Queries good for Master Data extraction.

Let us take a sample query, like some key info on material master. viz

1. Material no, MARA-MATNR

2. Description

3. Material Type MARA-MTART

4. Material Group MARA-MATKL

5. Procurement type.MARC-BESKZ

6. MRP Controller.

First, in order to create a query thruogh SQ01, you need an infoset created through t-code SQ02.

Step one SQ02. Go to Environment--> Query Areas. Then select Standard Area.

Infoset Creation

Next Enter a name of the infoset, say ZMATMASTER. Click on create.

Select the option that you want to use a Table join; enter MARC. Give description of infoset where required.

Go next to enter MARA in the list of table names, Then define the table join (click on a plus icon next to the tables on join condition side). There are icons to do these. Link the tables based on the field MATNR,(You may want to accept the system proposal)

Come out of the screen; the system asks, do you want to include key fields in the field group. Say Yes.

Check if the fields you need are included in the field group on the right side. If not drag them from the table list on the left to the appropriate field group folder on the right.

Now, save, generate and assign it to a user group. (you can create one with any name in t-code SQ03)

Next, Goto SQ01 Select the same user group from the menu option.

Give a name probably the same name ZMATMASTER and create. Select the same infoset from the list which pops up.

Give description to the query and keep proceeding to the right (right arrow) selecting the field you need for selection. After selection, click on basic list. Enter the order number for the fields you want to see.

Save and test. If found good come out of the query and execute.

Former Member
0 Kudos

Hi Nevargu,

1) From your easy access screen menu bar select System -> Services -> Quick Viewer.

2) Give the name of Quick View and click on Create

3) Enter the title and select the data source as "Table Join" for joining two tables and select Layout mode.

4) Using the Insert table option in the application toolbar enter the tables required in the query.

5) Verify whether the join conditions that are proposed are as per your requirement else make necessary changes.

6) Go back by one screen using F3.

7) On the left side of the screen, under data fields, you can choose the fields that are to be displayed in the report or selection fields.

😎 Run the report.

Regards

Nadarajah Pratheb