cancel
Showing results for 
Search instead for 
Did you mean: 

Why does data extraction annotation fail only on table PRHI?

07-03-2026 8:24 AM
_ed7ae6 Discoverer
269 views 5 comments
0 Likes
SAP Managed Tags
Subscribe

Hi,

I'm trying to enable data extraction on a CDS view based on SAP standard table PRHI.
Other standard tables (e.g. EKKO) work fine, but PRHI always fails.

I tried both full load and delta (CDC) configurations:

[Full load]
@analytics.dataExtraction.enabled: true

[Delta with CDC]
@analytics: {
dataExtraction: {
enabled: true,
delta.changeDataCapture: {
mapping:[ {
table : 'PRHI', role: #MAIN,
viewElement : ['posnr'],
tableElement : ['posnr']
}]
}
}
}

Both result in the same errors:
- An exception was raised. [Analytics]
- CDS view inconsistent [Analytics]
- Data extraction for CDS entity not possible [Analytics]

Is there a known restriction on PRHI for data extraction?
Or is there something special about this table?

Thank you.

0 Likes

Accepted Solutions (0)

Answers (4)

Answers (4)

_ed7ae6
Discoverer
0 Likes

@roland_szajko 
Hi,

Thank you for the suggestion.
I added @Analytics.dataCategory: #FACT but the same errors still occur.

- An exception was raised. [Analytics]
- CDS view inconsistent [Analytics]
- Data extraction for CDS entity not possible [Analytics]

Note: When I create a CDS view based on a table that does NOT contain
reserved keyword fields, data extraction works fine.
The issue seems to be specific to table PRHI which contains fields
named LEFT and RIGHT (CDS reserved keywords).

Do you have any other suggestions?

Thank you.

_ed7ae6
Discoverer
0 Likes

@roland_szajko 

Hi Roland,

Sorry for the late reply.

The error occurs when activating the CDS view.

I tried the following 3 patterns, all of which failed at activation:

[Pattern 1] select from SE11 database view with CDC mapping to physical table PRHI

@Analytics: {
dataExtraction: {
enabled: true,
delta.changeDataCapture: {
mapping:[ {
table : 'PRHI', role: #MAIN,
viewElement : ['posnr'],
tableElement : ['posnr']
}]
}
}
}
define view ZCDS_TEST as select from z_base_v
{
key posnr,
psphi,
z_up,
z_down,
z_left,
z_right
}

Background: z_base_v is an SE11 database view that renames reserved keyword
fields (LEFT, RIGHT) from PRHI to Z_LEFT, Z_RIGHT.

[Pattern 2] select from PRHI directly with table alias

@Analytics: {
dataExtraction: {
enabled: true,
delta.changeDataCapture: {
mapping:[ {
table : 'PRHI', role: #MAIN,
viewElement : ['posnr'],
tableElement : ['posnr']
}]
}
}
}
define view ZCDS_TEST as select from prhi as A
{
key A.posnr,
A.psphi,
A.up as z_up,
A.down as z_down,
A.left as z_left, <- Unexpected keyword "left" error
A.right as z_right
}

[Pattern 3] select from PRHI with single quotes around reserved keywords

We also tried wrapping with double quotes, but ADT automatically removes
the double quotes upon saving, resulting in an error.

@Analytics: {
dataExtraction: {
enabled: true,
delta.changeDataCapture: {
mapping:[ {
table : 'PRHI', role: #MAIN,
viewElement : ['posnr'],
tableElement : ['posnr']
}]
}
}
}
define view ZCDS_TEST as select from prhi as A
{
key A.posnr,
A.psphi,
A.up as z_up,
A.down as z_down,
A.'left' as z_left, <- Unexpected word "'left'" error
A.'right' as z_right
}

The root issue seems to be that PRHI has fields named LEFT and RIGHT
which are reserved keywords in CDS, making it impossible to reference
them directly in a CDS view.

Do you have any suggestions on how to handle this?

Thank you.

roland_szajko
Product and Topic Expert
Product and Topic Expert
_ed7ae6
Discoverer
0 Likes

duplicate, please ignore

roland_szajko
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi

Do you get this error when you activate the CDS view, or when you read from it via ODP?

br

Roland