cancel
Showing results for 
Search instead for 
Did you mean: 

Analytical Table not showing criticality

davidgbarbero
Participant
2,352

Hello all,

I am developing an application where I am using an Analyitical smart table. This table is annotated locally and now I want to add a criticality status to a field depending on a condition.

The cds view has no OData.publish annotation and it is used as data reference in the SEGW OData service.

My criticality field in the analytical cds view looks like this:

@DefaultAggregation: #SUM
manual_correction,
@DefaultAggregation: #SUM
summe,
case when summe > 100 then 1 else 3 end as criticality_1,
case when manual_correction < 100 then 3 else 1 end as criticality_2,

The annotations for those criticality values are used in the local annotation file as shown here:

This leads to the following result:

Summe shows the criticality state perfectly because there is a dataField with the value criticality_2 added to the lineItem. On the other hand, Manuelle Korrektur doesn't show any criticality state because there is no dataField with criticality_1 added to the lineItem (if I add it, it works as expected, like in the case of Summe field).

In both DataFields I have added the criticality bound with the path to the property. If I check the UI5 inspector, the DataField for Manuelle Korrektur shows that it has a property bound but with no value:

But for the Summe DataField, the property comes with a value:

If I check the lineItem model Information, I can see that no value is retrieved for criticality_1...

The funny/annoying thing is that if I switch to a TableType --> "Table", then everything works as expected... as shown below:

This makes no sense to me...

Therefore, my questions are:

How can I use this criticality field that I created in my analytical cds view inside my analytical smart table without having to add it as a dataField to the lineItem?

I don't want it to be shown, I just want it to be retrieved and applied as expected...

Is this a bug from the analytical table? Why does it work with Table and not with AnnalyticalTable (both smartTable)?

Thank you so much for your help.

View Entire Topic
christopherneub
Explorer

Hey David,

This is one of the most infuriating Bugs I have experienced, especially working with grouping and aggregations, and that the behavior differs so much between table types. Thank you for your post highlighting this problem, it helped with my search for the error.

Long story short, the analytical Table seems to be the smartest (aggregations, grouping) but at the same time the dumbest (text associations, criticality) Table. What helped was setting the "RequestAtLeast" Property to the Fields you want to semantically load (text associations, criticality) in the annotations file. Seems like what the Table doesn't know, he won't show, at least in this regard.

                <Annotation Term="UI.PresentationVariant">
                    <Record Type="UI.PresentationVariantType">
                        <PropertyValue Property="RequestAtLeast">
                            <Collection>
                                <PropertyPath>CriticalityField</PropertyPath>
                                <PropertyPath>TextAssociationField</PropertyPath>
                            </Collection>
                        </PropertyValue>
                    </Record>
                </Annotation>

Hope this helps with your problem, it certainly helped mine.

Best Regards,

Christopher

former_member765920
Participant
0 Kudos

Hi,

Can you please provide a code snippet example of your solution.

Thanks,

Priyanka

christopherneub
Explorer

I already provided the code snippet. Check your annotation file. There, in your entity, you should be able to expose your criticality fields through "RequestAtLeast".

BR

former_member765920
Participant
0 Kudos

Hi Christopher,

Thanks for responding. I added the Annotation Criticality @Lineitem along with 2 fields as well.

Also exposed the criticality field via "RequestAtLeast" via presentation variant.

I can see the color @line item level but not in not at individual field level.

Attaching the snippet from Bindings in UI inspector for the field. As you can see the format is None.

Thanks,
Priyanka

christopherneub
Explorer
0 Kudos

Hi Priyanka,

What do you mean by seeing the color at lineitem level but not at individual level? Mind sharing a screenshot of your annotations/application?

BR,

Christopher

former_member765920
Participant
0 Kudos

Hi Christopher,

Below is snapshot of my app with ui inspector. I tried adding Criticality at line item as well as at Column Pallet Id. But it is only showing at the start of the line but not highlighting Column text.

Also few snapshots from annotation file:

Thanks,

Priyanka

mantri_sagar
Explorer
0 Kudos

Hi All,


I too have same issue even adding annotation "RequestedAtLeast" doesn't solve problem. As a workaround I had to use Criticality as default grouping or add criticality column in table. "RequestedAtLeast" annotation adds respective annotation in metadata still when GET request is triggered column for criticality is not fetched.

As Criticality is technical field, its not desirable to present this field to user using grouping or as a column.

Is there any other way to solve this issue?

lusine.stepanyan marcel.waechter Any clues ?

Thank You !!

@(UI.PresentationVariant #PostingItems: {
    $Type                : 'UI.PresentationVariantType',
    Total                : [AmountInTransactionCurrency],
    Visualizations       : ['@UI.LineItem#PostingItems', ],
    RequestAtLeast       : [
        CriticalityItem,
        hasErrorItem
    ],
    InitialExpansionLevel: 1,
    GroupBy              : [CriticalityItem],
    TotalBy              : [Currency],
    IncludeGrandTotal    : true,
})
BartvdKamp
Explorer
0 Kudos
Thanks Chistopher, had same issue when using aggregations in a grid table and adding RequestAtLeast works for me. Funny thing is that the grid table without aggegrations worked, but it broke when adding SUM aggegrations.
Juan_M_Vidal
Discoverer
0 Kudos
Hi Experts.
Juan_M_Vidal
Discoverer
0 Kudos

Hi Experts,

I've tried all the possible solutions mentioned here. I've tried adding the "request at least" fields, adding the grouping. Also tried changing the manifest for grid table type, or table type. No criticality comes into the UI .

This is how my CDS entity looks like

Juan_M_Vidal_0-1728331251645.png

This is how my annotations file looks like

Juan_M_Vidal_1-1728331316007.png

I even check the UI inspector, and the bindings are correct, they are coming with the correct values, so can anyone point me in the right direction to get the criticality? 

Thanks in advance, kind regards.