cancel
Showing results for 
Search instead for 
Did you mean: 

Bullet chart isn't working with the CDS annotation.

0 Kudos

Hi Experts,

I'm working on the UI CDS annotation and I want to use the bullet chart in the Table lineitem. I could add the Bullet chart control in the lineitem but it shows no Data.

Please help me where I'm missing in the annotation. Below is my annotations for the bullet chart.

Response on UI is as below

Regards,

Monika Ramdas

Accepted Solutions (0)

Answers (1)

Answers (1)

hussain_p
Participant
0 Kudos
@AbapCatalog.sqlViewName: 'ZI_MROV'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'ZI_MaterialReOrder'
@OData.publish: true
@Metadata.allowExtensions: true
@UI.chart: [{ 
              chartType:         #BULLET ,
              measures:          ['UnresforDisplay'],
              measureAttributes: [{ 
                    measure:     'UnresforDisplay' , 
                    role:        #AXIS_1 , 
                    asDataPoint: true 
                    }]
              }]
              
define view ZI_MaterialReOrder1
  as select from marc
  association [0..1] to I_MaterialStock      as _MaterialPlantStock  
            on  $projection.Material = _MaterialPlantStock.Material and 
                $projection.Plant    = _MaterialPlantStock.Plant
{
 @UI.lineItem: [ { position: 10 }]     
key marc.werks                           as Plant,
 @UI.lineItem: [ { position: 20 }] 
key marc.matnr                           as Material,
 @UI.lineItem: [ { position: 30 }] 
marc.minbe                               as ReOrderPoint,
@UI:{ lineItem: [{ position: 100 , 
                   type: #AS_CHART, 
                   label: 'Stock Level'   }]  
    }
@UI.dataPoint: { title: 'Unrestricted Stock' ,
                   targetValueElement: 'ReOrderPoint' ,
                   minimumValue: 0 ,
                   maximumValue: 2500 ,
                   criticalityCalculation: { 
                        improvementDirection:  #MAXIMIZE ,
                        deviationRangeLowValueElement: 'ReOrderPoint' ,
                        toleranceRangeLowValueElement: 'WarningThresHold'
                      }
                  }
_MaterialPlantStock.MatlWrhsStkQtyInMatlBaseUnit      as UnresforDisplay,     
cast( marc.minbe as abap.fltp) * 1.5     as WarningThresHold
}
where marc.minbe  > 0
and _MaterialPlantStock.MatlWrhsStkQtyInMatlBaseUnit > 0


try this and changes as below screen