Skip to Content
0
Jun 13, 2023 at 02:30 AM

BAS - Load error in app using Attachment Services Reuse Component

699 Views

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

image.png

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:

    image.png

  • 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/6e99fbb264eb4911a8e01ae5882bc52e.html

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?

Attachments

image.png (27.5 kB)
image.png (25.7 kB)