‎2007 Feb 04 4:21 AM
I'm using LINV table in my select stat. I'd like to satisfy this condition that ( if matnr, batch and storage bin are same then it should pick only one latest record). Please help.
for example,
storage bin matnr batch date
10009 10000121 31.03.2003 10009 10000121 01.04.2003
10010 10000121 01.04.2003
so the result should be
storage bin matnr batch date
10009 10000121 01.04.2003
10010 10000121 01.04.2003
‎2007 Feb 04 5:27 AM
hi
For doing this first u need to sort ur internal table records by first 3 fields...
SORT ITAB BY MATNR STORAGEBIN BATCH .
this will bring all your fields in descending order with batchdate also sorted.
Next...
DELETE ADJACENT DUPLICATES FROM ITAB COMPARING MATNR STORAGEBIN.
This will delete all ur records which are having same MATNR STORAGEBIN.
This will have your highest date record at the top
please award points if this solves your problem
‎2007 Feb 04 5:27 AM
hi
For doing this first u need to sort ur internal table records by first 3 fields...
SORT ITAB BY MATNR STORAGEBIN BATCH .
this will bring all your fields in descending order with batchdate also sorted.
Next...
DELETE ADJACENT DUPLICATES FROM ITAB COMPARING MATNR STORAGEBIN.
This will delete all ur records which are having same MATNR STORAGEBIN.
This will have your highest date record at the top
please award points if this solves your problem
‎2007 Feb 04 5:39 AM
batch date u have to sort by descending
SORT ITAB BY MATNR STORAGEBIN BATCH <b> descending.</b>