Skip to Content
Former Member
Sep 26, 2005 at 06:54 PM

Query Designer: Need to restrict on Max date where date is a characteristic


I am reporting off of an ODS that contains HR data. I need my query to return only the last three years of records for a given employee.

The three years must work off of the last recorded activity date in the ODS, not the current date. For example, if an employee was terminated on 6/1/2004, then I'd need to list the records where the activity date was between 6/1/2001 and 6/1/2004. The activity date is not a key figure, so the max() type of aggregation behavior I'm aware of is not an option.

Is there a way to do this without a user exit variable? I'm not an experienced ABAPer, so if that's the only option, I'll need some suggestions for the coding.