Description

This page outlines the error which is faced when running an ABAP analysis :

SQL Error: ERROR: duplicate key value violates unique constraint "pk_objdsc".
SQL Error: DETAIL: Key (idobj, inftyp, infsubtyp, blkno, ordnum)=(28420, 37000, 103, 59214, 0) already exists

The error only occurs on the 2nd analysis.  The first analysis will succeed and will properly create the objects, but any subsequent analyses will fail.
You can have ABAP data in two formats – one an older format and another which is a newer format. We normally have seen one or the other in the code.
This is due to a bug in the ABAP analyzer when a classpool contains at same times following files:
#XEIT#CLNRO===================CL.abap
and
#XEIT#CLNRO===================CCDEF.abap
or: #XEIT#CLNRO===================CCIMP.abap
or: #XEIT#CLNRO===================CCMAC.abap

When *===CL.abap file is present, the other following files are not parsed, but the bookmark file is created, and results in inconsistency between tables..

Observed in CAST AIP
Release
Yes/No
8.3.x(tick) x < 2
8.2.x(tick) x < 8
8.1.x(tick) 
8.0.x(tick) 
7.3.x(tick)
Observed on RDBMS
RDBMS
Yes/No
Oracle Server(tick)
Microsoft SQL Server(tick)
CSS3(tick)
CSS2(tick)
CSS1(error)
Step by Step Scenario
  1. Run ABAP analysis
  2. Analysis fails with the mentioned error- duplicate key value violates unique constraint pk-objdsc
Action Plan
  1. Rename file <CAST_AIP_FOLDER>\configuration\Languages\abap\ASTABAPMetaModel.xml in ASTABAPMetaModel.xml.old
  2. Replace it with the one attached ASTABAPMetaModel.xml
  3. Open ServMan, and on each schema of your triplet, right-click : "Load MetaModel ->From disk"
  4. Open Cast-MS and relaunch analysis
Impact on Analysis Results and Dashboard

Analysis will fail with mentioned error.

Notes/comments

Ticket #10233