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

Remove UOM from value from query result set from FIORI app

vikas1_badhan
Explorer
0 Likes
885

Hi All,

Is their a way to remove unit of measure from my CDS based FIORI list report app.

Business want to see only values.

I saw some posts on NODIM, but have no idea how to apply it on CDS on these columns. Is their any annotation available to handle this scenario?

Thanks In Advance!

Vikas

Accepted Solutions (0)

Answers (1)

Answers (1)

catalinfeidi
Participant
0 Likes

You can hide/remove it via local annotations in annotation.xml file.

 

            <Annotations Target="cds_zsd_schd_line.ZC_SCHD_LINEType/CorrectedQtyInOrderQtyUnit">
                <Annotation Term="Measures.Unit" String= " "/>
            </Annotations>

 

by providing Annotation Term "Measures.Unit" String = "" on field itself.

Make sure you provide also the reference namespace in the annotation file:

 

    <edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Measures.V1.xml">
        <edmx:Include Namespace="Org.OData.Measures.V1" Alias="Measures"/>
    </edmx:Reference>

 

 Complete annotation.xml file:

 

<edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" Version="4.0">
    <edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Measures.V1.xml">
        <edmx:Include Namespace="Org.OData.Measures.V1" Alias="Measures"/>
    </edmx:Reference>
    <edmx:Reference Uri="https://sap.github.io/odata-vocabularies/vocabularies/UI.xml">
        <edmx:Include Namespace="com.sap.vocabularies.UI.v1" Alias="UI"/>
    </edmx:Reference>
    <edmx:Reference Uri="/sap/opu/odata/sap/ZUI_SCHD_LINE/$metadata">
        <edmx:Include Namespace="cds_zsd_schd_line"/>
    </edmx:Reference>
    <edmx:DataServices>
        <Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="local">
            <Annotations Target="cds_zsd_schd_line.ZC_SCHD_LINEType/CorrectedQtyInOrderQtyUnit">
                <Annotation Term="Measures.Unit" String= " "/>
            </Annotations>
        </Schema>
    </edmx:DataServices>
</edmx:Edmx>