Skip to main content

Dear Colleagues,

I need to create a date picker component, which would filter the PO items that had any of selected change activities within selected time period (for example monthly).

I have created a variable that stores the list of change activties that user select.

image382547 12.4 KB

I cannot use PU_FIRST(EKPO,Activity_eventtime, Activity_name IN (Variable)) as this returns only the first eventtime of change. I need to select all PO items that had any of selected changes within given period. Can you please help me how to do that?

Thank you.

Hi,

thanks for reaching out to us! If I understand you correctly, you want to get a list of all PO items in which selected change activities occurred within a specific time period and that this period should be set with the date picker component. I would suggest to do the following:

Create an OLAP table with all the PO items and use the following component filter:

FILTER _CEL_P2P_ACTIVITIES.ACTIVITY IN (<%= C_ChangesDrilldown %>)

Thereby only PO items are shown that include one of the change activities. Now, for the date picker component, simply use the normal eventtime-column without a PU-function. If you then select a time period with the date picker, the OLAP will only show PO items that have a change activity which happened in the selected period.

This solutions did work for me and shows the intended result. However, if this does not result in what you expect or you have any other issues, feel free to contact us again!


Thank you Marcus for your reply. In the meantime I have also tested below idea directly on date picker. Do you think this approach is correct?

CASE

WHEN _CEL_P2P_ACTIVITIES.ACTIVITY_EN IN (<%=C_ChangesDrilldown%>)

THEN _CEL_P2P_ACTIVITIES.EVENTTIME

ELSE NULL

END


Hi,

first of all, I apologize for the late reply! I tested your proposed solution on my demo data and it appears to work as well, showing the same results as my approach did. I would still advise that you try both solutions on your data for a specific period in time and see whether the two solutions come to the same result. If yes, then just use the one you feel more comfortable with.

If you encounter any further issues, please feel free to contact us again!


Thank you this is very helpful, is there also an option to use the ROUND_DAY Function with that?

Hi Marco,

 

yes you can use the ROUND_DAY function with this statement:

 

CASE WHEN _CEL_P2P_ACTIVITIES.ACTIVITY_EN IN (<%=C_ChangesDrilldown%>) THEN ROUND_DAY(_CEL_P2P_ACTIVITIES.EVENTTIME) ELSE NULL END

 

will do the job 🙂.

 

Best,

Kevin


Reply