Having the ability to pull data together in SAP to create meaningful reports is one of the big advantages to SAP as an ERP platform. Here I will walk you through a quick query that I get asked for periodically regarding partner functions for customers.
To get to the QuickView query tool use transaction SQVI.
To get to the QuickView query tool use transaction SQVI.
Enter a description of your query in the QuickView field and press the Create button.
The following popup will appear. Enter a Title (this will show at the top of the query when executed) and some comments and change the Data Source to Table join. Either Basis mode or Layout mode is okay to use and will only change the view of the query tool. You can toggle freely between the two different modes within the query. Press the green check mark when you are ready to move to the next step.
You are now on the Choose Data Source screen. Click on the Insert table button (highlighted in green) as shown below.
Next you will enter the technical name of the table you wish to query from and press the green checkmark. For a good list of SAP tables a simple google search on SAP tables will give you more than enough information. In a future post I'll cover the steps to determine the table and field name of most data entry screens within SAP.
Repeat the step above to add additional tables to your query. Keep in mind that a key field is needed to connect the tables data to each other.
Now that you have two or more tables in your query, you may need to adjust the connections between the key fields. You can do this by right clicking directly on the line connection between the tables. You will be given an option to either join the tables thru a Left Outer Join or Delete the link altogether. A Left Outer join is used a one to many relationship between two tables and the table physically on the left is on the "one" side of the equation.
Now that you have your data source and connections made use the green arrow back to get to the design screen of the query. Here you can use the Data Fields section on the far left to select which fields you want to add to the query. Note that the two columns with check boxes are used to add the output to the query output and the second column is used to add the field as a parameter to the query. You can adjust the order of each field in the List Fld selection table by highlighting them and using the up and down arrows. Also the Sort Sequence and Selection Fields tabs can help you organize your query to your preferences as well.
Next step is to Save your query and press the Execute button to get to the parameters screen of your query.
Finally, enter in your parameters as you would any other SAP report. in the example I'm showing above we are looking for all the partner functions for one specific customer. I could have as easily queried by a specific partner function as some customers have a large amount of Ship-to locations. Feel free to go back to your query and adjust your settings to optimize your output. Add additional parameters and/or fields to your output to make the query most useable to you and your organization.