Skip to Content
-1
May 29, 2018 at 03:10 AM

Substring in Abap Cds not working Properly

1247 Views Last edit May 29, 2018 at 04:27 AM 2 rev

Hi Team,

I am trying to calculate the number of working days remaining in a month. Suppose you are passing 2018-02-20 as a prompt. So it should give me the remaining number of working days coming from Tfacs table in that month.

capture.png

But the substring function is not considering StartDay which is an integer value.

The error is given below.

"Function SUBSTRING: at position 2, only Literals, possibly positive integers allowed"

If I use a hard coded number in place of StartDay, it works fine.

Please help me on this.

Regards,

Shawon

Attachments

capture.png (3.7 kB)