Skip to Content
Former Member
Jan 31, 2007 at 12:30 PM

counting only lines with different values for a charachteristic


hello experts,

I want to count the number of trips in ODS1 and thus update the key figure numberOfBookings in a cube.

is there a way in ABAP to count only the lines where

trip_id is different from trip_id of preceeding line?

Because something like

IF comm_strukture-trip_id <> ' '.

return 1.


return 0.

does obviously not worke in this scenario!


trip_id___participant_id___price_____trip date___






I need something like select distinct trip_id from ODS1...

If trip_id maches with trip_id in preceding line -> 0

If trip_id does not mach with trip_id in preceding line -> +1

So in the example above the result of numberOfTrips in Cube should be 2!

any suggestions??

kind regards