Sunday, January 7, 2018

More than one query with the same technical name?

In BW systems it is not a rare case when there can be multiple BW objects with same technical name. This is especially related to BEx Queries (plus other query components like (REP, CKF, RKF, STR, VAR and SOB can be similarly effected too). Normally one would expect that the technical name is unique identifier of the query. However it is not the case. The technical name (COMPID in table RSZCOMPDIR and others) is not unique similarly as a description of the BEx query is not unique. It just represents language-independent name for the query element. This is in contrary to other objects in SAP systems where the technical name is really unique.

Technically it is not a problem to have duplicate technical names because other field (COMPUID) is used to uniquely distinguish between them. But it may cause problems while using tools like BEx where user needs to specify the query name in OPEN/SAVE dialogs. Only one query will be processed in these tools – whichever is found first in the database.

There can be several cases which may lead to situation causing having more than one query with the same technical name. Some of them can be:

Transports: When one query is imported from system A to system B. Technical name is the same in both systems. Later the query is deleted in the system A and recreated with same name. In case deletion of the query wasn’t transported to system B there will be 2 queries with the same technical name in the B system once recreated query gets transported to system B.

Several dev/test systems used to import objects to one prod systems: of query with the same technical mane is created in both source systems and they are imported to target system the query in there will have the same technical name.
It is very advisable to prevent into running issues like this. However when they occurs there are some possibilities how to deal with this situation.

1. Situation first needs to be analyzed e.g. by ABAP report ANALYZE_RSZ_TABLES.

2. Query can be copied to completely new name with help of t-code RSZC and then re-transported. Query with old tech name shall be deleted (e.g. t-code RSZDELETE).

3. If query (or it parts) needs to be preserved a ABAP report RENAME_DUPLICATE_ELEMENTS can be used to rename the query and/or its components. 

4. While transporting the query a parameter of RSADMIN table called QDEF_NO_DUPLICATE can be defined in order to prevent a situation when query component with the same technical name and different UID that already exit in the target systems is written.

More information:
907025 - Duplicated technical names (COMPID) for query components
1551586 - Duplicated technical names of query components
5541024 - Duplicate query names in the BW system (BW 3.x related Note)
1765828 - Unique technical names for SAP Business Content queries
2061998 - Deletion of a query during transport does not delete an entry in RSRREPDIR

No comments: