cancel
Showing results for 
Search instead for 
Did you mean: 

Fiori Elements v4 issue in SCP Launchpad after SAPUI5 1.86.0 update (2021-01-28)

hschaefer123
Participant
0 Kudos

Hi,
with the update from 2020-01-28 the SAP SCP Launchpad uses 1.86.0, my cap fiori app using Draft model throws error while navigating from listreport to objectpage!

Fehler beim Anlegen der Sicht. (EN: Error while creating the view)<br>Cannot read property 'hasOwnProperty' of undefined
Log-dbg.js:456 2021-01-29 09:56:14.764155 Cannot read property 'hasOwnProperty' of undefined - TypeError: Cannot read property 'hasOwnProperty' of undefined  
 TypeError: Cannot read property 'hasOwnProperty' of undefined
    at getEditAction (AnnotationHelper-dbg.js:324)
    at j1 (XMLPreprocessor-dbg.js:1680)
    at n1 (XMLPreprocessor-dbg.js:1846)
    at eval (XMLPreprocessor-dbg.js:1799)
    at q (XMLPreprocessor-dbg.js:451)
    at k (XMLPreprocessor-dbg.js:456)
    at m1 (XMLPreprocessor-dbg.js:1795)
    at a1 (XMLPreprocessor-dbg.js:1215)
    at eval (XMLPreprocessor-dbg.js:1721)
    at SyncPromise-dbg.js:309

inside >var bDraftRoot = oAnnotations.hasOwnProperty("@com.sap.vocabularies.Common.v1.DraftRoot");

Log-dbg.js:456 2021-01-29 09:56:14.783750 TypeError: t.oView.setModel is not a function -  

Sadly, there is currently no option in the launchpad, to set a fixed SAPUI5 version (like in former neo portal), which would help a lot instead against auto update to latest version.

$metadata contains

<Annotations Target="ManageService.EntityContainer/ChangeRequest">
  <Annotation Term="Common.DraftRoot">
    <Record Type="Common.DraftRootType">
      <PropertyValue Property="ActivationAction" String="ManageService.draftActivate"/>
      <PropertyValue Property="EditAction" String="ManageService.draftEdit"/>
      <PropertyValue Property="PreparationAction" String="ManageService.draftPrepare"/>
    </Record>
  </Annotation>
</Annotations>

Any idea, what is missing an how to fix it?

The app worked fine with 1.85.x

Any help would be appreciated (maybe a new missing annotation?)

.

Best Regards
Holger

Accepted Solutions (1)

Accepted Solutions (1)

hschaefer123
Participant
0 Kudos

Hallo Bernhard,
thanks for the help with the ticket.

Problem was a wrong entry in routes

{
  "pattern": "ChangeRequest({key}):?query:",
  "name": "ChangeRequestObjectPage",
  "target": [
    "ChangeRequestList", -> needs to be removed! old artifact from FlexibleColumnLayout test
    "ChangeRequestObjectPage"
  ]
}

I think, this was introduced by SAP Application Modeler while switching to FlexibleColumnLayout during dev time. Later on, switching back to StandardLayout, this has not been rolled back. Was working in 1.85 (but still wrongly used) but no more in 1.86.

Maybe some tooling operations only work in one direction. I also ran into an issue that was fixed by SAP with @sap/ux-specification: 1.84.1 (maybe dependend issue).

Anyhow, great to get my project running using SAPUI5 1.86.

Thank you very much for the quick help!

Best Regards
Holger

Answers (4)

Answers (4)

0 Kudos

Hi Holger,

thanks for your reply! As there seems to be some issues with regards to the new version, I would like to ask you to open an incident (CA-UI5-FE). Nevertheless it would be nice if you could send me your PoC project, so that I can test it locally. I would then also update the incident with my findings.

Best regards,

Bernhard

hschaefer123
Participant
0 Kudos

Sound goods, i will create the incident tomorrow with our customer in their namespace and attach the local project to it.

I will also this post with the Ticket No.

Thanks
Holger

0 Kudos

Hi Holger,

it's indeed crashing in a Fiori Elements v4 function. The function itself was not changed for more than a year. It looks like there aren't any annotations on the entity set ChangeRequest available. So let's have at first look into the $metadata. I assume the request for $metadata was successful. Do you see in the edmx:Reference section the com.sap.vocabularies.v1.Common vocabulary and it's alias "Common" defined?

And are there any additional log entries (even warnings) that refer to issues with model/metadata?

Sorry for asking these annoying questions, you might checked already, but I would like to restrict the problem area.

Best regards,

Bernhard

hschaefer123
Participant
0 Kudos

Hi Bernhard,
with my upper fix, i have the same CAP service running sideBySide in 1.85.2 and 1.86.0 (used by Launchpad).

