Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to filter results that are retrieved in SQ01 query?

Former Member
0 Kudos

Hi experts,

Currently I am working on a sq01 query that use material number as the input. Quantity of the materials will be shown across all the plants. Now I want to remove the entries which quantity is equal to zero. Should I do ths filtering in the infoset or is there any other ways to do it? Thanks a lot for your help.

Best regards,

Leon

1 ACCEPTED SOLUTION

Former Member
0 Kudos

I am sorry that I am new to SAP..so I don't really know how to do it with the 2 methods mentioned above. Would anyone mind explaining them in more detail?

Let say MNG01 as the quantity field, when should I filter the entries that the quantity is equal to zero? The time that retrieve the data (something like adding where clause in select statement) or the time that after data (something like removing entries with quantity = 0 in a retrieved resultset)?

Thanks a lot for your help~

5 REPLIES 5

Former Member
0 Kudos

using submit syntax varient in sqo1.and execute.

example

set parameter id and id name.

submit sq01 report name.

Former Member
0 Kudos

Hi Leon ,

another way of doing is , thru ABAP coding in SQ02 by using Events.

do like this --->

SQ01-->select ur Query>change mode ->select Basic List-> here u can see a sample o/p list , click on the Qty field(single click ) -->see left bottom corner window called LIST field ---> here u can change output lenght , color , etc. , bottom of this window u will get one more option , i.e Only Display If field <>0 , just tick it, and save.

regards

Prabhu

Edited by: Prabhu Peram on Oct 14, 2008 11:38 AM

Edited by: Prabhu Peram on Oct 14, 2008 11:49 AM

Former Member
0 Kudos

I am sorry that I am new to SAP..so I don't really know how to do it with the 2 methods mentioned above. Would anyone mind explaining them in more detail?

Let say MNG01 as the quantity field, when should I filter the entries that the quantity is equal to zero? The time that retrieve the data (something like adding where clause in select statement) or the time that after data (something like removing entries with quantity = 0 in a retrieved resultset)?

Thanks a lot for your help~

0 Kudos

one simple way would be to put that quantity field MNG01 on the selection screen.

Then run the query and click in the box of the field MNG01 and hit F4 (or click the drop down help icon), then a small window will pop-up, you will see exclude single value tab there, enter 0 there. Thats it.

Now your query will exclude all records where it will find the MNG01 = 0.

Hope it helps.

Thanks.

Former Member
0 Kudos

Finally I used the layout to filter it (set MNG01>0) and exactly get what I want.

But it is good for me to learn other methods to tackle a same problem. Thank you all of you.