Skip to Content
avatar image
Former Member

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

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?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    Feb 16, 2017 at 03:28 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 16, 2017 at 02:21 PM

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

    add that line code

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 16, 2017 at 02:36 PM

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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 16, 2017 at 04:36 PM

    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

    Add comment
    10|10000 characters needed characters exceeded