Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
michal_keidar
Active Contributor
The SAP Web IDE support team frequently faces inquiries from users saying they have made some changes to their application, but these changes don’t show up at run time after they redeploy the app.

Why is this happening?

The trouble starts when the developer decides to implement his code changes by importing the code of the app from an FLP runtime, e.g. the ABAP system or HCP account (i.e. "Import => Application from SAPUI5 ABAP Repository" or "Import => Application from SAP HANA Cloud Platform").

Why is this bad?

Because the app source code is changed during its deployment from SAP Web IDE by the default build process.

The default build process does mainly three things:

  1. It “flattens” the app, which means that all its resources now reside directly under the root, with no “webapp” folder. This is required for several reasons, but the most important one is to enable the application index service in the backend to identify and process the app.

  2. It removes unnecessary files that are relevant only for development in SAP Web IDE
    (e.g. project.json). These files hold important information relevant for the development process, for example the project settings, the project types, whether to build the app during deployment or not, etc.

  3. It creates a Component-preload.js file which holds a minified version of the app, for better loading performance.


In other words, the build & deployment change the structure of the application.
What’s being deployed is not the source code. Furthermore, the imported app is given “fresh” settings, meaning that some configurations are not set.

Therefore, importing the already deployed version of an application to make further code changes leads to critical errors.

 

So what happens exactly?

Users who import the deployed app from the FLP runtime make changes to their app, but their changes aren’t visible when they redeploy and run the app from their FLP.

When they imported the app from the FLP runtime, they got the app with an existing Component-preload.js file.

Now they are implementing their changes. Yet, since they imported the app from the FLP runtime, its settings are reset, and the app will not get built again upon redeployment, meaning the Component-preload.js file will not get updated with the new changes.

The FLP runtime sees the outdated Component-preload.js file, and so the changes aren’t visible at runtime.

What is the solution?

Always make changes to the original source code.

Therefore we strongly recommend the use of a source control management tool (SAP Web IDE supports Git). This means that your app has a Git repository, and every developer can clone it to his SAP Web IDE and implement his changes by committing and pushing them to the repository.

This way, the app is developed using Git and only deployed when it is ready for its next life-cycle phase (usually testing/production).

Want to learn more about using Git in SAP Web IDE? Checkout this video.

What if you no longer have a copy of the source code?

As a workaround, retrieve the code from the FLP runtime, then go into the project settings and make sure that SAPUI5 Client Build Project Type is checked.

What's next?

SAP plans to introduce even more powerful "build" functionality in the near future to support additional scenarios, including "continuous integration" solutions. It will be even more important for you to use a version control system like Git.
12 Comments