Skip to Content
0
Former Member
Aug 28, 2013 at 08:24 AM

getting next maximum values from database table?

172 Views

Dear Experts,

Internal table date will be like this

Material No. Date Quantity

10001010 28.08.2013 10

10001810 28.08.2012 12

based on this internal table data i need to select next maximum date based on material no from mseg

example:

if data base like this

Material No. Date Quantity

10001010 28.08.2013 10

10001010 20.07.2013 5

10001010 10.04.2013 2

10001810 28.08.2012 12

10001810 21.08.2012 1
10001810 2.07.2012 21

i want data like this

Material No. Date Quantity

10001010 20.07.2013 5

10001810 21.08.2012 1

How we can get this values using select statement