How to set up 2 filter criteria's on 1 table

At this moment we have a filter on the extraction of the EKKO and EKPO which filter all orders and items based on the start date 31-07-2018.

However, we want to add a second filter or expand the filter that fetches all orders starting with 37 which are in the EKKO and EKPO and started before before 31-07-2018.
All other orders not starting with 37 must be retrieved via the previously set filter of start date 31-07-2018.
The result must therefore be that we all pick up orders starting with 37 and the other orders only if they have been created as of 31-7-2018.
How should we set up this filter?

Hey @Jacob,

You have to connect the two filters with an OR statement:

FILTER (ORDER_NR = 37 AND DATE < 31-07-2018) OR (DATE = 31-07-2018)

Best,

Justin

Dear Justin,

We tried encoding your example in 3 ways, but none of the 3 works:

CODE:(LEFT(EBELN , 2) = ‘37’ AND AEDAT < <%=startDate%>) OR AEDAT >= <%=startDate%>

FILTER (LEFT(EKKO.EBELN,2) = ‘37’ AND EKKO.AEDAT < <%=startDate%>) OR (EKKO.AEDAT >= <%=startDate%>)

FILTER (EKKO.EBELN LIKE ‘%37%’ AND EKKO.AEDAT < <%=startDate%>) OR (EKKO.AEDAT >= <%=startDate%>)

The
( ) do not work. Probably make the same reference as startDate, but to a string with left.

I just spoke to Robert about this and het asked me to reply on your email.

image001.png

image002.png

image003.png

Hi @Jacob,

The following should be Code correct:

FILTER (LEFT(EKKO.EBELN,2) = ‘37’ AND EKKO.AEDAT < <%=startDate%>) OR (EKKO.AEDAT >= <%=startDate%>)

Could you please check whether you defined <%=startDate%> correctly? You have to define a Date in the following format: {d’yyyy-mm-dd’}

Dear Justin,

This also not works:

We understand your logic and tried this ourselves, but got the same result.

image001.png

image002.png

image003.png

Hi Jacob,

could you please try the code without the “FILTER” in front and let us know?

Thanks and best regards,
Viana

Hi Jacob,

please use proper single quotes around the 37. The ones copy-and-pasted from this forum don’t work.

Best
David

Dear Justin,

We also tried this by entering the statement manually but it still gives an error message.:

The same when we copy the statement and changed the single quotes around the 37.

Also Vivian asked us to remove the FILTER statement, but also again an error message

image001.png

image002.png

image003.png