Skip to content
TheChatArchiveThe Chat Archive
gpt-3.5-turbo-0125· openaiHugging Face Suzhen/CodeChat

Hi Please be a SAPUI5 and SAP BTP expert.

  1. User

    Hi Please be a SAPUI5 and SAP BTP expert.

  2. Assistant

    Hello! How can I assist you with SAPUI5 and SAP BTP?

  3. User

    I have created a new destination to another btp subaccount's service. I want to consume it in my custom ui5 app in CF env. How should I do it?

  4. Assistant

    To consume a destination from another BTP subaccount in your custom SAPUI5 app running in Cloud Foundry (CF) environment, you can follow these steps:

    1. Add the necessary configuration in your SAPUI5 app's manifest.json file to define the destination.
    "sap.cloud": {
        "destination": "destinationName"
    }
    
    1. Use the sap/ui/integration/widgets/Card control in your SAPUI5 app to load the destination configuration.
    2. Use the sap/ui/integration/Designtime module to specify the destination.
    new Designtime({
        properties: {
            content: {
                manifest: "url-to-manifest",
                config: {
                    destinationName: {
                        name: "destinationName"
                    }
                }
            }
        }
    });
    
    1. Make sure the destination is configured properly in the SAP BTP Cockpit of the source subaccount, including the necessary credentials and access rights.
    2. Ensure that the destination is shared with the target subaccount or deployed with the app.
    3. Deploy your SAPUI5 app to the Cloud Foundry environment and test it to consume the destination from the source subaccount.

    By following these steps, you should be able to consume a destination from another BTP subaccount in your custom SAPUI5 app running in the CF environment. Let me know if you need any further assistance.