I_AllocationSegmentTP

DDL: I_ALLOCATIONSEGMENTTP SQL: ALLOCSEGMENTTP Type: view TRANSACTIONAL

Allocation Segment TP

I_AllocationSegmentTP is a Transactional CDS View that provides data about "Allocation Segment TP" in SAP S/4HANA. It reads from 2 data sources (I_AllocationContextType, I_AllocationSegment) and exposes 65 fields with key fields AllocationType, AllocationCycle, AllocationCycleStartDate, AllocationCycleSegment. It has 11 associations to related views.

Data Sources (2)

SourceAliasJoin Type
I_AllocationContextType Context inner
I_AllocationSegment I_AllocationSegment from

Associations (11)

CardinalityTargetAliasCondition
[1..1] I_AllocationCycleTP _Cycle $projection.AllocationType = _Cycle.AllocationType and $projection.AllocationCycle = _Cycle.AllocationCycle and $projection.AllocationCycleStartDate = _Cycle.AllocationCycleStartDate
[0..*] I_AllocationSenderKeyFieldTP _SenderField $projection.AllocationType = _SenderField.AllocationType and $projection.AllocationCycle = _SenderField.AllocationCycle and $projection.AllocationCycleStartDate = _SenderField.AllocationCycleStartDate and $projection.AllocationCycleSegment = _SenderField.AllocationCycleSegment
[0..*] I_AllocReceiverKeyFieldTP _ReceiverField $projection.AllocationType = _ReceiverField.AllocationType and $projection.AllocationCycle = _ReceiverField.AllocationCycle and $projection.AllocationCycleStartDate = _ReceiverField.AllocationCycleStartDate and $projection.AllocationCycleSegment = _ReceiverField.AllocationCycleSegment
[0..*] I_AllocSenderValueKeyFieldTP _SenderValueField $projection.AllocationType = _SenderValueField.AllocationType and $projection.AllocationCycle = _SenderValueField.AllocationCycle and $projection.AllocationCycleStartDate = _SenderValueField.AllocationCycleStartDate and $projection.AllocationCycleSegment = _SenderValueField.AllocationCycleSegment
[0..*] I_AllocRcvrTracingKeyFieldTP _ReceiverTracingField $projection.AllocationType = _ReceiverTracingField.AllocationType and $projection.AllocationCycle = _ReceiverTracingField.AllocationCycle and $projection.AllocationCycleStartDate = _ReceiverTracingField.AllocationCycleStartDate and $projection.AllocationCycleSegment = _ReceiverTracingField.AllocationCycleSegment
[0..*] I_AllocationSenderElementTP _SenderElement $projection.AllocationType = _SenderElement.AllocationType and $projection.AllocationCycle = _SenderElement.AllocationCycle and $projection.AllocationCycleStartDate = _SenderElement.AllocationCycleStartDate and $projection.AllocationCycleSegment = _SenderElement.AllocationCycleSegment
[0..*] I_AllocReceiverElementTP _ReceiverElement $projection.AllocationType = _ReceiverElement.AllocationType and $projection.AllocationCycle = _ReceiverElement.AllocationCycle and $projection.AllocationCycleStartDate = _ReceiverElement.AllocationCycleStartDate and $projection.AllocationCycleSegment = _ReceiverElement.AllocationCycleSegment
[0..*] I_AllocRcvrFactorElementTP _ReceiverWeightingElement $projection.AllocationType = _ReceiverWeightingElement.AllocationType and $projection.AllocationCycle = _ReceiverWeightingElement.AllocationCycle and $projection.AllocationCycleStartDate = _ReceiverWeightingElement.AllocationCycleStartDate and $projection.AllocationCycleSegment = _ReceiverWeightingElement.AllocationCycleSegment
[0..*] P_TDDVirtualField _TDDVirtualField $projection.AllocationType = _TDDVirtualField.AllocationType and $projection.AllocationCycle = _TDDVirtualField.AllocationCycle and $projection.AllocationCycleStartDate = _TDDVirtualField.AllocationCycleStartDate and $projection.AllocationCycleSegment = _TDDVirtualField.AllocationCycleSegment
[0..*] I_AllocationSegmentNoteTP _SegmentNote $projection.AllocationType = _SegmentNote.AllocationType and $projection.AllocationCycle = _SegmentNote.AllocationCycle and $projection.AllocationCycleStartDate = _SegmentNote.AllocationCycleStartDate and $projection.AllocationCycleSegment = _SegmentNote.AllocationCycleSegment
[0..*] I_AllocTagSegmentAssignmentTP _SegmentTag $projection.AllocationType = _SegmentTag.AllocationType and $projection.AllocationCycle = _SegmentTag.AllocationCycle and $projection.AllocationCycleStartDate = _SegmentTag.AllocationCycleStartDate and $projection.AllocationCycleSegment = _SegmentTag.AllocationCycleSegment

