Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

calculate the quantity by plants

Former Member
0 Kudos

Hi friends,

This is simple but while implimenting its not comming as reqired..

I want calculate the qunatity by locations... from MSEG table .. U will get all fields..

how can i do this please..

iwant pass this these two fields to another table..

please suggest me..

if used AT end of..

sum..

end at..

i have to use write..

with out write stmt.. how can u do thet..

please send me the code.. if possible..

THanks in Advance..

2 REPLIES 2

Former Member
0 Kudos

Hi,

you can also use

on change of

try this

data: itab like ekko occurs 0 with header line.

data: itab1 like ekpo occurs 0 with header line.

select * from ekko into table itab up to 20 rows.

if itab[] is not initial.

select * from ekpo into table itab1 for all entries in itab where ebeln = itab-ebeln.

endif.

sort : itab by ebeln,

itab1 by ebeln ebelp.

loop at itab1.

on change of itab1-ebeln.

write:/ itab1-ebeln .

endon .

write: /20 itab1-ebelp.

endloop.

thanks & regards,

Venkatesh

Former Member
0 Kudos

Hi,

i have given a wrong thing to you..

you can use the collect statemetn

whcih can sum up the numeric field

like

loop at itab.

itab1-field = itab-field. ( some characterfield)

itab1-field1 = itab-field. ( numeric field)

collect itab1.

endloop.

thanks & regards,

Venkatesh