Processing of Queries
You can use this process to retrieve data from a data source and prepare it for presentation on the user interface (UI) of Product-Centric View (PCV). For more information, see Query.
You have defined a query or use one predefined by SAP. For more information, see Definition of Queries.
You have defined a query view or use one predefined by SAP. For more information, see Definition of Query Views.
You have initiated the processing of a query by one of the following activities on the UI:
You have opened the side panel in an application of SAP Product Lifecycle Management (PLM). The Previews
tab of the side panel contains a query view based on the considered query.
You have switched to another object in the object navigator while the side panel is opened. The Previews
tab of the side panel contains a query view based on the considered query.
You have selected a query view based on the considered query from the Query Views
tab of the side panel.
You have selected a dashboard from the Dashboards
tab of the side panel. The dashboard contains a query view based on the considered query.
You have enlarged a preview of the side panel or of a dashboard. The preview refers to a query view based on the considered query.
You have used the Refresh
function for the query view displayed in the view area of PCV or for a preview of the side panel or of a dashboard. The query view or preview, respectively, is based on the considered query.
You have used the Change Query View Data
function for the query view displayed in the view area of PCV. The query view is based on the considered query.
You have performed a drill-down on a data point of a table or chart displayed in the view area of PCV. The query view you have selected as a follow-up query view is based on the considered query.
For more information, see User Interface.
The UI provides the ID of the chosen query as well as specific values of the query variables.
You have maintained the values of the query variables either in the query view definition (see Definition
of Query Views) or you have entered them by using the Change Query View Data
function of the UI. If you have not provided a value for a query variable, the system tries to determine one from the current PCV context. The system can only process a query if values
are known for all variables marked as Required
in the query definition. For more information, see Definition of Query Variables.
Note
You can set or modify values of query variables by implementing the Set or modify values of query variables
(FILL_VARIABLES
) method of the BAdI: Change of Query Input
(/PLMPCV/QRM_QUERY_INPUT
)
Business Add-In of the PCV Query Management and Processing
(/PLMPCV/QRM
) enhancement spot. For more information, see Customizing under .
The system reads the query definition from the database.
After reading the query definition, the system checks it for consistency. The system can only process consistent queries. Furthermore, the system checks whether you are authorized to process the query.
The system creates a search request.
Based on the selection criteria of the query definition, the system creates a search request that describes for which data the system searches. The system substitutes all query variables contained in the selection criteria by their values. The system computes and substitutes all formulas contained in the selection criteria by their results. For more information, see Definition of Query Selection Criteria.
The system retrieves the requested data.
The system passes the search request using the search connector to the respective data source provider (for example, SAP NetWeaver Business Intelligence). The provider retrieves the requested data from the data source, collects it in a result table and passes the table back to query processing. For more information, see Search Integration.
Note
You can modify the results provided by the data source provider by implementing the Change the unprocessed result data of a search request
(CHANGE_RAW_RESULT
) method of BAdI: Processing of Query Results
(/PLMPCV/QRM_QUERY_RESULT
)
Business Add-In of the PCV Query Management and Processing
(/PLMPCV/QRM
) enhancement spot. For more information, see Customizing under .
The system fills additional attributes.
In this step, the system fills only internal attributes marked as Before Grouping
in the query definition. For more information, see Definition
of Query Attributes and Definition of Query Result Attributes.
The system groups the result data according to the group definition and performs the specified aggregation functions within each group.
For more information, see Definition of Query Result Attributes.
Caution
If you define aggregation functions for quantities or currencies, the system considers only their numerical values, not their units. PCV does not perform unit conversions. That is, you have to make sure that the data source provides the affected quantities and currencies, respectively, in the same unit.
The system fills additional attributes.
In contrast to step 5, the system fills only internal attributes marked as After Grouping
in the query definition. For more information, see Definition
of Query Attributes and Definition of Query Result Attributes.
The system sorts the results.
For more information, see Definition of Query Result Attributes.
Caution
If you sort by quantities or currencies, the system considers only their numerical values, not their units. PCV does not perform unit conversions. That is, you have to make sure that the data source provides the affected quantities and currencies, respectively, in the same unit.
The system limits the result size.
If you have defined a row limit of N in the query definition, the system deletes all but the first N result data records. For more information, see Definition of Query Result Attributes.
The system passes the result data to the UI for display.
For more information, see User Interface.
Note
You can modify the results passed to the UI by implementing the Change the processed result data of a search request
(CHANGE_PROC_RESULT
) method of the BAdI: Processing of Query Results
(/PLMPCV/QRM_QUERY_RESULT
)
Business Add-In of the PCV Query Management and Processing
(/PLMPCV/QRM
) enhancement spot. For more information, see Customizing under .
The result of the process is result data prepared for presentation on the UI using the query view for which the query was processed. For more information, see Query View.