cancel
Showing results for 
Search instead for 
Did you mean: 

Retrieving dynamic parameters in BTP App across different Sub-Accounts [ Cloud Transport Manager ]

smarchesini
Active Contributor

Hello,

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:

  • If I add a parameter (such as sap-client or custom parameter) in the destination, is there a way for me to retrieve this parameter in my code?
  • Are there any configurations available to dynamically adjust my JavaScript code based on the deployed sub-account?


Thank you,
Sebastiano

Accepted Solutions (0)

Answers (3)

Answers (3)

vbalko-claimate
Active Participant

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.

smarchesini
Active Contributor

I Vladimir, yes, I'm doing like that as well about the destination. But here the situation is little bit different. I would prefer not use a business rules only for that.
But thank you for the answer

Harald_Stevens
Product and Topic Expert
Product and Topic Expert
0 Kudos

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.

junwu
Active Contributor
0 Kudos

you can use "user provided service"

vbalko-claimate
Active Participant
0 Kudos

How do you use that for providing such information? Can you please elaborate more?