Skip to Content
0
Nov 30, 2022 at 02:08 PM

Error reading CDC annotations: mapping field does not exist [Analytics] - TM tables

270 Views Last edit Dec 02, 2022 at 06:47 AM 2 rev

Hi,

Just wanted to check how to remove the error shown below? Not sure if it is related to the tableElement fields used since they are not the same.

1. How will the CDS view knows that parent_key and db_key should be matched if they are not the same?

2. Is the field possible to be renamed? Let's say I will change the db_key to "parent_key".

3. Do you know any standard CDS view which I can use for my scenario? I am about to join the five (5) TM tables below.

/SCMTMS/D_TORDRF
/SCMTMS/D_TORROT
/SCMTMS/D_TORITE
/SCMTMS/D_TORSTP
/SCMTMS/D_TOREXE 

image.png

Here is the full code.

@EndUserText.label: 'TEST_TM Fields'
@VDM.viewType: #CONSUMPTION
@AbapCatalog.compiler.compareFilter: true
@Analytics: {
    dataCategory: #FACT,
    dataExtraction: {
        enabled: true,
        delta.changeDataCapture: {
            mapping:[
                {
                    table: '/SCMTMS/D_TORDRF', role: #MAIN,
                    viewElement: ['NodeID'],
                    tableElement: ['parent_key'] },
                {
                    table: '/SCMTMS/D_TORROT', role: #LEFT_OUTER_TO_ONE_JOIN,
                    viewElement: ['NodeID'],
                    tableElement: ['db_key'] }
            ]
        }
    }
 }
@AccessControl.authorizationCheck:#CHECK
@AbapCatalog.sqlViewName: 'YV_TEST'
@AbapCatalog.preserveKey: true

define view Y_TEST
as select from /scmtms/d_tordrf as tordrf
left outer join /scmtms/d_torrot as torrot
on tordrf.parent_key = torrot.db_key

{
key tordrf.db_key as tordrf_db_key,
key torrot.db_key as torrot_db_key,
tordrf.btd_id,
tordrf.parent_key
}

Thanks a lot.

Loed

Attachments

image.png (123.5 kB)