You should utilize the start routine or end routine functionality of a 7.x transformation.
You can read from the DSO active table which has the naming convention: /BI0/A + dsoName + 00 (business content dso) or /BIC/A + dsoName + 00.
For example in end routine:
//local data declaration
DATA: lt_dso TYPE standard table of /bic/azfi_o0100.
FIELD-SYMBOLS: <fs_dso> type /bic/azfi_o0100.
//get data
SELECT *
FROM /bic/azfi_o0100
INTO table lt_dso
FOR ALL ENTRIES IN RESULT_PACKAGE
WHERE objectA = objectA AND
objectB = objectB.
SORT lt_dso BY objectA objectB.
//populate result package
LOOP AT RESULT_PACKAGE ASSIGNING <result_fields>.
READ TABLE lt_dso ASSIGNING <fs_dso>
WITH KEY objectA = <result_fields>-objectA
objectB = <result_fields>-objectB
binary search.
//do calculation...
<result_fields>-zsmoothavg = ...
ENDLOOP.