Skip to Content
author's profile photo Former Member
Former Member

User key date (-) posting date difference in SAP HANA

Hi Experts,

Greetings for the day...!!

I am new to HANA studio and working on a assignment in my project. 😊

My requirement is to find the difference between the "user keyed date" & "posting date(BUDAT)".

We have function to find the difference between 2 dates. But, in my case one of the date is user entry(can be any user date choice) and is not available in my calculated columns to find the difference.

I am working on graphical calculation view.

Any inputs on how to achieve my requirement.

Looking forward your valuable inputs.


Regards,

Ragha

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jul 18, 2016 at 06:12 PM

    Thanks a lot for the quick responses.

    I have created a user parameter with type: DATE and applied below function. But, i was getting type error. I further checked with BUDAT type and it is NVARCHAR:8.

    So, I corrected userkeyparameter type to NVARCHAR:8.

    But, still i am getting below error. Can you let me know if I am missing anything here.


    KEY.PNG (11.4 kB)
    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 18, 2016 at 05:39 PM

    Hello

    You can create an input parameter and use it in the calculated column expression editor to find the difference.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 18, 2016 at 05:42 PM

    Hello Ragha,

    is it an option for you to pass your "user key date" as input parameter to the graphical calculation view? With that you are able to use the available date functions, like "daysbetween" to calculate a difference. The function of course dependends on that what difference you wanna calculate.

    Regards,

    Florian

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 19, 2016 at 06:18 AM

    Hi Florian/All,

    Unfortunately it is also giving the error.

    daysbetween('$$KEY_DATE$$', date("BUDAT"))


    Below is input parameter property screen.

    Any detailed comments on this please...

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Florian Pfeffer

      Hi Florian,

      Yes, it is working for me too. 😊

      It solved my one issue.

      Another issue 😊, i need to find the oldest BUDAT for each PO and it can repeat the same BUDAT(i.e. oldest date compared to all the PO dates) for that entire PO rows.

      Again this to be done in graphical only.

      any expert comments on this Florian.

      Thanks is advance.

  • author's profile photo Former Member
    Former Member
    Posted on Jul 19, 2016 at 10:48 AM

    This message was moderated.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.