abap 750 reduce example
DATA(out) = cl_demo_output=>new( )->write_data( it_ekpo ).
LOOP AT it_ekpo
ASSIGNING FIELD-SYMBOL(<fs_ekpo>).
<fs_ekpo>-netwr = REDUCE netwr( INIT val TYPE netwr
FOR wa IN
FILTER #( it_komv
USING KEY key_kposn
WHERE kposn EQ CONV #( <fs_ekpo>-ebelp ) )
NEXT val = val + wa-kwert ).
ENDLOOP.
out->write_text( 'Using REDUCE:' ).
out->write_data( it_ekpo )->display( ).