Skip to Content
0

how to get 1st day for a given month and year in calculation view in sap hana

Dec 04, 2017 at 06:06 PM

48

avatar image
Former Member

how to get 1st day for a given month and year in calculation view using Input parameter

10 |10000 characters needed characters left characters exceeded

What information you wanna have here, the date, the spoken day, ...?

Please share also what you have tried so far, instead of just posting your spec dump.

Regards,
Florian (Moderator)

0
Former Member

for example by giving month and year as dec 2017 the output will have to be 1st day of december using input parameter.

0
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Florian Pfeffer
Dec 06, 2017 at 06:15 AM
0

Ok, if I understood you right you have an input parameter for the month and an input parameter for the year and you wanna create the date for the month/year starting on the 1st, for further usage in your CV.

An option would be to use a third input parameter which is set to "Derived from Procedure/Scalar functions". With that you can create a procedure or scalar function which is mapped to the third parameter. The procedure/scalar function has two input parameters, month and year, to which the existing input parameters month and year of the calc. view are mapped. The output of the procedure/scalar function is the calculated date (I think you are able to create the logic by yourself).

So with that, wenn you enter a month and year in the calc. view parameters and execute the calc. view, the third parameter is filled with the calculated date. The "calculated" input parameter can be used in your calc. view as every other input parameter.

Regards,
Florian

Share
10 |10000 characters needed characters left characters exceeded