Annotations (14)

NameValueLevelField
AbapCatalog.sqlViewName ALLOCSEGMENTTP view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
EndUserText.label Allocation Segment TP view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.dataClass #CUSTOMIZING view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #M view
VDM.viewType #TRANSACTIONAL view
ObjectModel.transactionalProcessingEnabled true view
ObjectModel.writeDraftPersistence ALLOCSEGMENTTPD view
ObjectModel.createEnabled true view
ObjectModel.updateEnabled true view
ObjectModel.deleteEnabled true view

Fields (65)

KeyFieldSource TableSource FieldDescription
KEY AllocationType I_AllocationSegment AllocationType
KEY AllocationCycle AllocationCycle
KEY AllocationCycleStartDate AllocationCycleStartDate
KEY AllocationCycleSegment AllocationCycleSegment
SegmentName SegmentName
AllocationSegmentPosition AllocationSegmentPosition
AllocationSenderRule AllocationSenderRule
AllocationReceiverRule AllocationReceiverRule
AllocationSegmentIsLocked AllocationSegmentIsLocked
AllocScNgtvTracingFctr AllocScNgtvTracingFctr
SenderTracingFieldGroup SenderTracingFieldGroup
SenderFieldGroup SenderFieldGroup
ReceiverFieldGroup ReceiverFieldGroup
ReceiverTracingFieldGroup ReceiverTracingFieldGroup
AllocationSenderFixedField1 AllocationSenderFixedField1
AllocationSenderFixedField2 AllocationSenderFixedField2
AllocationSenderFixedField3 AllocationSenderFixedField3
AllocationSenderFixedField4 AllocationSenderFixedField4
AllocationSenderFixedField5 AllocationSenderFixedField5
AllocationSenderFixedField6 AllocationSenderFixedField6
AllocationSenderFixedField7 AllocationSenderFixedField7
AllocationSenderFixedField8 AllocationSenderFixedField8
AllocationSenderFixedField9 AllocationSenderFixedField9
AllocationSenderFixedField10 AllocationSenderFixedField10
AllocationCurrency AllocationCurrency
AllocationReceiverFixedField1 AllocationReceiverFixedField1
AllocationReceiverFixedField2 AllocationReceiverFixedField2
AllocationReceiverFixedField3 AllocationReceiverFixedField3
AllocationReceiverFixedField4 AllocationReceiverFixedField4
AllocationReceiverFixedField5 AllocationReceiverFixedField5
AllocationReceiverFixedField6 AllocationReceiverFixedField6
AllocationReceiverFixedField7 AllocationReceiverFixedField7
AllocationReceiverFixedField8 AllocationReceiverFixedField8
AllocationReceiverFixedField9 AllocationReceiverFixedField9
AllocationReceiverFixedField10 AllocationReceiverFixedField10
AllocationFieldGroup AllocationFieldGroup
AssessmentCostElement AssessmentCostElement
AllocationFixedCostCenterCost AllocationFixedCostCenterCost
AllocationVariableCostCtrCost AllocationVariableCostCtrCost
AllocationAccountAssignment AllocationAccountAssignment
AllocationSegmentSortField AllocationSegmentSortField
AllocIsSndrExclAsRcvr AllocIsSndrExclAsRcvr
ManipulationRuleForCyclicMaint ManipulationRuleForCyclicMaint
AllocationStructure AllocationStructure
AllocationTransferStructure AllocationTransferStructure
AllocSndrFctrPercent AllocSndrFctrPercent
AllocRcvrFctrPercent AllocRcvrFctrPercent
AllocSegmentShareInPercent AllocSegmentShareInPercent
AllocationActualPlanVariant _Cycle AllocationActualPlanVariant
AllocationPostingType _Cycle AllocationPostingType
SegmentNameDescription
AllocationReferenceLedger
PlanningCategory
AllocationSenderValueIsNew
AllocationTagID
_Cycle _Cycle
_SenderField _SenderField
_ReceiverField _ReceiverField
_SenderValueField _SenderValueField
_ReceiverTracingField _ReceiverTracingField
_SenderElement _SenderElement
_ReceiverElement _ReceiverElement
_ReceiverWeightingElement _ReceiverWeightingElement
_SegmentNote _SegmentNote
_SegmentTag _SegmentTag
@AbapCatalog.sqlViewName: 'ALLOCSEGMENTTP'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Allocation Segment TP'

