cancel
Showing results for 
Search instead for 
Did you mean: 

Having problem with index src.

delmiranda
Participant
0 Kudos

Hi Experts,

I'm trying to use the source from my local file.

Here is what I did.

I go to this link (https://sapui5.netweaver.ondemand.com/1.73.1/resources/sap-ui-core.js)
Copy and paste the code then saved to my sap_resources folder and name it as sap-ui-core1_73_1.js

Then I tried to change the path of my src on my index.html.

Why It does not work? It only show white screen or blank screen.

Here is my code

<script id="sap-ui-bootstrap"<br>  src="sap_resources/sap-ui-core1_73_1.js"<br>  data-sap-ui-libs="sap.ui.core, sap.m, sap.ui.table, sap.ui.commons, sap.ui.vbm"<br>  data-sap-ui-theme="sap_belize"<br>  data-sap-ui-appCacheBuster="./"></script>

But it doesn't work.

I already tried to store the code of sap ui core js to TMD and TMQ

<script id="sap-ui-bootstrap" <br> src="tmd.sampleurl.com/sap_ui_core1_73_1/resources/sap-ui-core.js"<br>  data-sap-ui-libs="sap.ui.core, sap.m, sap.ui.table, sap.ui.commons, sap.ui.vbm"<br>  data-sap-ui-theme="sap_belize"<br>  data-sap-ui-appCacheBuster="./"></script>

and it showing white screen.

I also tried like this so the code will change it dynamicall

<script><br> var script = document.createelement('script');<br> if(windows.location.href.index('TMD') != 0)<br> {
   script.setAttribute('src', 'tmd.sampleurl.com/sap_ui_core1_73_1/resources/sap-ui-core.js');
 }
 if(windows.location.href.index('TMQ') != 0)<br> { <br>   script.setAttribute('src', 'tmq.sampleurl.com/sap_ui_core1_73_1/resources/sap-ui-core.js');<br> }<br> script.setAttribute('id', 'sap-ui-bootstrap);<br> script.setAttribute('data-sap-ui-libs', 'sap.ui.core, sap.m, sap.ui.table, sap.ui.commons, sap.ui.vbm'); <br> script.setAttribute('data-sap-ui-theme', 'sap_belize');<br> script.setAttribute('data-sap-ui-appCacheBuster', './');
 document.head.appendChild(script);<br></script>
junwu
Active Contributor
0 Kudos

why you want to do that?

delmiranda
Participant
0 Kudos

because the system we are using is an old version, so we are dependent on it and that version will be obsolete soon. so we need to backup the code and all.

junwu
Active Contributor
0 Kudos

that is just bootstrap js. for ui5 you have tons of js. I don't think you can do that

are u using cdn ui5? not your abap server's ui5 lib?

delmiranda
Participant
0 Kudos

What do you mean?
this is my original code before.

<script id="sap-ui-bootstrap"<br>  src="https://sapui5.netweaver.ondemand.com/1.73.1/resources/sap-ui-cachebuster/sap-ui-core.js"<br>  data-sap-ui-libs="sap.ui.core, sap.m, sap.ui.table, sap.ui.commons, sap.ui.vbm"<br>  data-sap-ui-theme="sap_belize"<br>  data-sap-ui-appCacheBuster="./"></script>

then, I want to save the file along with the project so I can refer to it using path
or save to ABAP server then use URL like I mentioned above

junwu
Active Contributor
0 Kudos

you should use the ui5 lib in your abap server

you should never use

https://sapui5.netweaver.ondemand.com/****
delmiranda
Participant
0 Kudos

script.setAttribute('src', 'tmq.sampleurl.com/sap_ui_core1_73_1/resources/sap-ui-core.js');

Yeah, this is my sample code, I don't know why it's not working; it shows only a white screen.

junwu
Active Contributor
0 Kudos

it will never work. ui5 is not just one that js file.

delmiranda
Participant
0 Kudos

Do you have any ideas? how to locally store the ui-core.js file properly including the libraries.

Accepted Solutions (1)

Accepted Solutions (1)

Margot
Product and Topic Expert
Product and Topic Expert
0 Kudos

Even if it would work what you plan, I advise against it.

First of all, SAPUI5 may only be used within the license agreement of the respective SAP product. So if you want to run a SAPUI5 app from an SAP onPremise system, you rely on the SAPUI5 available for this SAP onPremise system and must not bootstrap SAPUI5 from CDN. See SAP Note 2943781 for further information. So, what you are trying to do cannot be achieved legally.

Secondly, SAPUI5 1.73 was only an interim-version and is out of maintenance since more than two years already. I would never run an app productively with such an outdated version. And as this version is out of maintenance since more than a year, also its cloud provisioning ended. See SAP Note 3001696 for further information about the deletion of outdated SAPUI5 versions. This means that this version is about to be deleted from the SAPUI5 CND. So the link (https://sapui5.netweaver.ondemand.com/1.73.1/resources/sap-ui-core.js) will point to nothing in a near future. In fact, it is a lucky coincidence that it is not deleted already. But from internal resources I can tell that this version will be irrevocably removed beginning of April '23. So, I really recommend to update your system and also your app to a current version of SAPUI5.

delmiranda
Participant

Thank you for sharing this valuable information. I appreciate your professional insight and advice regarding the use of SAPUI5. It's important to ensure that we comply with licensing agreements and use up-to-date versions of software for optimal functionality and security. Thank you again for your input.

Answers (1)

Answers (1)

junwu
Active Contributor
0 Kudos

forget about it, you have no chance to make it work.