cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Integration Suites javascript load library

07-18-2023 12:22 PM
kenny_bui Explorer
3672 views 4 comments Go to solution
0 Likes
SAP Managed Tags
Subscribe

Hi Experts,

I am working with SAP Integration Suites Javascript.

I want to load a library (for ex 'lodash') into to be use in my logic. But it is alway show below error when processing the script:

Please help to advice whether i can do that or do we have any solution (for example download the whole js file of it and import into our scipt and resue?)

Thanks

0 Likes

Accepted Solutions (1)

Accepted Solutions (1)

Yogananda
Product and Topic Expert
Product and Topic Expert

kenny.bui

I don't think lodash is supported library in CPI for Javascript script.

Answers (2)

Answers (2)

Sriprasadsbhat
Active Contributor

Hello ,

import statement ( for class ) with external library ( jar) will work if you have imported these jar under resources tab of your iflow.Navigate to Resources -> click on add and then select Archive to import external jar.

Regards,

Sri

CarlosRoggan
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi, I'm not familiar here, just guessing if the import statement in line 8 is supported by the javascript runtime version that is running in CPI?

kenny_bui
Explorer
0 Likes

Hi Carlos,

Thanks for your reponse.

I think i can resolve the issue by copy the needed function of lodash to the script and call locally 😄

Thanks