cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with annotation SemanticObjectMappingType

Kishore
Participant
0 Kudos

Hello,

I am building a Fiori Elements List Report. I have two columns (Customer and Payer) and I am using the DataFieldWithIntentBasedNavigation to navigate to factsheet Customer-displayFactSheet

I am using the mapping property with record type "SemanticObjectMappingType" of this annotation to map my field "Payer" to the semantic object property "Customer". But the navigation is always redirecting with Customer value instead of Payer value.

I have followed as mentioned in the link.

Here is my annotations. I used both the ways but its not working as expected.

Any pointers is of much helpful.

Option 1: Adding the Collection at the field level

<Record Type="UI.DataFieldWithIntentBasedNavigation">
    <PropertyValue Property="SemanticObject" String="Customer" />
    <PropertyValue Property="Value" Path="Customer" />
    <PropertyValue Property="Action" String="displayFactSheet" />
</Record>
<Record Type="UI.DataFieldWithIntentBasedNavigation">
       <PropertyValue Property="SemanticObject" String="Customer" />
       <PropertyValue Property="Value" Path="Payer" />
       <PropertyValue Property="Action" String="displayFactSheet" />
       <PropertyValue Property="Mapping">
           <Collection>
               <Record Type="Common.SemanticObjectMappingType">
       		     <PropertyValue Property="LocalProperty" PropertyPath="Payer" />
                     <PropertyValue Property="SemanticObjectProperty" String="Customer" />
 	       </Record>
    	   </Collection>
       </PropertyValue>
</Record>

Option: 2

<Annotations Target="ZSalesOrderManage/SoldToParty">
    <Annotation Term="Common.SemanticObjectMapping">
        <Collection>
            <Record Type="Common.SemanticObjectMappingType">
                <PropertyValue Property="LocalProperty" PropertyPath="Payer"/>
                <PropertyValue Property="SemanticObjectProperty" String="Customer"/>
            </Record>
        </Collection>
    </Annotation>
</Annotations>


<Record Type="UI.DataFieldWithIntentBasedNavigation">
       <PropertyValue Property="SemanticObject" String="Customer" />
       <PropertyValue Property="Value" Path="Payer" />
       <PropertyValue Property="Action" String="displayFactSheet" />
       <PropertyValue Property="Mapping">
           <Path>/Payer/@Common.SemanticObjectMappingType</Path>
       </PropertyValue>
</Record

Accepted Solutions (1)

Accepted Solutions (1)

Kishore
Participant

Added the annotation at the property level

<Annotations Target="ZSRV.SalesOrderHeader/Payer">
                <Annotation Term="Common.Text" Path="PayerName" />
                <Annotation Term="Common.SemanticObject" String="Customer" />
                <Annotation Term="Common.SemanticObjectMapping">
                    <Collection>
                        <Record Type="Common.SemanticObjectMappingType">
                            <PropertyValue Property="LocalProperty" PropertyPath="Payer" />
                            <PropertyValue Property="SemanticObjectProperty" String="Customer" />
                        </Record>
                    </Collection>
                </Annotation>
            </Annotations>


Answers (1)

Answers (1)

former_member803052
Discoverer
0 Kudos

Hi Kishore,

I have added both the below code to my annotation file. I want to map a hidden field Cust09 to customer field in the other app. Can you pls let me know how you fixed this. The below logic is not working for me.

<Record Type="UI.DataFieldForIntentBasedNavigation">

<PropertyValue Property="SemanticObject" String="ZNAV_SEM_VBAK_LIST1"/>

<PropertyValue Property="Value" Path="Cust09" />

<PropertyValue Property="Action" String="display"/>

<PropertyValue Property="Mapping">

<Path>/Cust09/@Common.SemanticObjectMappingType</Path>

</PropertyValue>

<PropertyValue Property="RequiresContext" Bool="false"/>

</Record>

<Annotations Target="ZCDSV_TMP_C_VBAK_CUST_CDS.ZCDSV_TMP_C_VBAK_CUSTType/netValueTotal">

<Annotation Term="Common.SemanticObject" String="ZNAV_SEM_VBAK_LIST1"/>

<Annotation Term="Common.SemanticObjectMapping">

<Collection>

<Record Type="Common.SemanticObjectMappingType">

<PropertyValue Property="LocalProperty" PropertyPath="Cust09"/>

<PropertyValue Property="SemanticObjectProperty" String="customer"/>

</Record>

</Collection>

</Annotation>

</Annotations>