Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

@Prompt Date Filter - today's date as Default

Here is a date filter prompt created with default date as '01/01/2011'

@Prompt('Start Date:','D',,Mono,Free,Not_Persistent,{'01/01/2011'},User:8)

Is there a way to pass Today's date as default like @Prompt('Start Date:','D',,Mono,Free,Not_Persistent,<Today>,User:8)

There is a Filter object in Universe with options to select : {Today, Yesterday, This Week, This Month , Previous Month and Custom Date}. This @prompt is part of <Custom Date> option.

I have tried the following options :

1. Created a Dimension object which will send today's date 'Calendar\Today' and @Prompt('Start Date:','D',,Mono,Free,Not_Persistent,'Calendar\Today',User:8)

2. Found no keyword which represents today's date in the default date position.

3. Made the prompt optional by using the 9th parameter (@Prompt('Start Date:','D',,Mono,Free,Not_Persistent,{'01/01/2011'},User:8,optional) and used the following SQL

Table.columnname >= (Case when @Prompt('Start Date:','D',,Mono,Free,Not_Persistent,{'01/01/2011'},User:8,optional) is null then sysdate

Else @Prompt('Start Date:','D',,Mono,Free,Not_Persistent,{'01/01/2011'},User:8,optional) end)

But received an error in Webi (~ Expected value for this prompt; Cannot generate SQL)

Referred to link: http://www.dagira.com/2008/07/15/how-can-i-make-today-my-default-prompt-value/ (but it is post 2 years ago, not sure if it is still valid)

Wanted to know if there is a way to do this in the Universe designer.

Thanks

Former Member
Former Member replied

Dave's blog is still valid and it's the best we've got at the moment in XI3.

I've not see 4.0 yet so cannot comment on that.

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question