This enhancement can be used in the context of custom screens. There is no need to modify or add business logic, just UI-Designer magic.
Prerequisites: The business object has to provide a date that can be used for querying (e.g. CreationDateTime).
Expected result:
Step 1: Enhance Query
- Open your query for your advanced list pane
- Add a new data field to the SearchParameters data structure that belongs to your data list
- Select the CreationDateTime element on the right in the section of your bound query
- Add the CreationDateTime to the query-parameter list
- Bind CreationDateTime parameter to the previously created data field
Step 2: Create Default Set
- Right click the query and choose add default set
- Open the newly created default set
- Change the title to a meaningful description (e.g. Quotes of last 5 Days)
- Select the query parameter on the left and click + to add a parameter option on the right
- Set select option to greaterOrEquals (to select all BO-instances that provide a date at or after a certain point of time in the past)
- Click ... to add a transformation (this will ‘create’ the point of time in the past)
Step 3: Create Transformation
- in create transformation window do:
- Select Namespace: http://sap. com/xi/A1S/ReuseFunctions
- Select Transformation: DaysToGlobalDateTime
- Type in the number of days you would like to include (e.g. -31 [minus! 31] for the last 31 days)
Step 4: Add Default Set to List Pane’s Dropdown List
- Click dropdown list bar in designer tab or select the AdvancedListPane: ObjectWorkList in properties tab
- Select DefaultSet Mapping in properties tab
- In the upcoming window do:
- Select the previously created default set
- Click > to move it to the list of bound default sets
The result should look like: