Skip to Content
0
Jun 15, 2005 at 08:40 PM

Last Record Values for a given Date Range

20 Views

Hi, I have a unique requirement to process/report only the values of the last record found in a date range for a given set of characteristics. The order would be by FISCPER.

For example: I have some data with 3 characteristics.

STORE001 MATN001 2004001 100 PCS

STORE001 MATN001 2004005 75 PCS

STORE001 MATN001 2004006 80 PCS

STORE002 MATN002 2003008 10 PCS

STORE002 MATN002 2004001 15 PCS

STORE002 MATN002 2004004 40 PCS

A selected date range of 2003008 to 2004001 would result in the following records being processed.

STORE001 MATN001 2004001 100 PCS

STORE002 MATN002 2004001 15 PCS

A selected date range of 2004002 to 2004006 would result in the following records being processed.

STORE001 MATN001 2004006 80 PCS

STORE002 MATN002 2004004 40 PCS

How can I accomplish this at runtime? Any ideas?