@AbapCatalog.sqlViewName: 'PALOTAGCYCHIE'
@Metadata.ignorePropagatedAnnotations: true
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@AbapCatalog.preserveKey:true
@AccessControl.personalData.blocking: #NOT_REQUIRED
@VDM.private: true
@VDM.viewType: #CONSUMPTION
@ObjectModel: {
usageType.serviceQuality: #C,
usageType.sizeCategory: #S,
usageType.dataClass: #MIXED
}
@Search.searchable: true
@ClientHandling.algorithm: #SESSION_VARIABLE
define view P_AllocationTagCycleHierarchy
as select from I_AllocationCycle
// as select from P_UniAllocTagCycleAssignment
//
// association [0..1] to I_UniversalAllocationTagTP as _AllocTagTP on $projection.AllocationTagID = _AllocTagTP.AllocationTagID
// association [1..1] to I_AllocationCycle as _AllocCycle on $projection.AllocationType = _AllocCycle.AllocationType
// and $projection.AllocationCycle = _AllocCycle.AllocationCycle
// and $projection.AllocationCycleStartDate = _AllocCycle.AllocationCycleStartDate
association [1..1] to P_AllocationCycle as _CycleCalc on $projection.AllocationType = _CycleCalc.AllocationType
and $projection.AllocationCycle = _CycleCalc.AllocationCycle
and $projection.AllocationCycleStartDate = _CycleCalc.AllocationCycleStartDate
association [1..1] to I_AllocationStatus as _AllocationStatus on $projection.allocationstatus = _AllocationStatus.AllocationStatus
association [1..1] to C_AllocationCycleVH as _AllocationCycleVH on $projection.AllocationType = _AllocationCycleVH.AllocationType
and $projection.AllocationCycle = _AllocationCycleVH.AllocationCycle
and $projection.AllocationCycleStartDate = _AllocationCycleVH.AllocationCycleStartDate
association [1..1] to I_AllocTagAssignmentStatus as _AllocTagAssgmtStatus on $projection.AllocTagAssignmentStatus = _AllocTagAssgmtStatus.AllocTagAssignmentStatus
association [0..*] to I_DomainFixedValue as _AllocationPostingTypeText on _AllocationPostingTypeText.SAPDataDictionaryDomain = 'FCO_ALLOCATION_ALART'
and _AllocationPostingTypeText.DomainValue = $projection.AllocationPostingType
{
// @Consumption.filter.hidden: true
// @UI.hidden: true
// key concat(AllocationCycleStartDate, concat(AllocationCycle, AllocationType) ) as AllocationTagHierarchyID,
//I_AllocTagObjectAssignment
// @UI.lineItem.position: 10
// @Search: { defaultSearchElement: true, fuzzinessThreshold: 0.5 }
// @EndUserText.quickInfo: 'Allocation Tag'
// AllocationTagID,
@ObjectModel.text.element: ['AllocationContextTypeText']
@Consumption.labelElement: 'AllocationContextTypeText'
@UI.textArrangement: #TEXT_ONLY
@UI.lineItem.position: 50
key AllocationType,
@UI.hidden: true
@Search: { defaultSearchElement: true, fuzzinessThreshold: 0.8 }
key AllocationCycle,
@Search: { defaultSearchElement: true, fuzzinessThreshold: 0.8 }
@UI.lineItem.position: 30
@Semantics.businessDate.from: true
key AllocationCycleStartDate,
// @Consumption.filter.hidden: true
// @UI.hidden: true
// cast( 'expanded' as abap.char(10) ) as DrillState,
//
// @Consumption.filter.hidden: true
// @UI.hidden: true
// '0' as HierarchyLevel,
//Allocation Tag Assignment Status
@UI.selectionField.position: 80
@Consumption.valueHelpDefinition: [ { entity: { name: 'C_AllocTagAssignmentStatusVH', element: 'AllocTagAssignmentStatus' } } ]
@ObjectModel.text.element: ['AllocTagAssignmentStatusName']
@Consumption.labelElement: 'AllocTagAssignmentStatusName'
@UI.textArrangement: #TEXT_ONLY
cast ('U' as fco_alloc_tag_assignment) as AllocTagAssignmentStatus,
@UI.hidden: true
cast( '' as fco_alloc_tag_assignment ) as AllocTagAssignmentStatusName,
//
// @UI.hidden: true
// _AllocTagAssgmtStatus._Text[1:Language = $session.system_language].AllocTagAssignmentStatusName,
// _AllocTagAssgmtStatus._Text[1:Language = $session.system_language].AllocTagAssignmentStatusName as AllocTagAssignmentStatusName,
@UI.lineItem.position: 10
@ObjectModel.text.element: ['AllocationCycleNameText']
@Consumption.labelElement: ['AllocationCycleNameText']
@UI.selectionField: {position: 80}
@UI.textArrangement: #TEXT_LAST
@Consumption.valueHelpDefinition: [ { entity: { name: 'C_AllocationCycleVH', element: 'AllocationCycleName' } } ]
_CycleCalc.AllocationCycleName,
@UI.hidden: true
cast(concat( concat(_CycleCalc.AllocationCycleName, '/' ), AllocationCycleStartDate ) as fco_alloc_cycle_sdate) as AllocationCycleKey,
@UI.lineItem.position: 20
@Search: { defaultSearchElement: true, fuzzinessThreshold: 0.8 }
@UI.fieldGroup.position: 50
_CycleCalc.AllocationCycleNameText,
AllocationCycleEndDate,
@UI.selectionField: [{position: 60, element: 'AllocationStatusDescription'}]
@UI.lineItem.position: 70
@ObjectModel.text.element: ['AllocationStatusDescription']
@Consumption.labelElement: 'AllocationStatusDescription'
@UI.textArrangement: #TEXT_ONLY
@Consumption.valueHelpDefinition: [ { entity: { name: 'C_AllocationCycleStatusVH', element: 'AllocationStatus' } } ]
_CycleCalc.AllocationStatus,
@UI.lineItem: [{ criticalityRepresentation: #WITHOUT_ICON, criticality: 'CriticalityCode', label: 'Allocation Status' }]
@ObjectModel.readOnly: true
@UI.hidden: true
_CycleCalc._AllocationStatus._Text[1:Language = $session.system_language].AllocationStatusDescription,
@UI.hidden: true
_CycleCalc.CriticalityCode,
AllocationFrequency,
AllocationCreateDate, // missing GFN
// @UI.lineItem: [ { type: #AS_CONTACT, label: 'Created By', value: '_CreatedByUserContactCard' } ]
CreatedByUser,
// _CreatedByUserContactCard.FullName as CreatedByUserName,
LastChangeDate,
// @UI.lineItem: [ { type: #AS_CONTACT, label: 'Changed By', value: '_LastChangeUserContactCard', position: 100, importance: #HIGH } ]
LastChangedByUser,
@UI.selectionField: [{position: 30, element: 'AllocationPostingTypeText'}]
@ObjectModel.text.element: ['AllocationPostingTypeText']
@Consumption.labelElement: 'AllocationPostingTypeText'
@UI.textArrangement: #TEXT_ONLY
@Consumption.valueHelpDefinition: [ { entity: { name: 'C_AllocationTypeVH', element: 'AllocationPostingType' } } ]
cast(AllocationPostingType as fco_alloc_posting_type preserving type) as AllocationPostingType,
@ObjectModel.readOnly: true
@UI.hidden: true
cast( _AllocationPostingTypeText._DomainFixedValueText[ 1:Language = $session.system_language ].DomainText
as fco_alloc_posting_type_text ) as AllocationPostingTypeText,
@UI.selectionField: [{position: 40, element: 'AllocActualPlanVariantText'}]
@ObjectModel.text.element: ['AllocActualPlanVariantText']
@Consumption.labelElement: 'AllocActualPlanVariantText'
@Consumption.valueHelpDefinition: [ { entity: { name: 'C_AllocActualPlanVariantVH', element: 'AllocationActualPlanVariant' } } ]
@UI.textArrangement: #TEXT_ONLY
AllocationActualPlanVariant,
// @UI.selectionField: [{exclude: true}]
@ObjectModel.readOnly: true
@UI.hidden: true
_CycleCalc.AllocActualPlanVariantText,
@UI.hidden: true
@UI.selectionField: [{exclude: true}]
_CycleCalc.AllocationContextTypeText,
@Consumption.valueHelpDefinition: [ { entity: { name: 'C_CompanyCodeValueHelp', element: 'CompanyCode' } } ]
@ObjectModel.text.element: ['CompanyCodeName']
@Consumption.labelElement: 'CompanyCodeName'
@UI.textArrangement: #TEXT_LAST
@UI.selectionField: {position: 50}
@UI.lineItem.position: 40
_CycleCalc.CompanyCode,
_CycleCalc.CompanyCodeName,
@UI.selectionField: {position: 15}
@UI.lineItem.position: 60
@Consumption.valueHelpDefinition: [ { entity: { name: 'C_AllocationLedgerVH', element: 'Ledger' } } ]
_CycleCalc.Ledger,
//@UI.lineItem.position: 60
@Consumption.valueHelpDefinition: [ { entity: { name: 'C_AllocationCategoryVH', element: 'PlanningCategory' } } ]
_CycleCalc.AllocationCycleCategory,
//_Context,
// _CycleCalc,
_AllocationStatus,
_AllocTagAssgmtStatus,
@Consumption.filter.hidden: true
@UI.selectionField: [{exclude: true}]
@UI.hidden: true
_AllocationCycleVH
}
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'
)