‎2010 Jul 28 11:30 AM
Hi,
(sorry if I'm using different term than yours.. this is my 2nd query.. still new with BW)
I need to create 1 query: Support Message Aging Report.
Basically it will have 5 columns: Not Due, 0 Day, 1 Day, 2-10 Days, >10 Days.
and 1 input selection is: key date.
the formula is: number of aging day = key date - due date.
I have no issue on the 1st and 2nd column. For that I just create 1 customer exit.
My problem is on how to separate the over due support message by day (due date < key date).
I tried create 2 formula variable for key date and due date. Then from these 2 vars, I can get the number of days.
Problem comes when the calculation is cross month/year. I suspect maybe because the return from the formula var is in number format and not date... yyyymmdd. Then, I change the dimensions from number to date.. it is working for key date.. dd.mm.yyyy.
but for the due date, I got problem... it keeps give me warning saying: value 'D' invalid for property dimension of element etc.///
below are details for both formula variable.. please advice which area should I fix or maybe you can suggest any good idea for my query.. thanks so much
1. ZKEYDATE - customer exit (value input data) - dimensions date - NO ISSUE (OUTPUT: dd.mm.yyyy)
2. ZDUEDATE - replacement path (ref char ZBW02C08) - replacement rule: infoobject, key - dimension date - GOT WARNING...
ZBW02C08: contains due date and the type is date: yyyymmdd
‎2010 Aug 04 7:22 PM
If I were you, I'd try two things:
best way - have the infoprovider changed to have a new key figure for the number of days difference
- to do this with formulae (especially crossing months and years - what about leap years) is hard to maintain and develop
other way - make a virtual key figure - i did this once but I forget how exactly. There's a userexit or BADI somewhere which can be used for this.
Either of these ways allows the calculation to be done in ABAP itself where date1 - date2 gives you the number of days difference.
By the way though, this is in the wrong forum. I'd bet if this was in a BI forum, you'd have an answer already.
‎2010 Aug 05 4:35 AM
thanks Erik.
for this query, what I did was, I created 5 customer exits for 5 columns. each exit will calculate the start and end date for each column. by doing this, I can get the number of days for each column...
ok