Skip to Content

Include External Javascript Library in SAPUI5


i needed to add externel Javascript libraries into one of our Fiori applications. It took me some time to figure out how this could be achived, as eg. didn’t properly call the defined callback function. So here comes a working example – i know d3 is already included within sapui5, but i’ve needed another version as shipped in sapui5. This works also with other external js libraries.“d3”, “../extjslib/d3”);“d3”);

Have a nice day & kind regards,


You must be Logged on to comment or reply to a post.
  • Hi Michael,

    where do place the call to"d3", "../extjslib/d3");"d3");

    in your Fiori-App?

    Regards Christian

      • Hi Michail,

        Below is the screen of my project, I am developing a custom fiori app and launchpad for accessing the custom app. We need client side pdf generation so we are trying to include third party library marked in blue to accomplish the requirement.

        Please provide code or steps to include these files using component.js.

        I am aware of including third party library index.html, as are not using index we need component.js route of including these files.

        your reply is much appreciated!




  • It is better to use sap.ui.define instead of as a best practice.

    Also other approach is to include it in Component.js in "includes" parameter under "metadata".

  • You should create question, not a blog.


    For your question, this is how I include other modules: