Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Use system fields in CDS view?

Hi,

I am trying to create a CDS view (or several) for an ABAP program on NW 7.4 SP05. Unfortunately, on SP05 we cannot use parameters. I really need to use the system date, but of course "sy-datum" doesn't work.

Can anyone tell me if it is at all possible to reference a system field in CDS views in NW 7.4 SP05?  If so, how, for example to reference current system date.

For example, is it possible and if so how would I write this snippet in a CDS view:

....   FROM ztab AS z

            INNER JOIN pa0001 AS p1

                ON p1~pernr = z~pernr

            INNER JOIN pa0000 AS p0

                ON p0~pernr  =   z~pernr

.....

         WHERE p0~stat2  =  '3'

             AND p1~begda <=  sy-datum

             AND p1~endda >= sy-datum

             AND p0~begda <=  sy-datum

             AND p0~endda >=  sy-datum

...

Thanks,

Margaret

Tags:

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question