Skip to Content
0
Former Member
Apr 20, 2015 at 10:58 AM

How to perform Descending Order function on a DATE column in Analytical View

15 Views

Hi,

I have the below requirement

For the article/site having a+ stock quantity from table MARD field LABST, check the last goods movement date as a receipt table MSEG field SHKZG value "H". To get this information fetch the data from the table MSEG & MKPF. The lead time from that date till the present date is the ageing information. Show the output sorted on the duration as ageing information.

Created a calculate column with the below code and it is populating data i.e. multiple records for the same item for different dates like

daysbetween(date("BUDAT"),date("CURRENT_DATE"))

MC25001;1001;08;DC01;;H;WL;20150317;20150317;000000000000000233;2015-04-20;34;1,003
MC25001;1001;08;DC01;;H;WL;20150312;20150312;000000000000000233;2015-04-20;39;2,006
MC25001;1001;08;DC01;;H;WL;20141203;20141203;000000000000000233;2015-04-20;138;3,009
MC25001;1001;08;DC01;;H;WL;20150409;20150409;000000000000000233;2015-04-20;11;1,003
MC25001;1001;08;DC01;;H;WL;20141201;20141201;000000000000000233;2015-04-20;140;1,003


Now I have to sort the date (BUDAT) (highlighted in bold above) to be sorted in Descending and then take the first record and then apply the the above formula to get the aging stock.


Any suggestions?


Best Regards,

Vijaya