Managing Query Objects

Objective

After completing this lesson, you will be able to Manage query objects.

Query Objects Overview and Management

The following figures provide an overview of the objects, queries, and reusable query components that you have learned about in this course. For queries and reusable components, you can use the following methods to create, find, and edit them, to get their where-used lists, and to copy and delete them.

Here you can see the meaning of numerous icons:

Many functions are also provided by the context menu:

In the SAP BW Repository tree, the variables are listed according to the variable type and whether they refer to a characteristic or are unassigned.

Variable maintenance functions can be accessed from the context menu, as shown in the following two figures.

The first figure shows Characteristic Value variables, Hierarchy variables, and Hierarchy Node variables. These variable types always refer to a characteristic, whereby Formula variables and Text variables can refer to a characteristic, for example, in case of the processing type Replacement Path.

The second figure shows Formula variables and Text variables without a reference to a characteristic, for example, in case of the processing type Manual Input / Default Value.

Copying Queries Between InfoProviders Using Linked Components Function

In an SAP BW/4HANA system, you may have multiple InfoProviders that are similar. Using the Linked Components function in the BW Query Designer in SAP HANA Studio, queries can be copied from one InfoProvider to another similar InfoProvider. For the target query, you can decide if it should stay linked to the source query or if it should become a standalone query.

A linked component can be automatically synchronized whenever changes are made to the corresponding source component.

Example scenario: You have two similar InfoProviders: IP_A and IP_B. You have created the query Q_A for IP_A. You now want to create the query Q_B for InfoProvider IP_B. You want this query to be very similar to query Q_A and to be automatically adjusted whenever changes are made to query Q_A.

To do this, you use the link component concept: You create the linked target query Q_B for source query Q_A. This is more than just a copy as the system also retains the mapping information. This mapping information makes it possible to synchronize the queries.

As linking two components only makes sense if the source component and target component correspond with one another, thus, if the InfoProvider is the same or at least similar. Changes to the target component are only possible if these meet the conditions for linking.

There's a validation check if copying is possible.

For queries, the system supports mapping and delivers proposals for the following query components: InfoObjects, hierarchies, restricted and calculated key figures, and variables. The mapping proposals can be modified.

Note that certain query settings cannot be mapped. Filter entries or currency translations/unit conversions cannot be adjusted.

If this makes it impossible to synchronize the query, you can create it as a standalone copy and make the adjustments there.

Note

The Linked Components function in the BW Query Designer in SAP HANA Studio is an enhancement to the SAP GUI transaction RSZC(Copy Queries and Query Components between InfoProviders) that can also be used.

Copying Query Objects Between InfoProviders Using Transaction RSZC

Transaction RSZC provides a copy function that enables you to copy queries and query components between InfoProviders.

Copying Queries and Query Components Between InfoProviders

  1. Choose transaction RSZC to open the Copying Query Components dialog.

  2. Specify a source InfoProvider to be used by the query that you want to copy.

  3. Specify a target InfoProvider to be used by the query that you want to create.

  4. Specify which queries/query components should be copied.

  5. Choose Transfer Selections. The InfoObject Mapping dialog opens.

  6. Select the InfoObjects that you want to transfer, and choose Process Selected Objects.

  7. In the Rename Components dialog, rename the objects that have been transferred. A Log Display confirms that the query has been successfully transferred to the selected InfoProvider.

  8. Choose Continue to end the process.

The copied queries and sub-objects have a modified technical name that is a combination of the original object’s technical name and the number of added elements - for example, technicalname_2.

Query Object Deletion Using Transaction RSZDELETE

You can delete queries and reusable query components from the SAPGUI. Using the transaction, RSZDELETE, you can delete multiple objects in one step.

Deleting a Query Object

  1. Choose the transaction, RSZDELETE, to open the Deletion of queries with selection conditions dialog.

  2. Select the type of object that you want to delete: query, filter, structure, restricted key figure, calculated key figure, or variable.

  3. Restrict your search by InfoProvider area, Technical Name, Last Changed by, Last Changed on/at, Element UID, Query Version, Transport Connection, or Last Used to show results that match your selection criteria. Note that you can also search for dependent objects.

  4. Choose the Execute icon.

  5. In the Selection of Query Elements to be Deleted dialog, select the objects to be deleted.

  6. Choose the Execute icon again to delete the selected objects.

  7. To delete the selected components from the database, choose Yes.

Query Object Translation

In the Translation area of the Data Warehousing Workbench, you can translate short and long texts for SAP BW/4HANA objects, including query objects.

When a query is selected for translation, the worklist automatically includes the query objects for translation. The worklist also includes any connected objects such as workbooks.

Note

You can find more information about query object translation in https://help.sap.com/. Search for Translating Texts for BW Objects.

Document Store

In a compatible front end tool you can document report cells. This can be helpful to the report consumer who is able to read notes that have been written about the cell value. For example, a low sales figure might include an explanation about how bad weather affected sales for a particular month.

The text is stored in documents on the back-end server. The TLOGO object .Document Store is used for this purpose.

A document is identified by the name of the key figure and the filter for this key figure, which affects the cell in the query. The text length of a document is unlimited. You can assign a document to a hierarchy node or a subtotal. You can also assign a document to restricted and calculated key figures. To make it possible to add comments for calculated key figures, you have to assign a technical ID. Make sure that these are unique.

Documents can be reused in other queries if the filter selection is identical. A document is therefore visible in all queries that contain the same cell. You can even find documents from the drilldown in the selection and the opposite, as long as their common part is identical.

In the Document Store, you define which InfoProviders the documents relate to in the system. Queries that are based on these InfoProviders can work with comments from this document storage.

You can use the query property, Document Support, to specify whether documents can be created for the query.

If you set the value Yes for the query property, Document Support, you can use the Default Document Application ID field to define the document in which the documents will be stored. You can select from all document stores to which the InfoProvider that the query is based on is assigned. This covers the following InfoProviders:

  • DataStore Object (Advanced)
  • Composite Provider

If you do not select a document store, and keep the value [] instead, the user has to assign a document store at runtime.

Comments for a data cell can also be created in SAP Analysis for Microsoft Office, but these comments are not stored in the Document Store. They are stored within the Analysis workbook.

Release Query for SAP Datasphere

If you are running SAP Datasphere, and if you have defined analytic queries in SAP BW/4HANA, you can generate business entities in SAP Datasphere based on these queries. This allows you to use existing models and metadata in SAP BW/4HANA for modeling in SAP Datasphere without having to build them again manually.

To be able to do this, you first have to call transaction RSDWC_QUERY and release the queries in for use in SAP Datasphere.

As SAP BW/4HANA variables do not have a direct equivalent in SAP Datasphere, any variables must be replaced with values.

Log in to track your progress & complete quizzes