Skip to main content

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.

https://aws1.discourse-cdn.com/business6/uploads/celonis4/original/2X/5/5d706be24722ec40a095fb4b8fe27e2966d81faa.pnghttps://aws1.discourse-cdn.com/business6/uploads/celonis4/original/2X/d/d9b53f57db2e3d2d9d77e8f693d87cdf9507ca70.pnghttps://aws1.discourse-cdn.com/business6/uploads/celonis4/original/2X/a/a2cd35e9b8374797970c066d601980712007ce88.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: {dyyyy-mm-dd}


Dear Justin,
This also not works:

image001.jpg1321562 58.9 KB

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



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 dont work.
Best
David

Dear Justin,

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

image006.jpg1117392 39.5 KB

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

image007.jpg1102385 38.7 KB

https://aws1.discourse-cdn.com/business6/uploads/celonis4/original/2X/5/5d706be24722ec40a095fb4b8fe27e2966d81faa.pnghttps://aws1.discourse-cdn.com/business6/uploads/celonis4/original/2X/d/d9b53f57db2e3d2d9d77e8f693d87cdf9507ca70.pnghttps://aws1.discourse-cdn.com/business6/uploads/celonis4/original/2X/a/a2cd35e9b8374797970c066d601980712007ce88.png


Reply