Skip to Content
avatar image
Former Member

[CDS] Predefined functions in where clause

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Mar 13, 2017 at 11:05 AM
    Add comment
    10|10000 characters needed characters exceeded

  • Mar 23, 2017 at 10:26 AM

    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

    Add comment
    10|10000 characters needed characters exceeded