Application Development and Automation 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: 
Read only

Problem filtering a list

Former Member
0 Likes
500

Hi.

I have a problem filtering a list

I have a list with materials and the previous period stock and previous year stock

I only want to print the materials that have either a pp stock greather than zero or py stock greateher than zero.

I can't find a way to do it either in the select statement or the loop at.

I think I could use an if in the loop at to filter the results that have a sum of (pp stock and py stock) gt 0. I'll do it this way, but I want to know if there is a way to do it in the select statement

4 REPLIES 4
Read only

former_member191735
Active Contributor
0 Likes
476

try this.

select * from abc

where (pp > 0 or PS > 0).

Read only

0 Likes
476

Well the actual problem is that I cant filter it in the select statement because I gather all the information from mbew and then pass it to FM MBEW_EXTEND to get the pp stock and py stock. I forgot that.

But I don`t know if I can filter it some way in the FM or the loop.

Read only

Former Member
0 Likes
476

Thank you, everything was ok. I just messed up really bad

Read only

Former Member
0 Likes
476

I forgot that I was using FM MBEW_EXTEND after the query, it was impossible to filter the results in the first place.

Did it with a nested if inside a loop.

Thanks