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

Entry for Date through Calendar

Hi Guys,

In my Bex query I have got , two input variables for date. User wants to achieve this through the calendar. But currently in Design studio , we have to enter it manually. Is it possible in Design Studio 1.5 , to select date from Calendar ?

I have gone through below scn thread , is this functionality part of Design studio 1.6 release , please suggest :

https://scn.sap.com/thread/3650863

Thanks !

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Nov 12, 2015 at 11:24 AM

    Hello,

    I hope this helps you. BTW: I am using Design Studio 1.4

    My solution takes a date from the calendar and sends it back to a Universe Prompt (which it acts as a filter for my datasource(s)). This is done through sending the date value in the appropriate format to the filter/prompt. Through this function Application.setVariableValue (or setVariableValueExt for external sources, in my case the Universe) you can send data to a prompt/filter.

    The script for the date_conv_prompt can be customized to return other formats by user desire.

    Script date_conv_prompt:

    -----------------------------------------------------

    //date format YYYYMMDD

    //target format is DD-Mon-YYYY 00:00:00

    var today_int_string = input_date;

    var CDyear_full = Convert.subString(today_int_string, 0,4); // get year YYYY

    var CDmonth = Convert.subString(today_int_string, 4,6); // get month

    var CDday = Convert.subString(today_int_string, 6,8); //get day

    //Change from Month integer appearance to Month short string appearance

    if (CDmonth == "01") {

    CDmonth = "Jan";

    }

    else

    if (CDmonth == "02") {

    CDmonth = "Feb";

    }

    if (CDmonth == "03") {

    CDmonth = "Mar";

    }

    else

    if (CDmonth == "04") {

    CDmonth = "Apr";

    }

    else

    if (CDmonth == "05") {

    CDmonth = "May";

    }

    else

    if (CDmonth == "06") {

    CDmonth = "Jun";

    }

    if (CDmonth == "07") {

    CDmonth = "Jul";

    }

    else

    if (CDmonth == "08") {

    CDmonth = "Aug";

    }

    else

    if (CDmonth == "09") {

    CDmonth = "Sep";

    }

    else

    if (CDmonth == "10") {

    CDmonth = "Oct";

    }

    if (CDmonth == "11") {

    CDmonth = "Nov";

    }

    else

    if (CDmonth == "12") {

    CDmonth = "Dec";

    }

    //calculate today's string for SQL server database dataset filtering

    var date_prompt = CDday + "-" + CDmonth + "-" + CDyear_full +" "+"00:00:00";

    return date_prompt;

    --------------------------------------------

    The variable date_prompt can be changed or a more complex logic can be added.

    PS: The format for the output has to match the Design Studio interpretation of the values. You can do this with select from a list when you get prompted. After you select a particular date you can see the format Design Studio "reads".

    Good luck and hope it helps you.

    Regards,

    Bogdan


    datefield.PNG (25.7 kB)
    gsc.PNG (24.9 kB)
    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 10, 2015 at 10:42 AM

    Hi Raju,

    You can try to work with the SDK for Calendar,

    Please go through following SCN document,

    Design Studio SDK: Calendar Selector Component

    Hope it helps!!!!

    Thanks,

    Bhavin Vyas

    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.