Hi,
While appending new records to result Pacakge you will need to take care of record number explicitly.
at the end of code,
write a simple loop at to populate, record number for each record,
l_record = 1.
loop at result_pacakge into wa_pacakge.
wa_pacakge-record = l_record.
modify result_pacakge from wa_package.
l_record = l_record + 1.
endloop.
Should fix your problem.