@ClientHandling.algorithm: #SESSION_VARIABLE

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

@VDM.viewType: #TRANSACTIONAL

@ObjectModel:
{
  transactionalProcessingEnabled:true,
  writeDraftPersistence: 'ALLOCSEGMENTTPD',
  semanticKey: ['AllocationType', 'AllocationCycle', 'AllocationCycleStartDate', 'AllocationCycleSegment' ],
  createEnabled: true,
  updateEnabled: true,
  deleteEnabled: true

//  entityChangeStateId: 'LastChangeTime'

}
define view I_AllocationSegmentTP
  as select from I_AllocationSegment

    inner join   I_AllocationContextType as Context on Context.AllocationType = I_AllocationSegment.AllocationType

  association [1..1] to I_AllocationCycleTP           as _Cycle                    on  $projection.AllocationType           = _Cycle.AllocationType
                                                                                   and $projection.AllocationCycle          = _Cycle.AllocationCycle
                                                                                   and $projection.AllocationCycleStartDate = _Cycle.AllocationCycleStartDate

  association [0..*] to I_AllocationSenderKeyFieldTP  as _SenderField              on  $projection.AllocationType           = _SenderField.AllocationType
                                                                                   and $projection.AllocationCycle          = _SenderField.AllocationCycle
                                                                                   and $projection.AllocationCycleStartDate = _SenderField.AllocationCycleStartDate
                                                                                   and $projection.AllocationCycleSegment   = _SenderField.AllocationCycleSegment

  association [0..*] to I_AllocReceiverKeyFieldTP     as _ReceiverField            on  $projection.AllocationType           = _ReceiverField.AllocationType
                                                                                   and $projection.AllocationCycle          = _ReceiverField.AllocationCycle
                                                                                   and $projection.AllocationCycleStartDate = _ReceiverField.AllocationCycleStartDate
                                                                                   and $projection.AllocationCycleSegment   = _ReceiverField.AllocationCycleSegment

  association [0..*] to I_AllocSenderValueKeyFieldTP  as _SenderValueField         on  $projection.AllocationType           = _SenderValueField.AllocationType
                                                                                   and $projection.AllocationCycle          = _SenderValueField.AllocationCycle
                                                                                   and $projection.AllocationCycleStartDate = _SenderValueField.AllocationCycleStartDate
                                                                                   and $projection.AllocationCycleSegment   = _SenderValueField.AllocationCycleSegment

  association [0..*] to I_AllocRcvrTracingKeyFieldTP  as _ReceiverTracingField     on  $projection.AllocationType           = _ReceiverTracingField.AllocationType
                                                                                   and $projection.AllocationCycle          = _ReceiverTracingField.AllocationCycle
                                                                                   and $projection.AllocationCycleStartDate = _ReceiverTracingField.AllocationCycleStartDate
                                                                                   and $projection.AllocationCycleSegment   = _ReceiverTracingField.AllocationCycleSegment

  association [0..*] to I_AllocationSenderElementTP   as _SenderElement            on  $projection.AllocationType           = _SenderElement.AllocationType
                                                                                   and $projection.AllocationCycle          = _SenderElement.AllocationCycle
                                                                                   and $projection.AllocationCycleStartDate = _SenderElement.AllocationCycleStartDate
                                                                                   and $projection.AllocationCycleSegment   = _SenderElement.AllocationCycleSegment

  association [0..*] to I_AllocReceiverElementTP      as _ReceiverElement          on  $projection.AllocationType           = _ReceiverElement.AllocationType
                                                                                   and $projection.AllocationCycle          = _ReceiverElement.AllocationCycle
                                                                                   and $projection.AllocationCycleStartDate = _ReceiverElement.AllocationCycleStartDate
                                                                                   and $projection.AllocationCycleSegment   = _ReceiverElement.AllocationCycleSegment

  association [0..*] to I_AllocRcvrFactorElementTP    as _ReceiverWeightingElement on  $projection.AllocationType           = _ReceiverWeightingElement.AllocationType
                                                                                   and $projection.AllocationCycle          = _ReceiverWeightingElement.AllocationCycle
                                                                                   and $projection.AllocationCycleStartDate = _ReceiverWeightingElement.AllocationCycleStartDate
                                                                                   and $projection.AllocationCycleSegment   = _ReceiverWeightingElement.AllocationCycleSegment

  association [0..*] to P_TDDVirtualField             as _TDDVirtualField          on  $projection.AllocationType           = _TDDVirtualField.AllocationType
                                                                                   and $projection.AllocationCycle          = _TDDVirtualField.AllocationCycle
                                                                                   and $projection.AllocationCycleStartDate = _TDDVirtualField.AllocationCycleStartDate
                                                                                   and $projection.AllocationCycleSegment   = _TDDVirtualField.AllocationCycleSegment

  association [0..*] to I_AllocationSegmentNoteTP     as _SegmentNote              on  $projection.AllocationType           = _SegmentNote.AllocationType
                                                                                   and $projection.AllocationCycle          = _SegmentNote.AllocationCycle
                                                                                   and $projection.AllocationCycleStartDate = _SegmentNote.AllocationCycleStartDate
                                                                                   and $projection.AllocationCycleSegment   = _SegmentNote.AllocationCycleSegment 
  
  association [0..*] to I_AllocTagSegmentAssignmentTP as _SegmentTag               on  $projection.AllocationType           = _SegmentTag.AllocationType
                                                                                   and $projection.AllocationCycle          = _SegmentTag.AllocationCycle
                                                                                   and $projection.AllocationCycleStartDate = _SegmentTag.AllocationCycleStartDate
                                                                                   and $projection.AllocationCycleSegment   = _SegmentTag.AllocationCycleSegment                                                                                
                                                                                   
