Skip to Content
0

[CDS] Predefined functions in where clause

Mar 01, 2017 at 07:50 AM

294

avatar image
Former Member

Hi.

I made a CDS view which contains monthly revenue.

What I want to do is to aggregate this year's revenue.

My CDS view contains FiscalYear field but I have no idea to get this year's data.

I've tried to use predefined functions in where clause to restrict FiscalYear field but it didn't be allowed.

For example,

where FiscalYear = left(TSTMP_CURRENT_UTCTIMESTAMP(), 4)

-> Random expressions are not supported in a condition.

Is it impossible to use predefined functions in CDS where clause?

I'm new to CDS, please suggest me a solution.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

avatar image
Former Member Mar 13, 2017 at 11:05 AM
0
Share
10 |10000 characters needed characters left characters exceeded
Sean Zhang
Mar 23, 2017 at 10:26 AM
0

From my current knowledge, it's not allowed to use function in where clause, you have to use in normal field, e.g. by introduce a middle layer CDS, then use the calculated field from the new introduced views in your host view in where clause.

Best Regards,

Sean

Share
10 |10000 characters needed characters left characters exceeded