Skip to Content
Author's profile photo Former Member

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,


Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Christian Guenter
      Christian Guenter

      Hi Michael,

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

      in your Fiori-App?

      Regards Christian

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      Hy Christian,

      i've placed it in the Component.js file.



      Author's profile photo Former Member
      Former Member

      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!




      Author's profile photo Krishna Kishor Kammaje
      Krishna Kishor Kammaje

      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".

      Author's profile photo Wouter Lemaire
      Wouter Lemaire

      You should create question, not a blog.


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