Skip to Content
0

Fiori Launchpad: TypeError: sap.ui.table.Table is not a constructor

Feb 16, 2017 at 02:02 PM

753

avatar image

Hi,

while testing my SAPUI5 application within the Fiori Launchpad, I get an error on all sites where I've used an instance of sap.ui.table.Table. In my WebIDE it all works fine but once I have it deployed to the Launchpad, all the table views are crashing with the error "TypeError: sap.ui.table.Table is not a constructor" and remain emtpy.

I'm using the table constructor in the following way:

var table = new sap.ui.table.Table();

What I've tried so far: In the Fiori Configuration Cockpit I changed in the System Setting the "SAPUI5 Version" to the same version that I'm using for the development which is 1.42.8.

Any thoughts what went wrong?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Best Answer
Veeraraghavan Narasimhan
Feb 16, 2017 at 03:28 PM
0

Hello Mario,

You will need to include the library as a dependency to your component. In manifest.json you will need to add

"dependencies": {
			"minUI5Version": "${sap.ui5.dist.version}",
			"libs": {
				"sap.ui.core": {
					"minVersion": "1.38.0"
				},
				"sap.m": {
					"minVersion": "1.38.0"
				},
                                "sap.ui.table" : {
                                        "minVersion" : "1.38.0"(could be changed to your local version)
                                }
			}
		}

With this table control should be available to you.

Thanks and Regards,

Veera

Share
10 |10000 characters needed characters left characters exceeded
Jun Wu Feb 16, 2017 at 02:21 PM
1

$.sap.require("sap.ui.table.Table");

add that line code

Share
10 |10000 characters needed characters left characters exceeded
Mario Fliegner Feb 16, 2017 at 02:36 PM
0

Unfortunately, even with that code it still crashes...

Show 1 Share
10 |10000 characters needed characters left characters exceeded

are u sure you were testing with correct code? cache may be there...

0
Mario Fliegner Feb 16, 2017 at 04:36 PM
0

Dear Veera,

thanks for your input, it works now. I'm not really sure why, because the manifest file should be even used in my WebIDE while testing the application... however, after adding the code, the tables are visible now.

BR,

Mario

Show 1 Share
10 |10000 characters needed characters left characters exceeded

It depends on webide launches the application compared to Fiori Launchpad. In case the issue is resolved can you mark it as correct answer and close the question.

0