P_UniAllocTagObjectAssignment

DDL: P_UNIALLOCTAGOBJECTASSIGNMENT SQL: PUNIALLOTAGASGN Type: view COMPOSITE

P_UniAllocTagObjectAssignment is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (I_AllocationCycle, I_AllocationSegment) and exposes 14 fields with key fields AllocationType, AllocationCycle, AllocationCycleStartDate, AllocationCycleSegment.

Data Sources (2)

SourceAliasJoin Type
I_AllocationCycle _Cycle from
I_AllocationSegment _Segment inner

Annotations (12)

NameValueLevelField
ClientHandling.algorithm #SESSION_VARIABLE view
AbapCatalog.sqlViewName PUNIALLOTAGASGN 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 (14)

KeyFieldSource TableSource FieldDescription
KEY AllocationType I_AllocationCycle AllocationType
KEY AllocationCycle I_AllocationCycle AllocationCycle
KEY AllocationCycleStartDate I_AllocationCycle AllocationCycleStartDate
KEY AllocationCycleSegment I_AllocationSegment AllocationCycleSegment
SegmentName I_AllocationSegment SegmentName
AllocTagAssignmentStatus
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: 'PUNIALLOTAGASGN'
@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_UniAllocTagObjectAssignment
//  with parameters

//    P_AllocationTagID :fco_tag_id


  as select from            I_AllocationCycle as _Cycle

    inner join              I_AllocationSegment as _Segment        on  _Cycle.AllocationType          = _Segment.AllocationType
                                                                  and _Cycle.AllocationCycle          = _Segment.AllocationCycle
                                                                  and _Cycle.AllocationCycleStartDate = _Segment.AllocationCycleStartDate

//    left outer to many join P_AllocTagObjectAssignment(P_AllocationTagID:$parameters.P_AllocationTagID) as _AllocTagAssign 

//    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' or _AllocTagAssign.AllocationCycleSegment = _Segment.AllocationCycleSegment )

{

  key _Cycle.AllocationType,

  key _Cycle.AllocationCycle,

  key _Cycle.AllocationCycleStartDate,

//      @UI.hidden: true

  key _Segment.AllocationCycleSegment,

      _Segment.SegmentName,

//      cast( '' as fco_alloc_tag ) as AllocationTagID,


      cast ('U' as fco_alloc_tag_assignment)  as AllocTagAssignmentStatus,
//      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

//  )

/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_ALLOCATIONCYCLE",
"I_ALLOCATIONSEGMENT"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/