Bex Analyzer get the oldest record from an ODS

Question: Dear all,

I have the following business scenario:

I have an ODS with a Prod. Order (but it could be other charact) and a cumulative key figure. I have values for this charactistic in some periods..

example:

Prod. order period/year amount cumul. amount Status
1111 001.2002 100 100 A
2222 001.2002 50 50 A
1111 001.2003 10 110 B
2222 005.2003 -15 35 B
3333 001.2004 20 20 A

I want to get a report per selecting a period/year and get the last record Prod. Order and Status with the acummulated amount
Note: I need only the last status

example: for 001.2004
1111 001.2003 110 B
2222 005.2003 35 B
3333 001.2004 20 A

my problem is:
1. if i select = 001.2004 and Acumulated amount, I would get only one record :
3333 001.2004 20 A

2. if i select <= 001.2004 and choose to use single amount instead of Acumulated amount, I would get :
1111 001.2002 100 A
2222 001.2002 50 A
1111 001.2003 10 B
2222 005.2003 -15 B
3333 001.2004 20 A

but then using the single amount i would have the correct amount splited by status (I want only one record per each order)

what can i do?

Best Regards
EF

Answer:
Dear all - I hope its easy to follow the examples in this way......

I have the following business scenario:

I have an ODS with a Prod. Order (but it could be other charact) and a cumulative key figure. I have values for this charactistic in some periods..

example:

Prd Order... per_year..... amount..... acumulated..... Status
1111...........001.2002..... 100........... 100................ A
2222..........001.2002.........50.............50..................A
1111..........001.2003.........10............110.................B
2222......... 005.2003........-15.............35..................B
3333..........001.2004.........20.............20..................A

I want to get a report per selecting a period/year and get the last record Prod. Order and Status with the acummulated amount
Note: I need only the last status

example: for 001.2004
1111........ 001.2003...... 110..... B
2222........ 005.2003........ 35..... B
3333........ 001.2004........ 20..... A

my problem is:
1. if i select = 001.2004 and Acumulated amount, I would get only one record :
3333....... 001.2004..........20......A

2. if i select <= 001.2004 and choose to use single amount instead of Acumulated amount, I would get :
1111........ 001.2002........ 100.... A
2222........ 001.2002.......... 50.... A
1111........ 001.2003.......... 10.... B
2222........ 005.2003......... -15.... B
3333........ 001.2004...........20.... A

but then using the single amount i would have the correct amount splited by status (I want only one record per each order)

what can i do?

Best Regards
EF
Copyright ?2007 - 2008 www.jt77.com