You can use the OnApplyRecord event for this, and the methods that support this event (SetQueryVariables, GetQueryVariables). The PkgApply example project demonstrates this. It takes a cursor result set from a package, and inserts, updates, and deletes records through program units in the same package.
------------------
Marco Kalter
Allround Automations