Well, I think I determined the problem. The records I am pulling inside the function are from a global temporary table and when I return them it must be going out of scope (session is over) for that user. This is causing the issue. It worked fine when it was a variable to the function but now that I have it as a return variable it is not working.

I have tried the following:
1) Return the data in a VARRAY instead of a TABLE OF NUMBER - No luck
2) Changed the function to return a reference cursor and then modified the function to return records from a real table while joining to my temporary table... This did not work:
SELECT msi.inventory_item_id
FROM mtl_system_items_b msi
,(SELECT item_id
FROM xxssi_assignment_temp_tbl) a
WHERE msi.organization_id = 105
AND msi.inventory_item_id = a.item_id;


Is there any type of way to return this and do a "copy on write" or something like that where we can allocate new memory so it does not lose the reference?

I modified the code from #2 above to go strictly at a real table and did not change anything else (kept the ref cursor) and it worked fine.

Any ideas?