cancel
Showing results for 
Search instead for 
Did you mean: 

BAS - Load error in app using Attachment Services Reuse Component

DiegoValdivia
Participant
0 Kudos

Hi everyone,

In Business Application Studio, I created a Fiori Elements app that uses Attachment Services Reuse Component. The app calls a RAP Odata Service V2. The app was working properly until last week, when our system was upgraded from S/4 HANA 2021 to S/4 HANA 2022.

Before the upgrade, when executed the app in BAS, it was correcly showing an additional section for attachments.

After the upgrade, it started to show the following error message on the object page:

Failed to resolve dependencies of 'sap/se/mi/plm/lib/attachmentservice/attachment/view/Attachment.controller.js'
-> 'sap/suite/ui/commons/CloudFilePicker.js': failed to load 'sap/suite/ui/commons/CloudFilePicker.js' from ../resources/sap/suite/ui/commons/CloudFilePicker.js: 404 - Not Found

There are two important things to mention:

  • When I execute the app in BAS and then open chrome developer tools, I can confirm that the app loaded many files on folder /sap/suite/ui/commons/ but CloudFilePicker.js is not there:

  • When I deploy the app to the backend and execute it on Fiori Launchpad, the attachment section is working properly.

Today, I followed next instructions about Adding a Reference to Reuse component in BAS (After importing Bsp PLM_ATH_CRES1 which is the one for Attachment services), but it didn't solve the issue

https://help.sap.com/docs/SAP_FIORI_tools/17d50220bcd848aa854c9c182d65b699/6e99fbb264eb4911a8e01ae58...

These are the line in my manifest.json referring to the attachments reuse component:

"sap.ui5": {
"flexEnabled": true,
"dependencies": {
"minUI5Version": "1.96.12",
"libs": {
"sap.m": {},
"sap.ui.core": {},
"sap.ushell": {},
"sap.f": {},
"sap.ui.comp": {},
"sap.ui.generic.app": {},
"sap.suite.ui.generic.template": {},
"sap.se.mi.plm.lib.attachmentservice": {
}
}

This is the code in the object page

"pages": {
"ObjectPage|Mat_Stock": {
"entitySet": "Mat_Stock",
"defaultLayoutTypeIfExternalNavigation": "MidColumnFullScreen",
"component": {
"name": "sap.suite.ui.generic.template.ObjectPage"
},
"embeddedComponents": {
"simple::Attachments": {
"id": "simple::Attachments",
"componentName": "sap.se.mi.plm.lib.attachmentservice.attachment.components.stcomponent",
"title": "Attachments",
"settings": {
"mode": "C",
"objectType": "MARA",
"objectKey": "{Material}",
"documentType": "MM2"
}
}
},

Just to confirm that I wasn't missing anything in my custom app, I downloaded standard app EAM_MPLANMANS1 (F5325 Manage Maintenance Plans) and imported it into BAS, then confirmed that such standard app was also showing the same error message due file CloudFilePicker.js not found.

Has anyone faced this same error?

Accepted Solutions (1)

Accepted Solutions (1)

DiegoValdivia
Participant
0 Kudos

For anyone else facing this same issue, it was solved by changing the sap.ui5.minUI5Version from 1.96.12 to 1.108.0

Answers (1)

Answers (1)

ADR
Participant
0 Kudos

Hi diegovaldivia , I am trying to use this reuse component, but the library files are failing to load while running locally in VSCode. Could you please help?

Error Message front end:

image.png

Error from network call

image.png

Manifest.json:

image.png

image.png

Thanks in advance.

-Anupam

DiegoValdivia
Participant
0 Kudos

Hi Anupam,

I suggest for you to create a new question in the forum. Unfortunately, I'm not expert in this reuse component.

When you create the new question, please make sure your images are correctly uploaded, because in this post, your images are not visible, I only see "image.png"

Regards.