Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Operations with dates in abap cds

0 Likes
1,609

How can I do these operations in abap cds? It doesn't work for me now

1 ACCEPTED SOLUTION
Read only

maheshpalavalli
Active Contributor
0 Likes
1,438

Try passing it like yyyymmdd 20191204

4 REPLIES 4
Read only

maheshpalavalli
Active Contributor
0 Likes
1,439

Try passing it like yyyymmdd 20191204

Read only

1,438

Thanks so much

Read only

GK817
Active Contributor
1,438

Hi KJ,

1. Dates should be in format YYYYMMDD.

2. You can also use type conversion, just to be sure. like Cast('20191204' as abap.dats).

Above points should help you resolve your issue.

Regards

GK

Read only

former_member1716
Active Contributor
1,438

Hello KJ 911,

You can try the below Code, it should work fine.

case
when ( budat <= '20191204' and ( ( augdt = '00000000' ) or ( augdt > '20191204' ) ) )
then 'CXC-DIC' end as December

Regards!