ABAP Forum
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

CDS View Annotations for List Object Page,

govind_parmar
Participant
0 Likes
1,055

Hi Experts,

I have a List-Object page where  I need to display Harvey Pie Chart . The requirement is to show Spent Amt  from Total Amt. 

When  Total Amt is put in the maximum valve , the CDS view give an error :Annotation value 'TotalAmt' must be of type 'DecimalFloat': I was not able to resolve the issue even if it was coming from standard SAP amount field and referencing to Currency. 

To troubleshoot and simplify , I took two fields in CDS i.e. ActualValue and MaxValue  and default as abap.dec( 15, 2 ) to 25.00  and 100.00 respectively. The CDS view starting complaining about the maximum valve: 'MaxValue'   is not DecimalFloat at @Former Member.dataPoint ; then I gave maximum valve: 100.00 as shown in screenshot below. 

But the UI is showing as "No data" and console is giving error as  "The DataPoint annotation is empty. Please check it! ".

I tried using google/SDN/AI tool to analyze the issue but no luck so far.  Can someone please direct me to right direction. 

PS : I was able to get the progress bar with the same field but was not to get the Harvey Pie Chart. which is my requirement. 

  • CDCS View with @Former Member.chart

govind_parmar_4-1776825255617.png

  • CDCS View with @Former Member.dataPoint 

govind_parmar_0-1776824916857.png

  • Object List Page showing "No Data "  :

govind_parmar_1-1776824977267.png

  • Console Error : 

govind_parmar_2-1776824992110.png

SAP Fiori for SAP S/4HANA 

2 REPLIES 2
Read only

AbhishekSharma
Active Contributor
0 Likes
968

Hi @govind_parmar I have some of the suggestions which may work for you.

1- Change @UI.Chart as below - I see an extra round opening bracket in @UI.Chart annotation remove that because I do not see closing round bracket.

AbhishekSharma_0-1776884707413.png

2- @UI annotation for LineItem as below 

AbhishekSharma_1-1776884926808.png

https://youtu.be/zvBuuBpY564?si=Tpm5Ksx7zjjjbuSh 

Hope this helps-

-Thanks

 

Let's learn together as much as possible...
CodeInMins
Read only

govind_parmar
Participant
0 Likes
966

Hi Abhishek,

The '(' opening bracket was a typo while taking screenshot and is not in the code.  Morever I was looking for a #PIE chart , your example works in percentage . My requirement is ActualValue and MaxValue directly assigned to Chart. 

Do you what changes I would to make for the  #PIE chart to appear. ? 

Thanks

Govind