Skip to Content
0

List Report - Filter from Object page

Feb 24 at 08:35 PM

116

avatar image

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

10 |10000 characters needed characters left characters exceeded

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/38baf2fc3a8e4ed887b29de738296fa9.html

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

0
* Please Login or Register to Answer, Follow or Comment.

3 Answers

avatar image
Former Member Feb 24 at 10:02 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded
Joseph BERTHE Feb 26 at 02:35 PM
0

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

Show 1 Share
10 |10000 characters needed characters left characters exceeded

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

capture.jpg (28.1 kB)
0
Bruno Lucattelli
Feb 28 at 10:05 PM
0

Hello Tanveer Shaikh,

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

Share
10 |10000 characters needed characters left characters exceeded