cancel
Showing results for 
Search instead for 
Did you mean: 

List Report - Filter from Object page

former_member289890
Participant
0 Kudos

Gurus,

If we have list report and object page, is it possible to show the fields from object page’s associated/navigation entity type as selection fields on the list report page ?

I see the navigation option but seems doesn’t work. Any insight will help !

Thanks,

Tanveer

Jocelyn_Dart
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Tanveer

The property path has to be selected using the dropdown to make sure you are selecting a valid entity set of the OData Service. If you have created the entity set in the usual way using an association in a CDS View it would be something like to_Asg.

And yes Joseph Berthe is as always correct, it needs to be marked as a filterable field in the OData Service, e.g. using annotation @Search.searchable in the CDS View.

In future please always let us know which SAP NetWeaver version you are using.

https://help.sap.com/viewer/cc0c305d2fab47bd808adcad3ca7ee9d/7.5.9/en-US/38baf2fc3a8e4ed887b29de7382...

If you are handcoding your OData Service then you'll need to look at this website

https://wiki.scn.sap.com/wiki/display/EmTech/SAP+Annotations+for+OData+Version+2.0

Rgds

Jocelyn

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member186734
Active Participant
0 Kudos

Hello shaikhtanveer,

Thank you for your post. It seems that you've chosen the wrong tag for your question which decreases its chances to be answered. In the future, please submit your question with the right tag.

You can learn more about tags at https://www.sap.com/community/about/using-tags.html and browse all existing tags here: https://www.sap.com/community/topic.html

For general information and tips about asking questions in the community, please visit this page:http://www.sap.com/community/about/questions-and-answers.html

I've removed the wrong tags for this question for now. Please post according to the guidelines provided above. In case you have any additional questions regarding the SAP Community, please reach out to scnmoderators (at ) sap (dot) com.

Thank you for your understanding.

Bruno Lucattelli
SAP Community Moderator

Joseph_BERTHE
Active Contributor
0 Kudos

Hello,

Let's image a scenario like SalesOrders. To be able to do this kind of search, you have to create an navigation from Item (as main entity) to Salesorder with the rigth cardinality.

You should do something like this

	<Annotation Term="UI.SelectionFields">
					<Collection>
						<PropertyPath>Auart</PropertyPath>
						<PropertyPath >to_SOItems/ShortText</PropertyPath>
					</Collection>
				</Annotation>

Do not forget to set your properties as Filterable in the metadata.

Regards,

Joseph

former_member289890
Participant
0 Kudos

Hi Joseph,

Thanks for taking time to write a response.

I tried doing the same, not sure what am I missing. MATERIAL___T is at sales order item. And list report list page is based off of "header" entity type with association/navigation to "item" entity type for object page.

I am trying to get selection field for MATERIAL___T on list report page.

Here is my metadata with association/navigation -

<EntityType Name="headerType">
<Key>
<PropertyRef Name="DOC_NUMBER"/>
</Key>
<Property Name="CRM_SOLDTO" 
<Property Name="CRM_SOLDTO___T"
<NavigationProperty Name="ItemRef" Relationship="XS_PROJECT.SALESORDER_LIST.ToItemAssctnType" FromRole="headerPrincipal" ToRole="itemDependent"/>
</EntityType>
<EntityType Name="itemType">
<Key>
<PropertyRef Name="CRM_NUMINT"/>
<PropertyRef Name="DOC_NUMBER"/>
</Key>
<Property Name="CRM_NUMINT" 
<Property Name="DOC_NUMBER" 
<Property Name="MATERIAL___T" Type="Edm.String" MaxLength="40" sap:label="Product Desription"/>
</EntityType>
<Association Name="ToItemAssctnType">
<End Type="XS_PROJECT.SALESORDER_LIST.headerType" Role="headerPrincipal" Multiplicity="1"/>
<End Type="XS_PROJECT.SALESORDER_LIST.itemType" Role="itemDependent" Multiplicity="*"/>
</Association>
<EntityContainer Name="SALESORDER_LIST" m:IsDefaultEntityContainer="true">
<EntitySet Name="header" EntityType="XS_PROJECT.SALESORDER_LIST.headerType"/>
<EntitySet Name="item" EntityType="XS_PROJECT.SALESORDER_LIST.itemType"/>
<AssociationSet Name="ToItemAssctn" Association="XS_PROJECT.SALESORDER_LIST.ToItemAssctnType">
<End Role="headerPrincipal" EntitySet="header"/>
<End Role="itemDependent" EntitySet="item"/>

and Here is my annotation -

	<Annotation Term="UI.SelectionFields">
					<Collection>
						<PropertyPath>DATE</PropertyPath>
						<PropertyPath>CRM_SOLDTO___T</PropertyPath>
						<PropertyPath>DOC_NUMBER</PropertyPath>
						<PropertyPath >ItemRef/MATERIAL___T</PropertyPath>
					</Collection>
				</Annotation>

but result is not as expected. Selection for Material does not show up.

Thanks,

Tanveer

abdulbasha_shaik
Active Participant
0 Kudos

Hi Tanveer,

Annotate the require field in List Report consumption view with UI Annotations.

it should be like

@UI.selectionField

Corresponding Object page association.field name.

--

Thanks

Abdul Basha Shaik