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.
Request clarification before answering.
@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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
duplicate, please ignore
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Do you get this error when you activate the CDS view, or when you read from it via ODP?
br
Roland
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.