‎2009 Feb 24 10:37 AM
HI All,
How to find date wise maximum document number for each document (purchase,sales,Finance) .
Thks
Shailesh
‎2009 Feb 24 11:30 AM
Hi Shailesh,
you may try using "max" and "group by" in your select.
i.e you'd be selecting the max(<field name for document no.>) from ... group by <date field>.
regards
‎2009 Feb 24 1:17 PM
but in cluster table aggregate functions are not allowed.
Regds
Shailesh
‎2009 Feb 24 11:48 AM
Hi Shailesh,
I am assuming you have data already selected.
Once you select the data, sort internal table as follows.
sort itab by doc_type descending date.
delete adjacent duplicates from itab comapring doc_type.
This will give each latest document no.
Hope ti will help you.
Regards,
Anil
‎2009 Mar 25 11:49 AM