‎2009 Jul 13 2:29 PM
Hi,
in it_final.
LIFNR MATNR EBELN MENGE
RAU4 MAT1 450001 120.0
RAU3 MAT1 450002 10.0
RAU3 MAT1 450002 10.0
IN THE MENGE FOR ONE LIFNR ONLY ONE MENGE SHOULD BE DISPLAYED.
LIFNR MATNR EBELN MENGE
RAU4 MAT1 450001 120.0
RAU3 MAT1 450002 10.0
RAU3 MAT1 450002 0.0
LIKE THIS .I HAVE ALL VALUES IN IT_FINAL.
HOW TO MOVE '0.0' TO MENGE.
Bathri..
‎2009 Jul 13 2:35 PM
Hi,
READ table it_final index 3.
clear it_final-menge.
modify it_final.
Angelo.
‎2009 Jul 13 2:37 PM
Hi,
In this case so many lifnr are there.Line items are different.
We cant specify index.
Bathri
‎2009 Jul 13 2:44 PM
Hi Bathri,
You can use a loop . (Refer Below Pseudo Code).
Loop at it_final into wa_final.
l_index = l_index + 1.
If lifnr = = "***" " (*** is the lifnr for which menge is 0.0)
wa_final-menge = '0.0'.
Modify it_final from wa_final index l_index.
Endif.
Endloop.
Regards,
Vimal.
Edited by: Vimal V on Jul 13, 2009 3:49 PM
‎2009 Jul 13 2:36 PM
Hi,
do you really need this lines?
If no, you can do a DELETE ADJACENTS to remove identical lines.
If you need this lines, you will have to do some LOOP comparing lines using AT NEW, for example.
When your loop is not inside a AT NEW, so you clear MENGE.
Like this:
sort it_final.
loop at it_final.
at new ebeln.
continue.
endat.
clear menge.
modify it_final.
endloop.
Regards,
Frisoni
‎2009 Jul 13 2:39 PM
‎2009 Jul 13 2:46 PM
Hi Bathrinath,
Try this code,
sort it_final.
clear gv_lifnr
Loop at it_final
if it_final-lifnr = gv_lifnr
it_final-menge = '0.0'
modify it_final.
else.
continue.
endif.
gv_lifnr = it_final-lifnr
endloop.
Regards,
Lakshman
‎2009 Jul 13 2:54 PM
Hi,
sort it_final.
loop at it_final.
at new lifnr.
continue.
endat.
clear menge.
modify it_final.
endloop.
‎2009 Jul 13 3:39 PM
Hi,
I believe that you want to summarize your data here for combination mentioned.
try using COLLECT statement in loop-endloop.
Regards,
Nirmal
‎2009 Jul 13 6:27 PM
loop at itab into wa.
at new matnr.
continue.
endat.
clear wa-menge.
modify itab from wa index sy-tabix transorting menge.
endat.