Skip to Content
avatar image
Former Member

calculate the quantity by plants

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..

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Aug 20, 2007 at 05:51 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 20, 2007 at 05:54 AM

    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

    Add comment
    10|10000 characters needed characters exceeded