This website is not affiliated with, sponsored by, or approved by SAP AG.

SAP BEx Query Designer

Business Warehouse

Moderators: Snowy, thx4allthefish

SAP BEx Query Designer

Postby mackixv » Wed Mar 21, 2012 2:58 am

having problems with using data function: process value as date

xdate=0CALMONTH,0I_CALMO
a = 1000

formula: date(xdate)<date(062011) * (a*1.2) + date(xdate) >= date(062011) * (a*.1.5)

date selection: 05.2011-06.2011

Results:
xDate ............38195.....75304
Computation.....1200......1200

should be:
xDate............052011..... 062011
Computation....1200........1500

please help on how to convert to date and the correct "if" formula

thanks in advance
macki_xv ^_^
mackixv
 
Posts: 1
Joined: Wed Mar 21, 2012 2:38 am

Re: SAP BEx Query Designer

Postby JohnLang » Thu Mar 22, 2012 5:17 am

Hi mackixv,

You will need to change your variables to be true dates at the day granularity if you want to use the date() formula.
Use of any month variables or values (Like 062012) will not work with the date() formula.

The query designer formula for date() uses integer numbers in the internal format of YYYYMMDD. SAP has a programming native data type that uses a date in this format but not in your normal base 10 integer number line; it specifically allows for addition and subtraction of integer values that are treated as days and the actual calculation accommodates for the real calendar days so that it emulates basic arithmetic but uses "Base Calendar Day" (for want of a better description).

For example: 20111231 + 1 = 20120101
For example: 20120301 - 1 = 20120229

Kind Regards,
John.
JohnLang
 
Posts: 16
Joined: Wed Jul 20, 2011 3:56 am
Location: Australia


Return to Business Warehouse

Who is online

Users browsing this forum: No registered users and 3 guests





loading...


This website is not affiliated with, sponsored by, or approved by SAP AG.