cancel
Showing results for 
Search instead for 
Did you mean: 

Convert Input Parameters Values to Required Formats (SAP HANA Calculation Views)

probledo
Participant
0 Kudos

Hi All,

I have the following situation in a Graphical Calculation View:

The user needs to run a report with an Input parameter through the use of the calendar by prompt (IMAGE 3 - Input Parameter ip_ym), but I have a problem with the format of the date which is YYYY-MM-DD, I need to delete the "-" character in order to that the selected date has the format allowed at the database level. I created a Input parameter derived for Store procedure but the result is not correct.

I did a Debugging HANA Calculation views and the results are the following:

IMAGE 1 -> SQL statement with the debug, “please verify the format of the date sent to the input parameter: 2018-02-28 this error”. (Current issue)

IMAGE 2 -> Expected situation.

IMAGE 4 -> Sample code Store Procedure

I appreciate your help.

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

pfefferf
Active Contributor
0 Kudos

Can you describe for what the input parameter is used? Is it just used as filter on a column?

Assuming that the parameter is of type Date and just used as filter for a column of type char with length 8, you do not need to create a procedure to derive the specific format. In the filter expression, you can convert the format of the date like following:

format(longdate('$$ip_ym$$'), 'YYYYMMDD')

Regards,
Florian

probledo
Participant
0 Kudos

You are right, I made the adjustment based on your suggestion and it worked correctly!

Florian, Thank you very much for your help!!

Answers (0)