cancel
Showing results for 
Search instead for 
Did you mean: 

Calculated column using workdays_between() not working in SP11

chandan_praharaj
Contributor
0 Kudos

Hi Expert ,

Has nay one faced this issue in SP11 and up.

I am trying to get the Workdays between 2 date range in HANA , using SQL engine, Calculated column feature in HANA SP11.

My SQL is working fine and giving the result.

But my calculated column showing error. Am I missing something? Can someone please help?




Regards,

Chandan

Accepted Solutions (0)

Answers (2)

Answers (2)

lucas_oliveira
Advisor
Advisor
0 Kudos

Hello Chandan,

Although not well described the documentation mentions that the SQL function usage on Expression Editor is limited:

Create Calculated Columns - SAP HANA Developer Guide for SAP HANA Studio - SAP Library:


"[...]

You can also create an expression by dragging and dropping the expression elements, operators and functions from the menus to the expression editor.

For expression in SQL language, modeler supports only a limited list of SQL functions.

[...]"

Functions add_workadays and workdays_between are within the not implemented list.

BRs,

Lucas de Oliveira

Astrid_Gambill
Contributor
0 Kudos

Hi Lucas

Thanks for the update.

Though I don't understand why, if these 2 functions are not (yet) implemented, they show up in the list of available SQL functions within the Create Calculated Column window?

Regards

Astrid

lucas_oliveira
Advisor
Advisor
0 Kudos

Hi Astrid,

Yes, that's what I see as well and I don't like that either. I believe this will be removed from Studio to avoid future issues.

BRs,

Lucas de Oliveira

Astrid_Gambill
Contributor
0 Kudos

Hi Lucas

I appreciate the honesty .  It's a disappointing direction for the product to say the least.

Are there any others besides the 2 workdays functions that will disappear from the SQL engine lists?

Thanks

Astrid

lucas_oliveira
Advisor
Advisor
0 Kudos

Hello,

There will be an update in documentation in that regard. So far, these are the 2 functions missing.

In any case: The functions can still be used in SQLScript (table functions or scripted calc views).

So not as bad.

BRs,

Lucas de Oliveira

chandan_praharaj
Contributor
0 Kudos

Hi Lucas,

Thanks for the information. And yes you are correct, they can be used in SQL script.

Can you please name the second function, so that everyone will be aware of that too.

Regards,

Chandan

lucas_oliveira
Advisor
Advisor
0 Kudos

Hi Chandan,

functions are add_workdays and workdays_between.

BRs,

Lucas de Oliveira

Former Member
0 Kudos

Hi,

Chandan I am having the same problem as you, with the formula

"workdays_between".   I add the neccesary elements in the formula and after the syntax check , the error "...cannot be converted to CS Expression". this is driving me nuts.

If I use another formula it work. but obviously I need this one.

This is just so you know not the only one having this problem. sorry I cannot give you the solution for the time being.

Regards,

Enrique

Astrid_Gambill
Contributor
0 Kudos

I've had a similar problem reported with ADD_WORKDAYS() - SAP incident 196781/2016

Former Member
0 Kudos

Thank you Astrid. So did anybody come back to you witha solution?  i have not been able to access the incident.  Thanks.

Astrid_Gambill
Contributor
0 Kudos

not yet, status is still "reported to SAP".