Show TOC

Folder Structure and Project ArtifactsLocate this document in the navigation structure

Once you have applied the template, the generated application is ready to run.
Note
  • The new app or component reuses the views and controllers from sap.suite.ui.generic.template.

  • You can find the destinations in the neo-app.json file.

  • The resource links and route definitions for navigation are persisted in the app descriptor file (manifest.json).

Figure 1: Smart Templates: Folder Structure
Component.js

After you generate the application, the SAPUI5 component Component.js which represents the application is executable. This component links to the manifest where further information can be found at run-time, such as the OData resource links or the reference to the smart template.

Caution Do not touch this file.
Component.js:
jQuery.sap.declare("...your...Component");

sap.ui.getCore().loadLibrary("sap.ui.generic.app");

jQuery.sap.require("sap.ui.generic.app.AppComponent");

sap.ui.generic.app.AppComponent.extend("...your...Component", {

    metadata: {

        "manifest": "json"

    }

});

The generated app uses the re-use component controller by referencing a smart template, which uses transactional processing including draft-save. Similarly, the generated app uses the generic view in the smart template's folder, which is based on the XML templating approach.

Manifest.json
You can find the service and annotation resource links that you have entered in the configuration wizard in the app descriptor (manifest.json file).
"dataSources": {
        "mainService": {
        "uri": "/sap/opu/odata/sap/SEPMRA_PROD_MAN/",
        "type": "OData",
        "settings": {
        "annotations": [
               "mainAnnotations",
               "localAnnotations"
                       ],
        "localUri": "localService/metadata.xml"
                        }
                        },
        "mainAnnotations": {
               "uri": "/sap/opu/odata/IWFND/CATALOGSERVICE;v=2/Annotations(TechnicalName='SEPMRA_PROD_MAN_ANNO_MDL',Version='0001')/$value/",
               "type": "ODataAnnotation",
               "settings": {
         "localUri": "localService/annotations.xml"
                        }
                        },
         "localAnnotations": {
                "uri": "annotations/annotations.xml",
                "type": "ODataAnnotation",
                "settings": {
         "localUri": "annotations/annotations.xml"
                                                               }
                                               }
                               },

Here, the annotations are read using the catalog service of SAP Gateway. This is the standard method when using the auto-exposure feature of the application infrastructure.

The local resources localService/metadata.xml and localService/SMART_PROD_MAN_ANNO_MDL.xml are generated for local tests that want to simulate back-end access.

Besides the annotations that are retrieved from the back-end system, the local resource annotations.xml plays a role at run-time, as this file comprises the facet descriptions for the object page. Here, you must maintain the labels for the different facets.

We recommend that you use i18n properties, for example, to maintain the texts in the related i18n resource file. For more information, see Maintaining Facet Texts.

Note You can use the annotation modeler to maintain UI.facets. For more information, see Annotation Modeler.
Neo-app.json
You can find the routing information in the neoapp.json file, based on the destination you have chosen as follows:
{
  "welcomeFile": "index.html",
  "routes": [
    {
      "path": "/sap/opu/odata",
      "target": {
        "type": "destination",
        "name": "QH3_815",
        "entryPath": "/sap/opu/odata"
      },
      "description": "QH3_815 (Smart Templates)"
    },
    {
      "path": "/sap/bc/lrep",
      "target": {
        "type": "destination",
        "name": "QH3_815",
        "entryPath": "/sap/bc/lrep"
      },
      "description": "QH3_815"
    },

You can adapt the destinations in order to address a different back-end system. This option is also available under Start of the navigation path Run Configurations Next navigation step Advanced Settings End of the navigation path.