cancel
Showing results for 
Search instead for 
Did you mean: 

Fiori list report - Adding datepicker value help

04-23-2021 10:42 AM
10297 views 5 comments
0 Likes
SAP Managed Tags
Subscribe

Hi all,

Is there a way to add a datepicker with time period value help like in the attached picture to a fiori list report based on a CDS view?
If so is there any documentation on how to do it?

Thanks,
Birgir

0 Likes

Accepted Solutions (0)

Answers (3)

Answers (3)

MioYasutake
SAP Champion
SAP Champion

Hi bsnorrason,

1. In your CDS View, add the following annotation to the date field.

@Consumption.filter.selectionType: #INTERVAL
PostingDate,

2. In manifest.json, add below settings as described in this document.

            "filterSettings": {
                "dateSettings":{
                    "useDateRange": true 
                }
            }
catano
Active Participant

Hi bsnorrason ,

In the SAPUI5 application the range can be added by:

  • set useDateRangeType="true" in SmartFilterBar, or
  • set conditionType="sap.ui.comp.config.condition.DateRangeType" in ControlConfiguration

Examples:
Code: Smart Filter Bar with useDateRangeType setting set to true - Samples - Demo Kit - SAPUI5 SDK
Code: Smart Filter Bar with controlConfiguration conditionType DateRangeType - Samples - Demo Kit - ...

BR,

Peter

pfefferf
Active Contributor

To my knowledge there is not CDS annotation which allows to define that. In a Fiori Elements app you can define it like described here.

Former Member
0 Likes

Hmm this seems like it should work but it doesn't.
The metadata is like this:

<Property sap:label="Date" Name="workDate" sap:display-format="Date" Type="Edm.DateTime" sap:filter-restriction="interval" Precision="0"/>

And the manifest:

"pages": {
	"ListReport|ZCATSDB_VIEW": {
		"entitySet": "ZCATSDB_VIEW",
		"component": {
			"name": "sap.suite.ui.generic.template.ListReport",
			"list": true,
			"settings": {
				"filterSettings": {
					"dateSettings": {
						"useDateRange": true
					}
				},
				"tableType": "AnalyticalTable",
				"smartVariantManagement": true,
				"condensedTableLayout": true
			}
		}
	}
}


I'll give it a try in a fresh project and see if it works there.