Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Error on SAPUI5 page

Hi

I am using SAPUI5 but when I deploy the app I get

this error

Message: 'sap' is undefined

Line: 17

Char: 22

Code: 0

URI: http://localhost:8080/CURRENCY_HTML_6/

This is my html source:

<!DOCTYPE HTML>

<!-- Auto-Generated Application. Version: 2.6.100 -->

<html>

       <head>

              <meta content="IE=edge" http-equiv="X-UA-Compatible">

                <link rel="stylesheet" type="text/css" href="css/styles.css" />

                  <script id="sap-ui-bootstrap"

                      type="text/javascript"

                      src="./sapui5-1.4/resources/sap-ui-core.js"

                      data-sap-ui-theme="sap_goldreflection"

                      data-sap-ui-libs="sap.ui.commons,sap.ui.ux3,sap.ui.table" >

              </script>

            

                 <script>

                     sap.ui.localResources("gender");

                     var view = sap.ui.view({id:"ID_gendetr", viewName:"gender.resources.gendetr", type:sap.ui.core.mvc.ViewType.JS});

                        view.placeAt("content");

                 </script>

       </head>

       <body class="sapUiBody" role="application">

              <div id="content"></div>

       </body>

</html>

Regards

yuval

Tags:
Former Member
replied

That looks like your path to SAPUI5 (src="./sapui5-1.4/resources/sap-ui-core.js") is not correct. Check where you deployed it and modify that.

Also, the error message style suggests you're using Internet Explorer. You might find using Chrome, with its great developer tools, a lot easier to work with.

Good luck!

dj

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question