Skip to Content
avatar image
Former Member

I'm trying to restrict date with number of days by selecting radio button selection ?

Using : DS 1.6 SP00 , BO 4.1 SP08

Scenario: I need to develop an application displaying Complaints data (pending, completed and total records) with time line inputs.

Radio button should consists of 30 days, 60 days, 90 days and 180 days.

If user select 30 days it should fetch last 30 days records and display the application.

I tried in design studio

var today = APPLICATION.getInfo().dateNowInternalFormat;

var last15 = Today-15; / APPLICATION.getInfo().dateNowInternalFormat -15;

I have seen so many function in design studio not working. Now I'm trying to get dates from back end so, that I can filter here, But suppose I'm getting Last 15 days, 30 days, 60 days from back end. Now which function should I be able to use.

SETFILTER format is not working: DS_1.setFilter("DATEDIMENSION",{"low":DATEOBJECT,"high":TODAY()});

Add comment
10|10000 characters needed characters exceeded

  • Former Member Mustafa Bensan

    Hi Mustafa,

    Thanks for the response.

    I'm using BW as datasource. Please suggest me two resolutions.

    One is on design studio end , how I can achieve dates and filter them on data sources.

    Second one, I told Back end team (ABAP team) to provide 3 fields , last 30 days, 60 days and 90 days. they will provide me date objects as Last 30 = Today - 30 days, and same follows for rest of the objects.

    Suggest me set filter syntax for above restrictions.


    Ravi Bodala

  • Ravi - you are also on SP00 of 1.6, and that could be why so many functions are not working. Please consider updating to the latest SP for 1.6

  • Former Member Tammy Powlas

    Thanks Tammy Powals,

    Suggest me some functions that suitable with syntax for my requirement.


    Ravi Bodala

  • Get RSS Feed

1 Answer

  • Best Answer
    Sep 07, 2017 at 04:09 AM

    Hi Ravi,

    You may wish to consider using the SDK Community Simple Date Object Component. Also, if you can clarify how the "date objects" will be represented in your BEx Query (as dimensions(characteristics) or measures (key figures)), we can try to provide further guidance.



    Add comment
    10|10000 characters needed characters exceeded

    • Hi Ravi,

      Defining key figures as dates will not allow you to filter. There are two approaches you can take as follows:

      1) Front-end

      Design Studio 1.6 does not provide any script functions for date calculations. This is why I suggested that you try the SDK Community Simple Date Object Component to calculate the date ranges to apply in setFilter().

      2) Back-end

      You can use BEx Customer Exit variables as described in the post How to use Customer Exit Variables in BW Reports: Part 2. Here, you would need to create an optional manual input Text Variable to enter a code representing the time buckets, e.g. A = Last 30 days, B = Last 60 days, C = Last 90 days. This Text Variable would then serve as input to a Customer Exit Variable on characteristic Posting Date, to restrict the date range based on the time bucket selection. The Radio Button values would represent the time bucket codes (A,B,C). The selected code would then be passed to the BEx Query Text Variable using the dataSource.setVariableValueExt() script call.