hi all ,
i have an itab with many values like matnr, netpr...., and i have to take only those values of matnr which are repeated n variance in price.. and in output i want only repeated matnr.... can anybody help me ??? its very urgent .
i have written this code ....
SELECT AEBELN ALIFNR ABEDAT BMATNR BNETPR CMAKTX D~NAME1 INTO CORRESPONDING FIELDS OF TABLE ITAB
FROM ( EKKO AS A INNER JOIN EKPO AS B ON AEBELN = BEBELN )
INNER JOIN MAKT AS C ON BMATNR = CMATNR
INNER JOIN LFA1 AS D ON ALIFNR = DLIFNR
WHERE ABEDAT IN BEDAT AND AEBELN IN EBELN ORDER BY BMATNR ALIFNR A~BEDAT.
IF SY-SUBRC <> 0.
WRITE : 'No record found.'.
LOOP AT ITAB.
MATNR1 = ITAB-MATNR .
SORT ITAB BY MATNR .
DATA V_NO VALUE 0 .
LOOP AT ITAB .
IF MATNR1 = ITAB-MATNR.
V_NO = V_NO + 1.
IF V_NO > 1.
MOVE-CORRESPONDING ITAB TO ITAB1.
MATNR1 = ITAB-MATNR.
problem is that , i want only all repeated MATNR,suppose there are two repeated MATNR then i want both MATNR in ITAB1, but its showing only last one . can anybody help me ??? its urgent.