Technical Articles
More flexible aging analysis key date: create a custom analytical query using CDS view and publish it as an app
In this blog post, I would like to show you how to adjust the key date for aging analysis (for accounts payable) with more flexibility. I will use an example to demonstrate the process.
Business Context
List of predefined key date
Procedure
Create Custom Analytical Query
In the app Custom Analytical Queries, choose Create to create a new query, or choose Copy to copy a query from an existing one. Fill in the query name, select a data source, and choose OK.
Create a query
On the General tab, specify a label for the query and choose Next.
Specify a label
In Field Selection, select the checkbox after the the available fields and the selected fields will start showing on the Free section on the right side.
Select from available fields
Update Display of the Fields
Go to the Display tab, select a row, and make the following configurations for it.
- choose if you want to display it or not
- specify which axis it should show up
- specify if sorting is enabled or not
- Choose Up and Down to adjust the sequence of the fields
Update display
Update Filter
Go to the Filter tab, select a row for a specific field and set filter values for it.
To enable a date picker for the Key Date field, I specify user input values for the field, and define the relative date TODAY as the start value. The lookup entity is defined by default for the user input value.
Update filter for Key Date
After saving the query, I can have a preview of it. This is how it looks like. I can see that a date picker which starts from Today (the day I create this query) is enabled for the Key Date field.
Preview of the query
Publish the Query as an App
Go to the View Browser app and find the query (YY1_DEMO) I just created.
Find the query
Go to the details page, and create application for the query.
Create application
The query has now got an application ID. Copy the ID for later use.
Application ID
Add the App into Business Catalog
Go to the Custom Catalog Extensions app and search for the application by the ID. Add the application into the business catalog in which you would like to see it and publish it.
Add app into business catalog and publish
It would be shown as an app on the Fiori Launchpad when you use the corresponding user to log on the launchpad.
App in launchpad
You can now use this custom app in which a date picker is enabled for the Key Date field to make more flexible aging analysis.
Conclusion
From the steps introduced in this article, I hope you can learn how to create a custom aging analysis app using an analytical query if you want to use a flexible date picker for key date when you are making aging analysis. For more information about the process, see the following documentation on SAP Help Portal. You can also follow my profile to be updated on more interesting content about accounts payable and accounts receivable.
Custom Analytical Queries | SAP Help Portal
Aging Analysis | SAP Help Portal
Thanks for sharing the nice article! Can you please add the name of query or data source since it is not very clear to see in the screenshot?
Hi Bob,
Sure. I created demo query YY1_DEMO (Aging Analysis) referring to the data source YY1_AGINGREPORTEXAMPLE2. You can also find other data sources when you do the first step (Create Custom Analytical Query) following the procedure.
The data source is 'I_APJRNLENTRITEMAGINGGRID', when you click the pic, it will zoom in.
Data Source
很好的分享文章,收获多多。
Glad that you like it:)