P_AllocationSegmentCalc

DDL: P_ALLOCATIONSEGMENTCALC SQL: PALOSEGMENTCALC Type: view CONSUMPTION

P_AllocationSegmentCalc is a Consumption CDS View in SAP S/4HANA. It reads from 1 data source (I_AllocationSegmentTP) and exposes 4 fields with key fields AllocationType, AllocationCycle, AllocationCycleStartDate, AllocationCycleSegment.

Data Sources (1)

SourceAliasJoin Type
I_AllocationSegmentTP I_AllocationSegmentTP from

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName PALOSEGMENTCALC view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
AccessControl.personalData.blocking #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.dataClass #CUSTOMIZING view
ObjectModel.usageType.serviceQuality #A view
ObjectModel.usageType.sizeCategory #M view
VDM.viewType #CONSUMPTION view
VDM.private true view

Fields (4)

KeyFieldSource TableSource FieldDescription
KEY AllocationType AllocationType
KEY AllocationCycle AllocationCycle
KEY AllocationCycleStartDate AllocationCycleStartDate
KEY AllocationCycleSegment AllocationCycleSegment
@AbapCatalog.sqlViewName: 'PALOSEGMENTCALC'
@AbapCatalog.compiler.compareFilter: true
//@EndUserText.label: 'Allocation Segment Calculated Fields'

@AccessControl.authorizationCheck: #NOT_REQUIRED
@AccessControl.personalData.blocking: #NOT_REQUIRED

@ClientHandling.algorithm: #SESSION_VARIABLE

@ObjectModel.usageType.dataClass: #CUSTOMIZING
@ObjectModel.usageType.serviceQuality: #A
@ObjectModel.usageType.sizeCategory: #M

@VDM.viewType: #CONSUMPTION
@VDM.private: true
define view P_AllocationSegmentCalc as 
//select from I_AllocationSegment

select from I_AllocationSegmentTP  
{
  //I_AllocationSegment 

  //key DatabaseTable,

  key AllocationType, 
  key AllocationCycle, 
  key AllocationCycleStartDate, 
  key AllocationCycleSegment,  
  cast(case         
        when AllocationSegmentIsLocked = 'X'      
          then 'L'
        else   
          'A'
       end as fco_allocation_status) as AllocationStatus,
  case when AllocationSegmentIsLocked = 'X'
        then 1 //red

        else 3 //green

      end as CriticalityCode        
}