Skip to Content
author's profile photo Former Member
Former Member

how to use jQuery.sap.registerModulePath

  • 1.There is a BSP Application/Project – MDG_LIB_BP.

This has fragments for views.

  • 2.The standard fiori app calls the MDG_LIB_BP application from the component in the below manner.
  • 1.Now I want to call the MDG_LIB_BP in my custom application in similar fashion.

Please help.

Useful reference: UI5 Demokit

1.png (122.6 kB)
2.png (98.0 kB)
Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Aug 18, 2017 at 04:36 PM

    It is to refer to the folder in which all your views, controllers, fragments etc. are stored. Once mapped, you use the relative path to the inside folders, which invoking the views/controllers/fragments.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 18, 2017 at 02:21 PM
    -1

    an alternate solution... this is something I have done on my controller.js files

    jQuery.sap.require("path.to.your.other.jsLibrary");

    Another option is if you use the script tag in your html and reference the external library.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hello,

      I tried the same in my controller as well as component, but i get the result as undefined.

      jQuery.sap.registerModulePath("sap.fcg.mdg.lib.bp", "/sap/bc/ui5_ui5/sap/MDG_LIB_BP/sap/fcg/mdg/lib/bp")

      undefined

      The standard app has exactly the same path and is able to load the library, but i am not :(

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.