Skip to content

Latest commit

 

History

History
386 lines (239 loc) · 11.8 KB

File metadata and controls

386 lines (239 loc) · 11.8 KB

Migration

SAP Fiori tools provides a migration utility to help move your SAP Fiori projects from other services, such as SAP Web IDE, to Visual Studio Code (VS Code) or SAP Business Application Studio. Note that SAP Web IDE can still be used if you have a productive SAP Business Technology Platform (SAP BTP) global account and have activated SAP Web IDE there. However, it is no longer possible to access SAP Web IDE using an SAP BTP free tier account.

Some of the key points for migration:

  • Imported and cloned projects are auto-detected for migration.
  • SAP Fiori elements, freestyle SAPUI5, SAPUI5 Adaptation Projects, and SAPUI5 Extensibility are supported.
  • You can migrate multiple projects at once.
  • Migration doesn't update the deployment configuration. Please run npm run deploy-config after migration to configure the migrated application for deployment.
  • A project must have the main data source specified in the manifest.appdescr_variant file.

For more information about extensibility, please see Extending an SAP Fiori Application.

Note:

As of Adaptation Project tooling 1.1.60, adaptation projects provide an Adaptation Editor in SAP Business Application Studio. To support this editor, existing SAPUI5 adaptation projects that have already been migrated to support SAP Fiori tools can be migrated again. Once migrated, the new Adaptation Editor will be available for use.

  • Ensure that you've installed the latest SAP Fiori tools extensions. For more information, see Getting Started with SAP Fiori Tools.
  • Ensure that your SAP Fiori project is running as expected in SAP Web IDE and belongs to the supported project types:
    • SAP Fiori elements V2.
    • SAP Fiori elements V4.
    • freestyle SAPUI5.
    • Extension project.

Recommendations

  • In SAP Business Application Studio, a destination of the target system needs to be defined that reflects the system used in the original application. For more information, see SAP Business Application Studio Help Portal.

    Note:

    If the target system isn’t defined, previewing an application with live data won’t work.

  • In VS Code, you need to know the target system hostname and/or client.

  • We recommend that the migrated project is under a version control system.

  1. Clone your project from git by using the command line or import your project to the workspace as follows:

    • Click File > Open Workspace and create a workspace in the projects folder.

    • Export the project from SAP Web IDE to your computer.

    • Unzip the project on your computer.

    • Drag the project to the workspace of VS Code or SAP Business Application Studio.

  2. Click Start Migration from the pop-up window.

    A new Migration view opens listing all the projects from your workspace. For each project listed, the type of the project is also displayed. If the tool finds no suitable project for migration in your workspace, a message is shown.

    Tip:

    You can also open the Migration view anytime by opening the Command Palette ([CMD/CTRL] + [Shift] + [P] ) and executing the Fiori: Migrate Project for use in Fiori tools command.

  3. Select the project that you want to migrate from the list of projects by selecting the corresponding checkbox. You can choose to manually add a project from the filesystem by clicking Add Project. If the supplied folder has an application that can be migrated, it's added to your list of projects. At any point, you can click the Refresh button to reload the projects from your workspace again.

  4. For each listed project, if applicable, fill in the respective columns based on the information provided below:

    Name

    Description

    Application Identifier

    The identifier of the project from the manifest.json or pom.xml.

    Project Path

    The file path to the location of the project.

    SAP System

    A dropdown detailing the SAP system that should be used in migration. The dropdown lists all the saved systems in VS Code or all the destinations available in SAP Business Application Studio. In SAP Business Application Studio, an entry is preselected if the destination name found in neo-app.json exactly matches a destination available to the user in their subaccount. Selecting an SAP System from the dropdown sets the hostname and client automatically.

    Destination

    A free-text field that by default contains the system name from the project being migrated. It should default to the destination from the source project neo-app.json. Destination is only used by SAP Fiori tools in SAP Business Application Studio and not in VS Code. To make a project compatible, please provide a Destination and Hostname that is accessible to both. Use a destination for the front-end server that has SAPUI5 libraries installed rather than connecting to the back-end OData server directly.

    Hostname

    An input box detailing the back-end hostname to be used in migration. It should be a valid URL or blank. This hostname is only used by SAP Fiori tools in VS Code.

    SAP Client

    An optional numeric field detailing the SAP client to be used in migration. Should be provided in case the client isn’t the system default.

    SAPUI5 Version

    A dropdown detailing the version of SAPUI5 to be used when previewing the migrated application locally. Defaults to the version from neo-app.json if defined, otherwise uses the minUI5Version in the manifest.json file.

    Note:

    For SAPUI5 Extensibility Projects, currently the minimum version required is 1.71.0.

  5. Click Start Migration.

    At this point, your selected projects are migrated and required packages are installed.

    Note:

    After the successful migration of your SAP Fiori elements project, you can view the Application Information for the respective project. To do so, click View Info under the Action column of the migration results view. The Application Information tab is displayed automatically if only a single SAP Fiori elements project is migrated.

    To migrate more projects, press the Back button from the results view.

    For more information, see Application Information.

The migration process modifies several files in your existing project. The following table lists the files that will be updated during migration:

Name

Description

.gitignore

A new file to be added with the build artifacts and libraries to be ignored.

package-lock.json

A file deleted and re-created during migration to reflect updated libraries.

package.json

  • Removes SAPUI5 SAP Web IDE specific libraries.
  • Updates the npm scripts with SAP Fiori tooling targets and dependencies.
  • Presence of sapux:true and ui5-tooling library identifies the project as one that supports SAP Fiori tools.

ui5-local.yaml

A new file that supports offline development, downloads ui5 libraries locally, and runs against mock data.

ui5.yaml

  • Removes the SAP Web IDE builder tasks. SAP Fiori deployment tasks are added later when you add the deployment configuration to your project.
  • Reminds of file changes, supports the proxy middleware and live reload functionality.

index.html

A new file supporting a stand-alone preview of your application without SAP Fiori launchpad. Now, you can start your app with or without SAP Fiori launchpad.

manifest.json

It’s populated by SAP Fiori tools.

changes_loader.js

A new static file that supports live reload of the application.

changes_preview.js

A new static file that supports .changes file from adaptation updates.

flpSandbox.html

This file is updated by migration to support the preview and changes loader. The following differences to the old file version can be defined:

  • The migration tool changes the paths to the ui5 libraries so that they’re proxied through the back end and allows the update of the ui5 version at runtime.
  • Updated to recommended config.

locate-reuse-libs.js

A new static file that finds any custom reuse libraries referenced in your manifest file and queries them with the back-end server to see if the libraries are installed. If so, it registers them at runtime so that they’re available.

flpSandboxMockServer.html

Applies the same changes as the flpSandbox.html file but with the mock server support.

Note:

If the source project doesn’t contain a webapp folder, then one is created during migration and the relevant HTML and JavaScript files are moved to this location.

  1. Review the file changes in the Source Control view. Check for any project-specific changes that may be overwritten and consider reapplying as appropriate.

  2. To ensure your SAP Fiori tools application works as expected, launch any of the SAP Fiori tools commands, such as Page Map, Fiori: Open Application Generator, or Fiori: Open Guided Development.

    Note:

    Some SAP Fiori apps might be missing files like metadata.xml before migration, which can impact some of the SAP Fiori tools features. To avoid this, after migration, make sure that you sync the OData service using Service Manager. For more information, see Managing Service and Annotations Files.

Related Information

Blog: Migrate SAP Fiori projects from SAP Web IDE to SAP Business Application Studio