
In Sales, SAP has delivered some analytical reports based on item query CDS views. Such reports contain item-level dimensions and measurements. For example, the Sales Quotations - Flexible Analysis app uses the C_SalesQuotationItemQry (Sales Quotation Item - Query) view.
To add a custom item field to such a standard item-level report, you can simply use the Custom Fields app to enable it for the corresponding analytics data source. For example, the data source can be the item query C_SalesQuotationItemQry. Then the custom item field appears in the Sales Quotations - Flexible Analysis app. However, if you want to use a custom header field for item-level analysis, you should create a custom query and more steps are involved. This blog describes how to achieve this, that is, to add a custom header field to a custom item query (taking sales quotation as an example).
Overview
Step | App Used | Step Description | Remarks |
1 | Custom Fields | Create a custom header field and enable it for an analytics data source. | The data source is a basic interface view, for example, I_Sales Quotation. |
2 | Custom CDS Views | Create a custom cube (based on the standard item cube) and add the custom field to your cube. | The standard cube is I_SalesQuotationItemCube_2, which is the underlying view of the standard query (C_SalesQuotationItemQry). |
3 | Custom Analytical Queries | Create a custom query based on the custom cube. | Compared with the standard query, your custom query additionally contains the custom header field. |
Note: To know how to find the queries used by analytical apps and how to find the underlying cube of a query, see question 3 in FAQs about Apps and CDS Views in Sales Analytics. For more information, see CDS Views for Sales and search for app descriptions on SAP Help Portal.
Procedure
1. Create a custom header field via the Custom Fields app using the business context Sales: Sales Document.
2. On the Analytics tab, enable your header custom field (YY1_SD_H_TEXT) to the data source I_SALESQUOTATION.
3. In the Custom CDS Views app, create a custom cube based on I_SalesQuotationItemCube_2 (Sales Quotation Item - Cube), which is the underlying view of C_SalesQuotationItemQry (Sales Quotation Item - Query). Add your custom field (YY1_SD_H_TEXT) to the custom cube.
Note: This field resides under association _SalesQuotation.
4. In the Custom Analytical Queries app, create a custom query based on your custom cube. For more information, see How to create analytical query from custom CDS View.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
23 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 |