‎2007 Jun 06 5:31 AM
hi experts,
i m facing a new problem IN ALV REPORT .
my OUTPUT data is like that.
component UOM ALTBOM1 ALTBOM2 ALTBOM3 ALTBOM4 ALTB
11000000 TO 0.500 0.000 0.000 0.000 0.000
11000000 TO 0.500 15.000 0.000 0.000 0.000
11000007 TO 0.450 0.000 0.000 0.000 0.000
11000007 TO 0.450 0.550 0.000 0.000 0.000
19000020 M3 10.000 0.000 0.000 0.000 0.000
19000021 M3 5.000 0.000 0.000 0.000 0.000
19000021 M3 5.000 8.000 0.000 0.000 0.000
19000021 M3 5.000 8.000 10.000 0.000 0.000
19000021 M3 5.000 8.000 10.000 12.000 0.000
19000022 M3 7.000 0.000 0.000 0.000 0.000
19000022 M3 7.000 10.000 0.000 0.000 0.000
19000022 M3 7.000 10.000 12.000 0.000 0.000
SO for each component my last line is the correct output . so i wanna to remove rows that are not needed.
component UOM ALTBOM1 ALTBOM2 ALTBOM3 ALTBOM4 ALTB
11000000 TO 0.500 15.000 0.000 0.000 0.000
11000007 TO 0.450 0.550 0.000 0.000 0.000
19000020 M3 10.000 0.000 0.000 0.000 0.000
19000021 M3 5.000 8.000 10.000 12.000 0.000
19000022 M3 7.000 10.000 12.000 0.000 0.000
so i waana last row for each component , what should i do, please help me for that.
thanks in advance.
regards
vijay dwivedi
marks will b sure for each helpfull answer*
‎2007 Jun 06 5:34 AM
sort itab by idnrk stlal descending.
delete adjacent duplicates from itab.
now pass the utab in alv fm
regards
shiba dutta
‎2007 Jun 06 5:33 AM
hi
i am not sure if it's showing duplicate entries or some extra values, but if u want the last line of each component alone in the output, then do somehting like this
loop at original_tab.
at end of component.
move-corresponding original_tab to temp_tab.
append temp_tab.
endat.
endloop.
pass temp_tab to alv.
if helpful, reward
Sathish. R
‎2007 Jun 06 5:34 AM
Use
AT-END fieldname(UOM).
regards
prabhu
reward if it is helpful
‎2007 Jun 06 5:34 AM
sort itab by idnrk stlal descending.
delete adjacent duplicates from itab.
now pass the utab in alv fm
regards
shiba dutta
‎2007 Jun 06 5:37 AM
hi vijay
try this.
<b>read table itab1 with key <field name>/component.
on change of <field name>
select <f1> <f2>.. from ztable into itab2.
end on.
regards
ravish
<b>dont forget to reward points if helpful</b>
‎2007 Jun 06 5:39 AM
sorry
sort itab by idnrk stlal descending.
delete adjacent duplicates from itab comparing idnrk stlal."here stlal is alt bom2
regards
shiba dutta
‎2007 Jun 06 5:44 AM
hi shiba,
thanks a lot for ur valuable suggestion.
i used sorting only over idnrk and then delete adjecent it is working nicely.
thanks once again.