Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

largest order

Former Member
0 Kudos

Hi all,

I have the ZTABLE like this.

ZORDERS

ONUM AMT ODATE CNUM SNUM

3001 18.69 03-OCT-94 2008 1007

3003 767.19 03-OCT-94 2001 1001

3002 1900.10 03-OCT-94 2007 1004

3005 5160.45 03-OCT-94 2003 1002

3006 1098.16 04-OCT-94 2008 1007

3009 1713.23 04-OCT-94 2002 1003

3007 75.75 05-OCT-94 2004 1002

3008 4723.00 05-OCT-94 2006 1001

3010 1309.95 06-OCT-94 2004 1002

3011 9891.88 06-OCT-94 2006 1001

and i want to findout the largest order taken by SNUM in date wise..

how to do this ?

krupali.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

1. Fetch all records into internal table.

2. Sort by snum ascending odate descending.

3. Use control break event ar new snum.

U will get the desired output.

Thanks & Regards,

Navneeth K.

3 REPLIES 3

Former Member
0 Kudos

Hi,

1. Fetch all records into internal table.

2. Sort by snum ascending odate descending.

3. Use control break event ar new snum.

U will get the desired output.

Thanks & Regards,

Navneeth K.

Former Member
0 Kudos

Move date( First Column ) and snum to a new itab .

sort itab by date snum descending.

loop at itab into wa.

At new date .

write : / wa-date , wa-snum.

endat.

endloop.

Former Member
0 Kudos

Hi,

Sort the internal table with date and SNUM.

use

Sort it_table by odate snum.

Hope it helps you.

Regards

Manjari.