If truly middle ware, why not use PI? If you are looking at just "exposing" SAP, then think in terms of services/APIs you could expose. Per your post....
The idea is to try as much as possible all the applications/environments separated and stand alone to switch them on and off easily and to maintain them without things get a pain for all the others "partners". To achieve this a custom "middleware" will be developed, taking care to switch requests between all the subjects.This middleware would be an online service-dispatcher, basically.
That really sounds like a "services" framework/foundation is what you want.