If, in your VI job, you setup a temporary variable that picks up the company code in your data file (see attached) , and compares it to the current company, you can use it to set, or NOT set a critical field like the vendor division (for example). Without the division, the record will fail, and not be imported.
I think the treatment is a little different in non-framework modules like Payroll. The variable used for the current company is comp$ instead of <CompanyCode>, and you also have to set the field (PR Department for example) to an invalid value. I use ZZ. Then, in the Select tab, exclude Department ZZ from being selected.
To avoid multiple logins, there are various articles out there that allow you to run a VI job from a script or batch file. The command may be different for current versions, but it should be something similar to :
pvxwin32.exe ..\launcher\sota.ini ..\soa\startup.m4p -arg DIRECT UIOFF USER PASSWORD ABC VIWIXX AUTO
Where VIWIXX is the VI Job number, and ABC is the Company ID
The simplest way would be to repeat the VI command in the batch file 25 times. while substituting the next Company ID on each new iteration off the command. An alternative might be an external file that lists the current companies. This file is then referenced in a loop from the main script to repeat the VI command.