I guess you can populate AIF_OPEN_INTERFACE from a custom script, but the way you are supposed to do it is by modifying the Open Interface Adapter project directly from ODI.
You may need to install ODI studio to be able to do that. In the Open Interface Balances package, just add some steps between the "print variables" and "ERPI data interface..." steps.
See FDMEE Administrator's Guide.
Hope that helps.
you can either use ODI or BefImport event script (you have an example in the admin guide).