So the service is the same running on 1.85. The whole project is running as PoC with mock data in local CAP project, so i would be able to give you acces to it for a local test (maybe by email?).

NavBack from buggy detail side, i also see an issue

Failed to create cache for binding sap.ui.model.odata.v4.ODataListBinding: /ChangeRequest(id=fa0cd120-7392-408f-8e5e-06fb1bebd691,IsActiveEntity=true)//ChangeRequest - Error: Type cannot be determined, no metadata for path: /ChangeRequest//ChangeRequest/status_code<br>

that looks wired, for doubling the entity set. The issue for status_code are fired, if naviagting back from buggy detail to list view and switching the view using the segmentedButton (see quickVariantSelection)

The listReport is using a Selection Varaint filtering out Data.

manifest.json (list report control configuration)

"controlConfiguration": {
                                "@com.sap.vocabularies.UI.v1.LineItem": {
                                    "tableSettings": {
                                        "quickVariantSelection": {
                                            "paths": [
                                                {
                                                    "key": "tab1",
                                                    "annotationPath": "com.sap.vocabularies.UI.v1.SelectionVariant#Offer"
                                                },
                                                {
                                                    "key": "tab2",
                                                    "annotationPath": "com.sap.vocabularies.UI.v1.SelectionVariant#All"
                                                },
                                                {
                                                    "key": "tab3",
                                                    "annotationPath": "com.sap.vocabularies.UI.v1.SelectionVariant#Open"
                                                }
                                            ],
                                            "showCounts": true
                                        }
                                    }
                                }
                            }


<br>

for example

        SelectionVariant #Open                 : {
            Text          : '{i18n>OpenView}',
            SelectOptions : [{
                $Type        : 'UI.SelectOptionType',
                PropertyName : status_code,
                Ranges       : [{
                    $Type  : 'UI.SelectionRangeType',
                    Option : #LT,
                    Low    : 11,
                    Sign   : #I
                }]
            }]
        }<br>

so there are also some wrongly generated pathes introduced with 1.86.

The quickSelectionVariant also filters out the status_code from filterBar (ByDesing answered from a collegue of you by former request).

Additional Errors are

2 Times
>Log-dbg.js:456 2021-02-01 15:31:10.860850 Missing property requestGroupId on macro metadata Table

the segmented button comes from the manifest.json quickVariantSelection
>assert-dbg.js:34 Assertion failed: ManagedObject.apply: encountered unknown setting 'autoAdjustWidth' for class 'sap.m.SegmentedButton' (value:'undefined')<br>

The issue "Missing property groupId on macro metadata Table" is also on 1.85!

But maybe best would be, if you can use my project and locally test by yoursel.access

Best Regards
Holger

hschaefer123
Participant
0 Kudos

Hi Bernhard,

we just created SAP ticket

76731 / 2021 Fiori Elements v4 issue with CAP app in SCP Launchpad after SAPUI5 1.86.0 update

with attached CAP sources.

Best Regards
Holger

0 Kudos

Hi Holger,

thanks for providing all the information. I was able to run and debug the application locally. I provided the solution within the incident. With that you should be able to work on with 1.86.0

Best regards,

Bernhard

hschaefer123
Participant
0 Kudos

Hi Aviad,
that would be great.

The project is a customer PoC and important for them to decide on cloud usage.

I tried to remove some annotations, but was not able to get CAP/sap.fe v4 app running with new SAPUI5 1.86.

My current cloud launchpad workaround ist to add a mock/sandbox index.html to deployed HTML5 app that is added to SiteManager for opening app in new window. This even works with custom theme applied, hardly set UI5 version to 1.85.2 (launchpad inside launchpad 😉

<script src="https://sapui5.hana.ondemand.com/1.85.2/test-resources/sap/ushell/bootstrap/sandbox.js"></script>
        <script
            src="https://sapui5.hana.ondemand.com/1.85.2/resources/sap-ui-core.js"
            data-sap-ui-libs="sap.m, sap.ushell, sap.fe.templates"
            data-sap-ui-versionedLibCss="true"
            data-sap-ui-theme="custom_theme"            
            data-sap-ui-theme-roots='{"custom_theme" : "/comsapuitheming.runtime/themeroot/v1/UI5"}'    
            data-sap-ui-compatVersion="edge"            
            data-sap-ui-frameOptions="allow"
            data-sap-ui-bindingSyntax="complex"
        ></script>

Otherwise, i see currently no change to deliver the PoC as a working solution to the customer.

Best Regards
Holger

AviadRivlin
Employee
Employee
0 Kudos

I have asked the team to look into this (cc: lior.lavi).