Skip to Content
0
Jul 30, 2021 at 12:56 AM

Delta Extraction of CDC enabled ABAP CDS doesn't work

1290 Views

Dear Guru's,

I have issues in CDC enabled delta extraction using both standard ABAP CDS Extractor (C_SALESDOCUMENTITEMDEX ) and a custom extractor which i created similar to the standard one, but with lesser joins. below is the code of my extractor for reference.

We are on S4HANA 1909 and BWoH 7.5 .

Following are the steps followed for extraction.

1) Right Click on ODP-ABAP CDS source system and create new datasource.

2) Search both standard and custom extractors ( CSDSLSDOCITMDX_F & ZOFDSDNBSO).

3) Create the dataflow between DS and ADSO.

4) Execute Init DTP.

5) Change quantity for an item in Sales Document in source system

6) Execute Delta DTP.

All goes as expected till step 5. Step 6 is not fetching the changed record. Any thoughts/expertise on this would be very helpful.

Below is the code for custom extractor for reference.

@AbapCatalog.sqlViewName: 'ZOFDSDNBSO'
@AbapCatalog.compiler.compareFilter: true
@EndUserText.label: 'OFD Non BOM related SO'
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.sizeCategory: #XL
@VDM.viewType: #CONSUMPTION
@Analytics: { 
    dataCategory: #FACT,
    dataExtraction: {
        enabled: true,
        delta.changeDataCapture: {
            mapping:[
                {
                    table: 'vbap', role: #MAIN,
                    viewElement: ['SalesDoc', 'SalesItem'],
                    tableElement: ['vbeln', 'posnr']
                },
                {
                    table: 'vbak', role: #LEFT_OUTER_TO_ONE_JOIN,
                    viewElement: ['SalesDoc'],
                    tableElement: ['vbeln']
                }
                
             ]
        }
    }
    
  }        


define view ZCDS_DS_SD_NON_BOM_SO as 
select from vbap as A
left outer to one join vbak as B on A.vbeln = B.vbeln
{
   key  A.vbeln as SalesDoc,
   key  A.posnr as SalesItem,
        B.erdat as CreatedOn,
        B.audat as DocDate ,
        B.aedat as ChangedOn,
        B.vbtyp as SalesDocCatg,
        A.pstyv as SalesItemCatg,
        B.auart as SalesDocType,
        B.bukrs_vf as CompCode,
        A.matnr as Material,
        A.werks as Plant,
        A.lgort as StorLoc,
        A.charg as Batch,
        A.uepos as HigherItem,
        A.smeng as QtyinBUoM,
        A.meins as BUoM,
        A.kwmeng as OrderQty,
        A.vrkme as OrderUnit,
        A.netwr as NetPrice,
        A.waerk as Currency
}