cancel
Showing results for 
Search instead for 
Did you mean: 

Analytical List Page fails with Error: adding element with duplicate id for OData V4 endpoint

gregorw
Active Contributor
0 Kudos

Hello SAP Fiori Elements Community,

I'm doing local development with VS Code and have the SAP Fiori Tools - Extension Pack v1.7.5 installed. With that I've generated the Analytical List Page based on the OData V4 Service of my sap-support-message-reporting project. The app was created to the app/alpv4 subfolder. When I now start the application using

npm start

and then open http://localhost:4004/launchpad-ui5-latest.html#SupportIncident-analyzeV4 I see the following error message in the console:

Error: adding element with duplicate id 
'test.alpv4::MessageHeaderSetList--fe::table::MessageHeaderSet::LineItem::SegmentedButton::TemplateContentView' - Error: Error: adding element with duplicate id
'test.alpv4::MessageHeaderSetList--fe::table::MessageHeaderSet::LineItem::SegmentedButton::TemplateContentView' Error: Error: adding element with duplicate id
'test.alpv4::MessageHeaderSetList--fe::table::MessageHeaderSet::LineItem::SegmentedButton::TemplateContentView' at onDuplicate (Element-dbg.js:218:12) at p.e [as register] (ManagedObjectRegistry-dbg.js:44:5) at ManagedObject-dbg.js:505:11 at p.constructor (ManagedObject-dbg.js:498:4) at p.constructor (Element-dbg.js:200:18) at p.constructor (Control-dbg.js:181:12) at new p (Metadata-dbg.js:454:19) at eval (XMLTemplateProcessor-dbg.js:1644:25) at S (Component-dbg.js:214:14) at E.runAsOwner (Component-dbg.js:712:10)

The ALP using the OData V2 Endpoint at http://localhost:4004/launchpad-ui5-latest.html#SAPIncidentReporting-display works without issues.

I'm using the current SAPUI5 Version:

SAPUI5 Distribution 1.106.0 (built at 2022-09-07T12:41)

Looking forward for your input.

Best Regards
Gregor

CC: stefanie.runde

stefaniehager
Product and Topic Expert
Product and Topic Expert

Hi Gregor,
I've asked our dev team to take a look.
cheers, Stefanie

gregorw
Active Contributor
0 Kudos

Hi steffen.weinstock,

thank you for your AnalyticalListPage PR in the CAP SFLIGHT project. What I see is that you've used the "List Report Object Page V4" Floorplan. Is that currently the only possible workaround? My example was generated using "Analytical List Page V4" Florplan and that results in the error I've described above.

Best Regards
Gregor

maheeth7
Explorer
0 Kudos

Hi Gregor,

