Show TOC

Run Your Own Applications in the SandboxLocate this document in the navigation structure

The local sandbox environment for the SAP Fiori launchpad allows you to run your local SAP Fiori apps inside the SAP Fiori launchpad.

Configure the SAPUI5 Component to Be Embedded

You create a root component for the application. The demo apps serve as reference (for example, see /test-resources/sap/ushell/demoapp/FioriSandboxDefaultApp/Component.js).

The SAP Fiori launchpad sandbox comes with a default configuration file for the demo apps, which is stored under test-resources/sap/ushell/shells/sandbox/fioriSandboxConfig.js (deployed in jar file). You can extend the default configuration by providing an additional configuration file under URL /appconfig/fioriSandboxConfig.json. Your configuration changes overwrite the default configuration.

Therefore, you set up a local Java Web server and deploy the configuration as an additional Web module.

Create a local configuration file. For more information, see Creating a Local Configuration File.

Creating a Local Configuration File

Context

The local configuration is stored in the JSON format. You can configure a list of applications. The applications have a key that is used for launching. This key is composed of the syntax <SemanticObject>-<Action>. For each application, specify the following properties:

  • additionalInformation: The additionalInformation property in this object refers to the name of the root component of your SAPUI5 Fiori application (without ".Component").

  • applicationType: The application type for SAPUI5 applications is always URL.

  • url: The URL property is set to the root path of your application (the folder where you would have your Component.js files).

  • description: The description for the application.

    Example

    You have created an SAPUI5 application that is deployed on your local test server under path '/MyFioriApplication'. You have created a root component called “MyFioriApplication”. Then the configuration file must be as follows:

    fioriSandboxConfig.json

    {
    "applications" : { 
                "MyFioriObject-display" : {
                    "additionalInformation" : "SAPUI5.Component=MyFioriApplication",
                    "applicationType" : "URL",
                    "url" : "/MyFioriApplication",
                    "description" : "MyFioriApplication"
                }
        }
    }
    Caution The key “MyFioriObject-display” must be constructed from two identifiers with a dash, not “MyFioriObject display” or “MyFioriObjectdisplay”.

To create the configuration file, proceed as follows:

Procedure

  1. Create a new Web project using Start of the navigation path File Next navigation step New Next navigation step Dynamic Web Project End of the navigation path and use the project name appconfig.
  2. Create a file fioriSandboxConfig.json under the WebContent folder of the project.
  3. Edit the file as needed.
  4. Deploy appconfig on the local test server:
    1. Open the Servers view.
    2. Double-click the root node.
    3. Go to the Modules tab.
    4. Choose Add Web Module.
    5. Choose the appconfig project.
      Make sure that the path is called /appconfig.
    6. Restart the test server.