{
  key I_AllocationSegment.AllocationType,
  key AllocationCycle,
  key AllocationCycleStartDate,
  key AllocationCycleSegment,

      SegmentName,
      AllocationSegmentPosition,
      AllocationSenderRule,
      AllocationReceiverRule,
      AllocationSegmentIsLocked,
      case when AllocationSegmentIsLocked = 'X'
        then 1 //red

        else 3 //green

      end                                                                                                               as CriticalityCode,

      AllocScNgtvTracingFctr,

      SenderTracingFieldGroup,
      SenderFieldGroup,
      ReceiverFieldGroup,
      ReceiverTracingFieldGroup,
      AllocationSenderFixedField1,
      AllocationSenderFixedField2,
      AllocationSenderFixedField3,
      AllocationSenderFixedField4,
      AllocationSenderFixedField5,
      AllocationSenderFixedField6,
      AllocationSenderFixedField7,
      AllocationSenderFixedField8,
      AllocationSenderFixedField9,
      AllocationSenderFixedField10,
      AllocationCurrency,
      AllocationReceiverFixedField1,
      AllocationReceiverFixedField2,
      AllocationReceiverFixedField3,
      AllocationReceiverFixedField4,
      AllocationReceiverFixedField5,
      AllocationReceiverFixedField6,
      AllocationReceiverFixedField7,
      AllocationReceiverFixedField8,
      AllocationReceiverFixedField9,
      AllocationReceiverFixedField10,
      AllocationFieldGroup,
      AssessmentCostElement,
      AllocationFixedCostCenterCost,
      AllocationVariableCostCtrCost,
      AllocationAccountAssignment,
      AllocationSegmentSortField,
      AllocIsSndrExclAsRcvr,
      ManipulationRuleForCyclicMaint,
      AllocationStructure,
      AllocationTransferStructure,
      AllocSndrFctrPercent,
      AllocRcvrFctrPercent,
      AllocSegmentShareInPercent,
      _Cycle.AllocationActualPlanVariant,
      _Cycle.AllocationPostingType,
      
      cast(I_AllocationSegment._Text.AllocationCycleNameText as fco_alloc_segment_decs)                                 as SegmentNameDescription,


      cast(_TDDVirtualField[1:AllocationFieldName = 'RLDNR'].AllocationFieldMinimumValue as fco_alloc_reference_ledger) as AllocationReferenceLedger,


      cast(_TDDVirtualField[1:AllocationFieldName = 'CATEGORY'].AllocationFieldMinimumValue as fcom_category)           as PlanningCategory,

      case substring(AllocationFieldGroup, 1, 4)
        when 'VMSL' 
          then cast(_TDDVirtualField[1:AllocationFieldName = 'RVUNIT'].AllocationFieldMinimumValue as meins)
        else 
          cast(_TDDVirtualField[1:AllocationFieldName = 'RUNIT'].AllocationFieldMinimumValue as meins) 
      end                                                                                                               as UnitOfMeasure,

      cast( '' as boolean )                                                                                             as AllocationSenderValueIsNew,
      
      @ObjectModel.readOnly: 'EXTERNAL_CALCULATION'
      @ObjectModel.enabled: 'EXTERNAL_CALCULATION'
      cast('' as fco_tags_id) as AllocationTagID,      
      /* Associations */
      @ObjectModel.association.type:  [ #TO_COMPOSITION_ROOT, #TO_COMPOSITION_PARENT ]
      _Cycle,
      @ObjectModel.association.type: #TO_COMPOSITION_CHILD
      _SenderField,
      @ObjectModel.association.type: #TO_COMPOSITION_CHILD
      _ReceiverField,
      @ObjectModel.association.type: #TO_COMPOSITION_CHILD
      _SenderValueField,
      @ObjectModel.association.type: #TO_COMPOSITION_CHILD
      _ReceiverTracingField,
      @ObjectModel.association.type: #TO_COMPOSITION_CHILD
      _SenderElement,
      @ObjectModel.association.type: #TO_COMPOSITION_CHILD
      _ReceiverElement,
      @ObjectModel.association.type: #TO_COMPOSITION_CHILD
      _ReceiverWeightingElement,
      @ObjectModel.association.type: #TO_COMPOSITION_CHILD
      _SegmentNote,
      @ObjectModel.association.type: #TO_COMPOSITION_CHILD
      _SegmentTag

}
//where DatabaseTable = 'ACDOC_CC'

/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_ALLOCASSMTDISTRLONGTEXT",
"I_ALLOCATIONCONTEXTTYPE",
"I_ALLOCATIONCYCLETP",
"I_ALLOCATIONSEGMENT",
"P_TDDVIRTUALFIELD"
],
"ASSOCIATED":
[
"I_ALLOCATIONCYCLETP",
"I_ALLOCATIONSEGMENTNOTETP",
"I_ALLOCATIONSENDERELEMENTTP",
"I_ALLOCATIONSENDERKEYFIELDTP",
"I_ALLOCRCVRFACTORELEMENTTP",
"I_ALLOCRCVRTRACINGKEYFIELDTP",
"I_ALLOCRECEIVERELEMENTTP",
"I_ALLOCRECEIVERKEYFIELDTP",
"I_ALLOCSENDERVALUEKEYFIELDTP",
"I_ALLOCTAGSEGMENTASSIGNMENTTP",
"P_TDDVIRTUALFIELD"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/