Does this repo (https://github.com/gregorwolf/sap-support-message-reporting) already have the ALP configured. If not can you share the ALP repo with us so that we can clone it in our local and test it and figure out the issue.

Let us know if you need any help here.

Thanks and Regards,

Maheeth

gregorw
Active Contributor
0 Kudos

Hi maheeth7 ,

thank you for coming back on this topic. Yes, my repo contains the ALP that I've created via the wizard. Check the folder:

https://github.com/gregorwolf/sap-support-message-reporting/tree/main/app/alpv4

Best Regards
Gregor

0 Kudos

Hi gregor.wolf ,
I'm definitely not an expert on ALP, just trying to find my way around. But according to the Fiori guys the floorplan "Analytical List Page" indeed is only for OData v2. With OData v4 floorplan ""List Report Object Page " should be used.

Best regards
Steffen

gregorw
Active Contributor
0 Kudos

Hi Steffen,

then I would suggest to remove the Data Source "Local CAP Project" from the wizard. A CAP Project does by default serve only OData V4. With the V2 Proxy it can provide OData V2. But then the Service URL needs to be used in the wizard.

Best Regards
Gregor

maheeth7
Explorer
0 Kudos

Hi Gregor,

I noticed that the annotations does not have a default PresentationVariant (which does not have a qualifier). But in the manifest you are using the default PresentationVariant as a primary view.

So can you please add default PV in the annotations or instead use the default chart as primary view in manifest and check if it solves the issue ?

Thanks and Regards,

Maheeth

gregorw
Active Contributor
0 Kudos

Hi Maheeth,

thank you for joining this discussion. As soon as I change my annotations like this:

  PresentationVariant : {Visualizations : [
    '@UI.Chart#StatusTxt',
    '@UI.Chart#PriorityTxt',
    '@UI.Chart#SystemId',
  ], },

The eror for the ALP V4 is gone, but no graphical filters are displayed. But the OData V2 ALP looses it's graphical filters.

Best Regards
Gregor

maheeth7
Explorer
0 Kudos

Hi Gregor,

Are these changes made and pushed to the repo you shared ? If so then i can test it and figure out the issue.

Thanks and Regards,

Maheeth

gregorw
Active Contributor
0 Kudos

You find the change in the branch default-pv

maheeth7
Explorer
0 Kudos

Hi Gregor,

I tried cloning this and i was getting the same duplicate id issue which you were facing earlier. Can you ping me once so that we can see if i am cloning the right repo ?

Thanks and Regards,

Maheeth

gregorw
Active Contributor
0 Kudos

Hi Maheeth,

if you are in the branch default-pv you should be able to start:

http://localhost:4004/launchpad-ui5-latest.html#SupportIncident-analyzeV4

which is the App I've created using the Fiori Tools Wizard using the ALP Template pointing to the CAP OData V4 endpoint at http://localhost:4004/reporting. It works fine for me. Unfortunately the visual filters that I see with the OData V2 version when I don't have a default PresentationVariant are note visible here.

When you access:

http://localhost:4004/launchpad-ui5-latest.html#SAPIncidentReporting-analyzeV4lrop

I get the error message:

[50017] - Invalid data binding

Best Regards
Gregor

gregorw
Active Contributor
0 Kudos

Hi maheeth7, do you have any update on this topic?

maheeth7
Explorer
0 Kudos

Hi Gregor,

Sorry for the delay in response. I have tried to use the default-pv branch and tried loading both http://localhost:4004/launchpad-ui5-latest.html#SupportIncident-analyzeV4 and http://localhost:4004/launchpad-ui5-latest.html#SAPIncidentReporting-analyzeV4lrop

But I am facing an issue here.

screenshot-2022-10-21-at-103059-am.png

Can you please help me out here to reproduce the issue ?

Thanks and Regards,

Maheeth

maheeth7
Explorer

Hi Gregor,

I have noticed that (http://localhost:4004/launchpad-ui5-latest.html#SupportIncident-analyzeV4) is not working because of the default Presentation Variant issue i have mentioned above. The reason why in (http://localhost:4004/launchpad-ui5-latest.html#SAPIncidentReporting-analyzeV4lrop) VisualFilters are not loading is because of the manifest settings. You need to explicitly define the VisualFilters that needs to be displayed in manifest.json.

You can refer to this document for more info:https://help.sap.com/docs/SAPUI5/96880755e4e64fcd96c12694f430fece/33f3d807c10b47d9a8141692d2619dc2.html?state=DRAFT.

In case of any doubt, please reach out to us.

former_member501331
Discoverer
0 Kudos

Hello,

We are using ALP with OData V4 and experiencing the same issues. We do not have visual filters, but we do have main chart and table. We need to use Presentation Variants for both due to some sorting for chart and grouping for table. So, I have few questions:

Is this Fiori Elements ALP OData V4 issue?

Is there any link to an issue for tracking purposes?

What would be the correct workaround for this?

Thanks in advance,

Mykhaylo

maheeth7
Explorer
0 Kudos

Hi Mykhaylo,

Thanks for asking. The previous issue which Gregor mentioned was related to the usage of annotations and manifest.

It would be great if you could share the link to your app so that we can analyze it and figure out the exact issue. Let us know if you need any info or help.

Thanks and Regards,

Maheeth

former_member501331
Discoverer
0 Kudos

Hi Maheeth,

Thanks for response.

Here is what I've found out so far:

When we specify SelectionPresentationVariant of PresentationVarian for Chart part of the ALP we are receiving this duplicate id error. But as soon as we change it to Chart it solves the problem however obviously we are loosing sorting.

Here is the link to the manifest line: https://github.tools.sap/Business-Data-Transformation-Solution/bdts-company-codes-selection-ui/blob/...

Here is the link to the backend SelectionPresentationVariant annotation line: https://github.tools.sap/Business-Data-Transformation-Solution/bdts-core-srv/blob/1dbc3a5dbfa2375ef4...

Kind regards,

Mykhaylo

maheeth7
Explorer

Hi Mykhalo,

Thanks for the analysis. I have tried testing this usecase in our local apps and we noticed that this is a bug from Fiori Elements.

Can you please raise an incident via CA-UI5-FE so that we can track this issue via the incident ? Let me know if you need any help or info.

Thanks and Regards,

Maheth

akuller_q
Participant
0 Kudos

Hello all,

is there an update here in the meantime?

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Hi Gregor,

We see this issue is fixed with SAP UI5 1.110.0 version. Can you please update your SAP UI5 version and let us know your feedback?

Best Regards,

Siva

gregorw
Active Contributor
0 Kudos

Hi Siva,

do you have any information when 1.110.0 will arrive on the https://ui5.sap.com/ CDN?

Best Regards
Gregor

0 Kudos

Hi Gregor,

I think it will be available on 26th Jan 2023.

Best Regards,

Siva