P_UniAllocTagCycleAssignment

DDL: P_UNIALLOCTAGCYCLEASSIGNMENT SQL: PUNIALLOCYCASGN Type: view COMPOSITE Package: ODATA_ALLOCATION_TAG_V2

Assign tag to cycle and segment

P_UniAllocTagCycleAssignment is a Composite CDS View that provides data about "Assign tag to cycle and segment" in SAP S/4HANA. It reads from 1 data source (I_AllocationCycle) and exposes 13 fields with key fields AllocationType, AllocationCycle, AllocationCycleStartDate, AllocationCycleSegment. Part of development package ODATA_ALLOCATION_TAG_V2.

Data Sources (1)

SourceAliasJoin Type
I_AllocationCycle _Cycle from

Annotations (12)

NameValueLevelField
ClientHandling.algorithm #SESSION_VARIABLE view
AbapCatalog.sqlViewName PUNIALLOCYCASGN view
Metadata.ignorePropagatedAnnotations true view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
AbapCatalog.preserveKey true view
AccessControl.personalData.blocking #NOT_REQUIRED view
VDM.private true view
VDM.viewType #COMPOSITE view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #S view
ObjectModel.usageType.dataClass #MIXED view

Fields (13)

KeyFieldSource TableSource FieldDescription
KEY AllocationType I_AllocationCycle AllocationType
KEY AllocationCycle I_AllocationCycle AllocationCycle
KEY AllocationCycleStartDate I_AllocationCycle AllocationCycleStartDate
KEY AllocationCycleSegment
AllocationTagID _AllocTagAssign AllocationTagID
AllocationCycleEndDate AllocationCycleEndDate
AllocationFrequency AllocationFrequency
AllocationCreateDate I_AllocationCycle AllocationCreateDate
CreatedByUser CreatedByUser
LastChangeDate I_AllocationCycle LastChangeDate
LastChangedByUser LastChangedByUser
AllocationPostingType
AllocationActualPlanVariant AllocationActualPlanVariant
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog.sqlViewName: 'PUNIALLOCYCASGN'
@Metadata.ignorePropagatedAnnotations: true
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@AbapCatalog.preserveKey:true
@AccessControl.personalData.blocking: #NOT_REQUIRED
@VDM.private: true
@VDM.viewType: #COMPOSITE
@ObjectModel: {
   usageType.serviceQuality: #C,
   usageType.sizeCategory: #S,
   usageType.dataClass: #MIXED
}
define view P_UniAllocTagCycleAssignment
//  with parameters

//    P_AllocationTagID :fco_tag_id


  as select from            I_AllocationCycle as _Cycle

    left outer to many join P_AllocTagObjectAssignment as _AllocTagAssign 
      on  _Cycle.AllocationType                    = _AllocTagAssign.AllocationType
        and _Cycle.AllocationCycle                 = _AllocTagAssign.AllocationCycle
        and _Cycle.AllocationCycleStartDate        = _AllocTagAssign.AllocationCycleStartDate
        and _AllocTagAssign.AllocationCycleSegment = '0000'
{

  key _Cycle.AllocationType,

  key _Cycle.AllocationCycle,

  key _Cycle.AllocationCycleStartDate,

//      @UI.hidden: true

  key cast( 0000 as fco_segment_name ) as AllocationCycleSegment,

      _AllocTagAssign.AllocationTagID,

      case
        when AllocationTagID is null
          then cast (('U') as fco_alloc_tag_assignment)
        else
          cast (('A') as fco_alloc_tag_assignment)
      end                                                                    as AllocTagAssignmentStatus,

      AllocationCycleEndDate,

      AllocationFrequency,
      _Cycle.AllocationCreateDate, // missing GFN

      //      @UI.lineItem: [ { type: #AS_CONTACT, label: 'Created By', value: '_CreatedByUserContactCard' } ]

      CreatedByUser,
      //      _CreatedByUserContactCard.FullName                                                                               as CreatedByUserName,

      _Cycle.LastChangeDate,

      //      @UI.lineItem: [ { type: #AS_CONTACT, label: 'Changed By', value: '_LastChangeUserContactCard', position: 100, importance: #HIGH } ]


      LastChangedByUser,

      cast(AllocationPostingType as fco_alloc_posting_type  preserving type) as AllocationPostingType,

      AllocationActualPlanVariant
}
where
       _Cycle.AllocationType           is not initial
  and  _Cycle.AllocationCycle          is not initial
  and  _Cycle.AllocationCycleStartDate is not initial
  and(
       _Cycle.AllocationType           = 'ACDOC_CC'
    or _Cycle.AllocationType           = 'ACDOC_PC'
    or _Cycle.AllocationType           = 'ACDOC_PA'
  )
//  and(

//       _AllocTagAssign.AllocationTagID = $parameters.P_AllocationTagID

//    or _AllocTagAssign.AllocationTagID is null

//  )