CDS view missing key fields after data load in analytics reporting, causing incomplete dashboard metrics

After migrating our reporting data to SAP S/4HANA 2020, several custom CDS views show incomplete results. Key fields that should appear in the output are missing, even though the underlying database tables contain the data.

We’ve verified the CDS view definitions look correct and the ETL process completed successfully with no errors. When we query the base tables directly using SE16, all fields are present. But when we access the same data through CDS views in analytical reports, certain key fields return null or don’t appear at all.

The issue affects primarily financial dimension fields like cost center, profit center, and GL account segments. We suspect either the CDS view definition needs updating or there’s a data dictionary mismatch after migration. Has anyone encountered CDS views not reflecting all fields post-migration?

Your ETL mapping might be writing to wrong fields. We had similar issue where source field names matched target field names but belonged to different data elements. ETL tool showed successful load but data went to technically different fields. Run a field-by-field comparison between source CSV/file and actual SAP table content using transaction SE16. Don’t trust ETL logs alone - verify actual data placement in database tables.

Missing key fields in CDS views after migration is a three-part problem requiring systematic diagnosis across definition, mapping, and data dictionary layers.

1. CDS View Definition Review:

First, verify the CDS view syntax matches S/4HANA 2020 requirements. Check for deprecated annotations or syntax:

@AbapCatalog.sqlViewName: 'ZFIGL_ACTUAL'
@Analytics.dataCategory: #CUBE
define view Z_FI_GL_ACTUALS as select from acdoca
  association [0..1] to cepc as _CostCenter
    on $projection.CostCenter = _CostCenter.prctr
{
  key rbukrs as CompanyCode,
  key gjahr as FiscalYear,
  key belnr as DocumentNumber,
  prctr as CostCenter,
  _CostCenter
}

Common definition issues post-migration:

  • Association paths broken if target views renamed
  • Missing KEY annotations cause fields to be non-selectable
  • Currency/quantity field pairs incomplete (amount without currency)
  • Client field handling differs in S/4HANA (MANDT often implicit)

Activate the view in Eclipse ADT and check for warnings. Sometimes views activate successfully but warnings indicate field mapping issues.

2. ETL Mapping Validation:

Your ETL process may have logical success but semantic failures. Validate field-level mapping:

Create validation SQL to compare source vs target:

SELECT COUNT(*) as missing_costcenter
FROM acdoca
WHERE gjahr = '2024'
  AND prctr IS NULL
  AND ( SELECT COUNT(*) FROM source_table
        WHERE fiscal_year = '2024'
        AND cost_center IS NOT NULL ) > 0

This identifies records where source had cost center data but target doesn’t. Key validation points:

  • Field length truncation (source 15 chars, target 10 chars)
  • Leading zeros stripped during conversion
  • Data type conversion issues (CHAR to NUMC)
  • Special characters causing load failures
  • Case sensitivity changes

For financial dimensions specifically, check conversion exits. Cost centers might need conversion exit ALPHA (leading zeros). If ETL doesn’t apply conversion exits, fields appear empty in CDS views even though data exists in wrong format.

3. Data Dictionary Review:

Data dictionary mismatches are the most common cause. After migration, field definitions must align exactly:

Check field technical details:

  • Transaction SE11 → Table ACDOCA → Field PRCTR
  • Note data element: PRCTR (Profit Center)
  • Check element: CE_PRCTR
  • Domain: PRCTR

Now check your CDS view field:

  • If CDS view uses different data element for same field, mapping breaks
  • If domain definitions changed between source and target, values may not convert

Run this diagnostic query:

SELECT tabname, fieldname, rollname, domname
FROM dd03l
WHERE tabname = 'ACDOCA'
  AND fieldname IN ('PRCTR', 'KOSTL', 'RACCT')

Compare results against your CDS view field definitions. Mismatches indicate why fields appear empty.

Complete Diagnostic Process:

Step 1 - Verify base table data:

SELECT COUNT(*), COUNT(prctr), COUNT(kostl)
FROM acdoca
WHERE gjahr = '2024'

If counts differ, data is incomplete in base table (ETL issue).

Step 2 - Test CDS view directly:

SELECT COUNT(*), COUNT(CostCenter), COUNT(ProfitCenter)
FROM Z_FI_GL_ACTUALS
WHERE FiscalYear = '2024'

If counts differ from base table, CDS view definition issue.

Step 3 - Check association integrity:

If CDS view uses associations, test them individually. Missing master data in dimension tables causes nulls in CDS output even when base table has values.

Common Fix Scenarios:

Scenario A - Missing KEY annotation: Add @ObjectModel.foreignKey.association to properly expose association fields.

Scenario B - Conversion exit missing: ETL must apply ALPHA conversion for fields like cost center:

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
  EXPORTING input = source_value
  IMPORTING output = target_value.

Scenario C - Data element mismatch: Recreate CDS view using exact data elements from base table. Don’t rely on similar-looking elements.

Scenario D - Incomplete dimension data: Load missing master data (cost centers, profit centers) before expecting CDS views to show complete results.

Prevention for Future Migrations:

  • Create field-level validation reports before migration
  • Document all data elements and domains used in CDS views
  • Test CDS views in target system before data migration
  • Implement automated data quality checks post-migration
  • Maintain data element mapping documentation

For your specific case with financial dimensions, I suspect either conversion exit issues (leading zeros) or incomplete cost center master data migration. Run the diagnostic queries above to pinpoint the exact cause.

This sounds like a data element mismatch issue. During migration, if source and target data elements don’t match exactly, CDS views can fail to map fields correctly. Check transaction SE11 for the data elements used in your CDS view fields. Compare them against the actual table field definitions. If data element names changed between systems, the CDS view won’t find the fields even though they exist in the table.

I’ve seen this when CDS views have cached metadata that doesn’t match current table structure. Try activating the CDS view again in Eclipse ADT or transaction SE80. Sometimes you need to delete the CDS view completely and recreate it to force metadata refresh. Also check if any annotations like @ObjectModel.foreignKey reference incorrect association paths after migration.