Here's a function that will do exactly what mpb says (and it works):
CloseAllDataTablesExcept = Function({FunctionDataTable},
FunctionName = FunctionDataTable << Get Name;
For(i=NTable(), i>0, i--,
If(DataTable(i)<<GetName != FunctionName,
Close(DataTable(i), nosave)
)
);
);