Symptom
- Number of records in the local table is not the same as the source CDS view.
- Number of records in the local table is much less than the source CDS view.
Environment
- SAP S/4HANA as the Provider/Source
- SAP Datasphere as the Subscriber/Target
Cause
The source CDS view is not defined correctly. Even key fields are defined, there're still multiple records for one group of key combination. For example:
Key material as MATNR,
type as MTART,
SE16N -> input CDS name -> display -> 5 records:
| MATNR | MTART |
| 0001 | A |
| 0001 | B |
| 0001 | C |
| 0002 | A |
| 0002 | B |
However in Datasphere Local table, since MATNR is the key field, for every same MATNR, only the last record is kept. So there're only 2 records in the Local table as below:
| MATNR | MTART |
| 0001 | C |
| 0002 | B |
Resolution
Modify the CDS view to make sure there's only 1 record for each value of the key field.
Keywords
replication flows, CDS view, duplicate numbers, local table, record mismatch, DB02, SQL statement, key field, duplication , KBA , DS-DI-RF , Replication Flow Runtime , Problem
SAP Knowledge Base Article - Public