Show TOC

Processing of QueriesLocate this document in the navigation structure

Use

You can use this process to retrieve data from a data provider and prepare it for presentation on the user interface (UI) of Business Context Viewer (BCV). For more information, see BCV Query.

Prerequisites
  • 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:

    • You have opened the side panel. The Overview accordion item of the side panel contains a quick view based on the query you want to process.

    • You have selected a query view based on the considered query from the Query Views accordion item of the side panel.

    • You have selected a dashboard from the Dashboards accordion item of the side panel. The dashboard contains a query view based on the considered query.

    • You have enlarged a quick view of the side panel or of a dashboard. The quick view 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 BCV, or for a quick view of the side panel or of a dashboard. The query view or quick view, 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 BCV. 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 BCV. The query view you have selected as a follow-up query view is based on the considered query.

    • You have tested a query, by choosing Test. For more information, see BCV Query Test.

    For more information, see Query View and Dashboard.

Process
  1. The system provides the ID of the chosen query, as well as specific values of the query input fields.

    You have maintained the values of the query input fields 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 field, the system tries to determine one from the current BCV context key. The system can only process a query if values are known for all query fields marked as Required in the query definition. For more information, see Definition of Query Fields.

    Note

    You can set or modify values of query fields by implementing the Set or modify values of query input fields (FILL_INPUT_FIELDS) method of the BAdI: Change of Query Input (/BCV/QRM_QUERY_INPUT) Business Add-In of the Query Management and Processing (/BCV/QRM) enhancement spot. For more information, see Customizing under Start of the navigation path Cross-Application Components Next navigation step Processes and Tools for Enterprise Applications Next navigation step Business Context Viewer Next navigation step Query Management Next navigation step Business Add-Ins (BAdIs) for Query Management Next navigation step BAdI: Change of Query Input End of the navigation path.

  2. 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.

  3. The system creates a search request.

    Based on the selection criteria of the query definition, the system creates a search request that describes the data that the system searches for. The system substitutes all query fields 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.

  4. The system retrieves the requested data.

    The system passes the search request using the search connector to the respective data provision technology (for example, SAP NetWeaver Business Warehouse). The provider retrieves the requested data from the data provider, collects it in a result table and passes the table back to query processing. For more information, see Search Connector.

    Note

    You can modify the results provided by the data provision technology by implementing the Change the unprocessed result data of a search request (CHANGE_RAW_RESULT) method of BAdI: Processing of Query Results (/BCV/QRM_QUERY_RESULT) Business Add-In of the Query Management and Processing (/BCV/QRM) enhancement spot. For more information, see Customizing under Start of the navigation path Cross-Application Components Next navigation step Processes and Tools for Enterprise Applications Next navigation step Business Context Viewer Next navigation step Query Management Next navigation step Business Add-Ins (BAdIs) for Query Management Next navigation step BAdI: Processing of Query Results End of the navigation path.

  5. The system fills additional fields.

    In this step, the system fills only internal fields marked as Before Grouping in the query definition. For more information, see Definition of Query Fields and Definition of Query Result Fields.

  6. 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 Fields.

  7. The system fills additional fields.

    In contrast to step 5, the system fills only internal fields marked as After Grouping in the query definition. For more information, see Definition of Query Fields and Definition of Query Result Fields.

  8. The system sorts the results.

    For more information, see Definition of Query Result Fields.

  9. 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 Fields.

  10. The system passes the result data to the UI for display.

    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 (/BCV/QRM_QUERY_RESULT) Business Add-In of the Query Management and Processing (/BCV/QRM) enhancement spot. For more information, see Customizing under Start of the navigation path Cross-Application Components Next navigation step Processes and Tools for Enterprise Applications Next navigation step Business Context Viewer Next navigation step Query Management Next navigation step Business Add-Ins (BAdIs) for Query Management Next navigation step BAdI: Processing of Query Results End of the navigation path.

Result

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.