cancel
Showing results for 
Search instead for 
Did you mean: 

DATS_ADD_DAYS CDS views not working

mohsin_mohammed5
Explorer
0 Kudos

hi experts,

I have written a CDS Views with join on BKPF and BSEG i need to add BLDAT + ZBD1T shown below .

DATS_ADD_DAYS( bkpf.bldat , bseg.zbd1t ,'NULL' ) as duedate ,

The error thrown is ZBD1T is DEC type is not allowed only INT4 is allowed.

Can we have a solution for this.

Regards

Mohsin

Accepted Solutions (1)

Accepted Solutions (1)

Sean_Zhang
Product and Topic Expert
Product and Topic Expert

DATS_ADD_DAYS(date,days,on_error)

  • The actual parameter days must have the predefined data type INT4.

so you firstly have to convert the DEC type to INT4.

e.g.

DATS_ADD_DAYS( bseg.augdt,ceil(bseg.zbd1t) ,'NULL' ) as AD

CEIL(arg)Smallest integer number not less than the value of arg.

BTW, please actively use the F1 help document to check the error and/or google.

Best Regards,

Sean

Answers (0)