Skip to Content
2
Apr 16, 2020 at 07:00 AM

List Report Object Page table not getting displayed

377 Views

Hi Team,

I am working on a List Report with an Object Page based on CDS annotations. On the object page, I have to show the table but the table is not getting displayed. Below is the CDS code.

@AbapCatalog.sqlViewName: 'ZTASK1VIEW'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_ALLOWED
@EndUserText.label: 'CDS first task'
@VDM.viewType: #CONSUMPTION
@AbapCatalog.preserveKey: true
@UI.headerInfo:{
title: {type: #STANDARD, value: 'ebeln'},
typeName: 'Material',
typeNamePlural: 'Materials',
description: { type: #STANDARD, value: 'ebelp' }
}
@OData.publish: true
define view ZTask1
 as select from ekpo 
as table1
  association [0..1] to ekko as table2 on table1.ebeln = table2.ebeln
  association [0..1] to ZTask1Mat as _Material on table1.matnr = _Material.matnr
{
      @UI.facet: [{id: 'idGeneralInformation', type: #COLLECTION, label: 'General Info', position: 10 },{id: 'idIdentification', type: #IDENTIFICATION_REFERENCE, label: 'Basic Data', parentId: 'idGeneralInformation', position: 10},
                  {id: 'idLineItem', type: #LINEITEM_REFERENCE, label: 'Items', position: 20, targetElement: '_Material'}]

      @UI.identification: [{position: 10 }]
      @UI.lineItem: [{position: 10}]
      @EndUserText.label: 'Purchase Document Number'
  key ebeln,

      @UI.identification: [{position: 20 }]
      @EndUserText.label: 'Purchase Document Item'
      @UI.lineItem: [{position: 20}]
  key ebelp,
      
      @Consumption.valueHelpDefinition: [
                { entity:  { name:    'I_MaterialDescription',
                                   element: 'Material' }
                      }]
      @UI.selectionField: [{position: 10}]
      @EndUserText.label: 'Material'
      @UI.lineItem: [{position: 30}]
      matnr,
      
      @EndUserText.label: 'Company Code'
      @UI.lineItem: [{position: 40}]
      bukrs,

      @Consumption.valueHelpDefinition: [
                { entity:  { name:    'I_PLANTSTDVH',
                                   element: 'PLANT' }
                      }]
      @UI.selectionField: [{position: 20}]
      @EndUserText.label: 'Plant'
      @UI.lineItem: [{position: 50}]
      werks,

      @EndUserText.label: 'Net Price'
      @UI.lineItem: [{position: 60}]
      netpr,

      @Consumption.valueHelpDefinition: [
                      { entity:  { name:    'I_CURRENCYTEXT',
                                         element: 'CURRENCY' }
                            }]
      @UI.selectionField: [{position: 30}]
      @EndUserText.label: 'Currency'
      @UI.lineItem: [{position: 70}]
      table2.waers,


       table2,
      _Material
}
@AbapCatalog.sqlViewName: 'ZTASK1MATVIEW'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #NOT_ALLOWED
@EndUserText.label: 'Task 1 material interface'
@VDM.viewType: #BASIC
define view ZTask1Mat
  as select from mara
{
      @UI.lineItem: [{position: 10 }]
  key matnr,
      @UI.lineItem: [{position: 20 }]
      ersda,
      @UI.lineItem: [{position: 30 }]
      ernam,
      @UI.lineItem: [{position: 40 }]
      laeda,
      aenam,
      vpsta,
      oihmtxgr,
      zzmatnr,
      zzounr
}

Following errors am getting in the console:

1. Assertion failed: Source must contain an annotation object to be merged

2. The target you tried to get "root" does not exist! - EventProvider sap.m.routing.Targets

3. The target you tried to get "ZTask1" does not exist! - EventProvider sap.m.routing.Targets

4. The target you tried to get "ZTask1/to_Material" does not exist! - EventProvider sap.m.routing.Targets

Experts please help me to resolve this issue.

Regards,

Sai Ram Dinesh Pallapotu