on 05-28-2020 8:59 AM
Hi,
I'm trying to use the new semantic date range feature with SAP FE but I can't get it to work. I suppose the issue is that I'm using CAP with the odata v2 proxy and my Date is converted to DateTime?
schema.cds:
entity Requests : managed {
approvalDate : Date;
}
metadata.xml:
<Property Name="approvalDate" Type="Edm.DateTime" sap:display-format="Date"/>
manifest.json:
"sap.ui.generic.app": {
"_version": "1.3.0",
"settings": {
"flexibleColumnLayout": {
"defaultTwoColumnLayoutType": "TwoColumnsBeginExpanded",
"defaultThreeColumnLayoutType": "ThreeColumnsEndExpanded"
},
"forceGlobalRefresh": false,
"objectPageHeaderType": "Dynamic",
"showDraftToggle": false
},
"pages": {
"ListReport|Requests": {
"entitySet": "Requests",
"component": {
"name": "sap.suite.ui.generic.template.ListReport",
"list": true,
"settings": {
"condensedTableLayout": true,
"smartVariantManagement": true,
"enableTableFilterInPageVariant": true
},
"filterSettings": {
"dateSettings": {
"useDateRange": true
}
}
},
"pages": {
"ObjectPage|Requests": {
"entitySet": "Requests",
"component": {
"name": "sap.suite.ui.generic.template.ObjectPage"
}
}
}
}
}
}
Cheers,
Pierre
The Filter restriction for the property should be "interval" inorder for the property to be considered as a date range.
eg:
<Property Name="approvalDate" Type="Edm.DateTime" sap:display-format="Date" sap:filter-restriction="interval"/>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Reshma,
Thanks but I don't know how to produce this annotation using CAP. I'll try to find a way to do it.
EDIT: I just found a way to do it ->
approvalDate @sap.filter.restriction: 'interval'
Cheers,
Pierre
How can semantic date range filter be enabled on Analytical List Page floorplan? The SAPUI5 documentation does not provide a way to do this.
Regards.
Abhishek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pierre,
Can you maybe share a screenshot of how the approvalDate filter looks like after the change?
Thanks,
Reshma
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pierre,
Can you please modify your changes to the below code snippet ?
"sap.ui.generic.app": {
"_version": "1.3.0",
"settings": {
"flexibleColumnLayout": {
"defaultTwoColumnLayoutType": "TwoColumnsBeginExpanded",
"defaultThreeColumnLayoutType": "ThreeColumnsEndExpanded"
},
"forceGlobalRefresh": false,
"objectPageHeaderType": "Dynamic",
"showDraftToggle": false
},
"pages": {
"ListReport|Requests": {
"entitySet": "Requests",
"component": {
"name": "sap.suite.ui.generic.template.ListReport",
"list": true,
"settings": {
"condensedTableLayout": true,
"smartVariantManagement": true,
"enableTableFilterInPageVariant": true,
"filterSettings": {
"dateSettings": {
"useDateRange": true
}
}
}
},
"pages": {
"ObjectPage|Requests": {
"entitySet": "Requests",
"component": {
"name": "sap.suite.ui.generic.template.ObjectPage"
}
}
}
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please add the "filterSettings" object under the "settings" object, and give a try.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.