Hi,
Mainly you have to move the code from the field routine to the End routine.
For instance, in the End routine you'd write:
LOOP AT RESULT_PACKAGE ASSIGNING <result_fields>.
READ TABLE <<similar read stmt as the one currently used in the field routine>>
<result_fields>-fieldname = work_area_of_the_above_itab-fieldname.
ENDLOOP.