I'm aware it's considered bad practice, but I've hard-coded a string client in my SAPUI5/Workflow application's code.
Up until now, everything has been functioning well because I've deployed three different Git branches, each corresponding to a distinct subaccount (Dev, Quality, Prod).
However, with our current efforts to implement the Cloud Transport Manager, maintaining different code versions across BTP environments might not be feasible.
My questions are:
For purpose of finding the information on which landscape level (dev,test,prod) is my app running, I usually use destination with same name on all levels (but with links to the different url) for http calls in UI5 and WF service tasks. If I have some app logic dependent on level of landscape - eg. different mail notification content, different approvers etc. I usually use business rules (if WFM is available) or project with one decision (system parameters) only from BUILD.
You might also look into the option to provide MTA extension descriptors when deploying your MTA. These extension descriptors can be target node specific. See the documentation: https://help.sap.com/docs/cloud-transport-management/sap-cloud-transport-management/upload-mta-exten...
However, if I understood your approach correctly you would rather require to deploy a different MTA (built from the respective branches) to the different target environments. This is not possible with Cloud Transport Management.