Skip to Content

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

prompts with date


I need a help how to react for two various inputs in prompt. Here it is.

(in Webi) I have two prompts for user that require enter number of month (Jan -> 1, Feb -> 2 u2026) and number of year. After that report shows results (revenues) for entered month and the previous month in entered year! (user enters 3 and 2008 and report shows results for Mar and Feb in 2008). Problem occurs when user enter 1 as month. So that I need report of Jan and report of Dec of previous year. I though CASE can solve it, I tried it but without success. Maybe bad syntaxe, maybe bad solution.

My suggestion:

I have two prompt. One for month and one for year.

I tried SELECT ... WHERE u201CPK=PKu201D u2026 AND


order_revenues_year = @prompt(for year)


order_revenues_month = CASE WHEN @prompt(for month) = 1 THEN ( 12 AND @prompt(for year)-1 ) ELSE @prompt(for month)


I hoped for this: (for example) entered 3 and 2008 -> reports of Mar and Feb 2008.

Thank you very much for your answer,


entered 1 and 2007 -> reports of Jan 2007 and Dec 2006

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