2008 Jul 17 4:46 AM
I have on requirement. in tht based on the condition . i have to sum the quantity field of one segment.
here e1edp01 is a segment which stores item level values.
in e1edp01 there is one field menge.
if my condition satisfies
i have to sum all the e1edp01-menge values for the given material.
e1edp01 is also having matnr.so for one matnr i have more than one quantites.
so PLz tell me how to sum the menge field values in tht segment
thanks in advance
pavan
2008 Jul 17 5:20 AM
Hi Pavan,
Try this way :
parameters :
p_matnr like E1EDP01-matnr.
Data :
w_total type p decimals 2,
t_tab like standard table of E1EDP01,
fs_tab like line of t_tab.
select MENGE
MATNR
from E1EDP01
into table t_tab
where matnr eq p_matnr.
loop at t_tab into fs_tab.
if < your condition >.
w_total = w_total + fs_tab-MENGE.
endif.
endloop.
write 😕 w_total.
Regards,
Swapna.
2008 Jul 17 5:20 AM
Hi Pavan,
Try this way :
parameters :
p_matnr like E1EDP01-matnr.
Data :
w_total type p decimals 2,
t_tab like standard table of E1EDP01,
fs_tab like line of t_tab.
select MENGE
MATNR
from E1EDP01
into table t_tab
where matnr eq p_matnr.
loop at t_tab into fs_tab.
if < your condition >.
w_total = w_total + fs_tab-MENGE.
endif.
endloop.
write 😕 w_total.
Regards,
Swapna.