P_AllocCycleForScheduling

DDL: P_ALLOCCYCLEFORSCHEDULING SQL: PALLOCCYCLESCHED Type: view CONSUMPTION Package: ODATA_RUN_ALLOCATION

Allocation Cycle

P_AllocCycleForScheduling is a Consumption CDS View that provides data about "Allocation Cycle" in SAP S/4HANA. It reads from 1 data source (I_AllocationCycle) and exposes 12 fields with key fields AllocationType, AllocationCycle, AllocationCycleStartDate. It has 1 association to related views. Part of development package ODATA_RUN_ALLOCATION.

Data Sources (1)

SourceAliasJoin Type
I_AllocationCycle I_AllocationCycle from

Associations (1)

CardinalityTargetAliasCondition
[0..*] I_AllocationKeyField _Field $projection.AllocationType = _Field.AllocationType and $projection.AllocationCycle = _Field.AllocationCycle and $projection.AllocationCycleStartDate = _Field.AllocationCycleStartDate and _Field.AllocationSetType = '0' and _Field.AllocationCycleSegment = '0000'

Annotations (9)

NameValueLevelField
AbapCatalog.preserveKey true view
AbapCatalog.sqlViewName PALLOCCYCLESCHED view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #MANDATORY view
AccessControl.personalData.blocking #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.dataClass #CUSTOMIZING view
VDM.private true view
VDM.viewType #CONSUMPTION view

Fields (12)

KeyFieldSource TableSource FieldDescription
KEY AllocationType AllocationType
KEY AllocationCycle AllocationCycle
KEY AllocationCycleStartDate AllocationCycleStartDate
AllocationCycleName AllocationCycleName
AllocationCycleNameText _Text AllocationCycleNameText
AllocationPostingType AllocationPostingType
AllocationActualPlanVariant AllocationActualPlanVariant
Ledger Ledger
AllocationCycleCategory
CompanyCode
ControllingArea
AllocationCycleSemanticKey
@AbapCatalog.preserveKey: true
@AbapCatalog.sqlViewName: 'PALLOCCYCLESCHED'
@AbapCatalog.compiler.compareFilter: true

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

@ClientHandling.algorithm: #SESSION_VARIABLE

@ObjectModel.usageType.dataClass: #CUSTOMIZING

@VDM.private: true
@VDM.viewType: #CONSUMPTION

define view P_AllocCycleForScheduling
  as select from I_AllocationCycle         
                                                                    
  association [0..*] to I_AllocationKeyField as _Field on  $projection.AllocationType           = _Field.AllocationType
                                                       and $projection.AllocationCycle          = _Field.AllocationCycle
                                                       and $projection.AllocationCycleStartDate = _Field.AllocationCycleStartDate   
                                                       and _Field.AllocationSetType = '0' 
                                                       and _Field.AllocationCycleSegment = '0000'                                                                                          
{
  key AllocationType,      
  key AllocationCycle,
  key AllocationCycleStartDate,
      AllocationCycleName,         

      _Text.AllocationCycleNameText,
      AllocationPostingType,
      AllocationActualPlanVariant,
      Ledger,
      
//      _CycleCategory.AllocationCycleCategory,

      cast( _Field[1:AllocationFieldName = 'CATEGORY'].AllocationFieldMinimumValue as fcom_category) as AllocationCycleCategory,
      cast( _Field[1:AllocationFieldName = 'RBUKRS'].AllocationFieldMinimumValue as fis_bukrs)       as CompanyCode,
      cast( _Field[1:AllocationFieldName = 'KOKRS'].AllocationFieldMinimumValue as fis_kokrs )       as ControllingArea,
      
      cast( concat_with_space( AllocationCycleName, AllocationCycleStartDate, 1) as ke_kscyc_sdate ) as AllocationCycleSemanticKey
      
}
where AllocationType is not initial
  and AllocationCycle is not initial
  and AllocationCycleStartDate is not initial
  and ( AllocationType = 'ACDOC_CC' 
    or AllocationType  = 'ACDOC_PC'
    or AllocationType  = 'ACDOC_PA')