@AbapCatalog.preserveKey: true
@AbapCatalog.sqlViewName: 'CALLOCCYCLEREAD'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@AccessControl.personalData.blocking: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
@EndUserText.label: 'Allocation Cycle'
@Search.searchable: true
@ObjectModel.usageType.dataClass: #CUSTOMIZING
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #M
@VDM.viewType: #CONSUMPTION
@AccessControl.privilegedAssociations: [ '_LastExecUserContactCard', '_LastChangeUserContactCard', '_CreatedByUserContactCard']
define view C_AllocationCycle
as select from I_AllocationCycle
//association [1..1] to I_CompanyCode as _CompanyCode on $projection.companycode = _CompanyCode.CompanyCode
//association [1..1] to I_AllocationStatus as _AllocationStatus on $projection.AllocationStatus = _AllocationStatus.AllocationStatus
association [1..1] to C_AllocLastExecByUserVH as _LastExecUserContactCard on $projection.AllocationLastExecutedByUser = _LastExecUserContactCard.AllocationLastExecutedByUser
association [1..1] to C_AllocChangedByUserVH as _LastChangeUserContactCard on $projection.LastChangedByUser = _LastChangeUserContactCard.LastChangedByUser
association [1..1] to C_AllocCreatedByUserVH as _CreatedByUserContactCard on $projection.CreatedByUser = _CreatedByUserContactCard.CreatedByUser
association [1..1] to C_AllocationCycleVH as _AllocationCycleVH on $projection.AllocationType = _AllocationCycleVH.AllocationType
and $projection.AllocationCycle = _AllocationCycleVH.AllocationCycle
and $projection.AllocationCycleStartDate = _AllocationCycleVH.AllocationCycleStartDate
association [0..*] to C_AllocationCycleKeyFieldTP as _Field on $projection.AllocationType = _Field.AllocationType
and $projection.AllocationCycle = _Field.AllocationCycle
and $projection.AllocationCycleStartDate = _Field.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 [0..1] to I_AllocationPostingTypeText as _AllocationPostingTypeText on _AllocationPostingTypeText.AllocationPostingType = $projection.AllocationPostingType
and _AllocationPostingTypeText.Language = $session.system_language
{
@UI.selectionField: [{position: 10}]
// @Consumption.filter.mandatory: true
@ObjectModel.text.element: ['AllocationContextTypeText']
@Consumption.labelElement: 'AllocationContextTypeText'
@Consumption.valueHelpDefinition: [ { entity: { name: 'C_AllocRunContextValueHelp', element: 'AllocationType' } } ]
@UI.textArrangement: #TEXT_ONLY
@UI.lineItem: [{position: 50}]
key AllocationType,
@Consumption.semanticObject: 'OverheadCycle'
@Search: { defaultSearchElement: true, fuzzinessThreshold: 0.5 }
@UI.hidden: true
key AllocationCycle,
@Search: { defaultSearchElement: true, fuzzinessThreshold: 0.5 }
@UI.lineItem: [{position: 20}]
@UI.selectionField: [{position: 6}]
// @Semantics.businessDate.from: true
// @Semantics.calendarItem.dtEnd: true
@Consumption.filter.businessDate.at: true
@Semantics.businessDate.at: true
key AllocationCycleStartDate,
@UI.lineItem: [{position: 10}]
@ObjectModel.text.element: ['AllocationCycleNameText']
@Consumption.labelElement: 'AllocationCycleNameText'
@UI.selectionField: [{position: 5}]
@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,
@Search: { defaultSearchElement: true, fuzzinessThreshold: 0.5 }
@UI.fieldGroup: [{position: 50}]
_CycleCalc.AllocationCycleNameText,
@UI.lineItem: [{position: 25}]
AllocationCycleEndDate,
@UI.hidden: true
_CycleCalc._AllocationStatus._Text[1:Language = $session.system_language].AllocationStatusDescription,
@UI.hidden: true
_CycleCalc.CriticalityCode,
@UI.selectionField: [{position: 40}]
@UI.lineItem: [{ position: 50, criticalityRepresentation: #WITHOUT_ICON, criticality: 'CriticalityCode', label: 'Allocation Status' }]
// @Consumption.valueHelpDefinition: [ { entity: { name: 'C_AllocationStatusVH', element: 'AllocationStatus' } } ]
@ObjectModel.text.element: ['AllocationStatusDescription']
_CycleCalc.AllocationStatus,
AllocationFrequency,
AllocationCreateDate, // missing GFN
@UI.lineItem: [ { type: #AS_CONTACT, label: 'Created By', value: '_CreatedByUserContactCard' } ]
CreatedByUser,
@UI.hidden: true
_CreatedByUserContactCard.CreatedByUserName as CreatedByUserName,
LastChangeDate,
@UI.lineItem: [ { type: #AS_CONTACT, label: 'Changed By', value: '_LastChangeUserContactCard', position: 100, importance: #HIGH } ]
LastChangedByUser,
@UI.hidden: true
_LastChangeUserContactCard.FullName as LastChangedByUserName,
// @UI.lineItem.position: 80
AllocationLastExecutedDate,
@UI.lineItem: [ { type: #AS_CONTACT, label: 'Executed By', value: '_LastExecUserContactCard', position: 90, importance: #HIGH } ]
AllocationLastExecutedByUser,
@UI.hidden: true
_LastExecUserContactCard.FullName as AllocLastExecutedByUserName,
@UI.hidden: true
AllocationLastExecutionTime,
// @UI.selectionField: [{exclude: true}]
// @UI.lineItem.position: 80
// _CycleCalc.AllocLastExecutionDateTime,
AllocationIsProcessed, //
@UI.hidden: true
AllocationCycleSet, //
ScaleNegativeTracingFactor, //
@UI.selectionField: [{position: 16}]
@ObjectModel.text.element: ['AllocationPostingTypeText']
@Consumption.labelElement: 'AllocationPostingTypeText'
@UI.textArrangement: #TEXT_ONLY
@Consumption.valueHelpDefinition: [ { entity: { name: 'C_AllocationPostingTypeVH', element: 'AllocationPostingType' } } ]
@UI.lineItem: [{position: 70}]
// @Consumption.filter.mandatory: true
AllocationPostingType,
@UI.hidden: true
cast( _AllocationPostingTypeText.AllocationPostingTypeText as fco_alloc_posting_type_text preserving type ) as AllocationPostingTypeText,
// AllocationPostingType,
@UI.selectionField: [{position: 17}]
@ObjectModel.text.element: ['AllocActualPlanVariantText']
@Consumption.labelElement: 'AllocActualPlanVariantText'
@UI.textArrangement: #TEXT_ONLY
@UI.lineItem: [{position: 80}]
// @Consumption.filter.mandatory: true
AllocationActualPlanVariant,
@UI.hidden: true
_CycleCalc.AllocActualPlanVariantText,
@UI.hidden: true
@UI.selectionField: [{exclude: true}]
_CycleCalc.AllocationContextTypeText,
// AllocationJob,
AllocationIsCumulative,
AllocIsCumulativeOptimized,
AllocHasAggregatedProcess,
AllocationCycleRunGroup,
AllocationSubstitutionName,
// AllocationSplitCost, // missing GFN
AllocFundMgmtIsActive,
AllocationIsBalanceSheetActive,
AllocHasDerivdFundFrmRcpnt,
AllocIsDerivdFuncAreaFrmRcpnt,
AllocIsDerivdGrantFrmRcpnt,
AllocIsDerivdBudgedPerdRcpnt,
AllocationLedgerGroup,
AllocationIsPeriodShiftActive,
AllocationPeriodDeltaSize,
AllocIsProdnMnthDerivd,
AllocationIsVariableQuantity,
AllocationValuationType,
@Consumption.valueHelpDefinition: [ { entity: { name: 'C_CompanyCodeValueHelp', element: 'CompanyCode' } } ]
@ObjectModel.text.element: ['CompanyCodeName']
@Consumption.labelElement: 'CompanyCodeName'
@UI.textArrangement: #TEXT_LAST
@UI.selectionField: [{position: 20}]
@UI.lineItem: [{position: 30}]
_CycleCalc.CompanyCode,
_CycleCalc.CompanyCodeName,
@UI.selectionField: [{position: 15}]
@UI.lineItem: [{position: 60}]
@Consumption.valueHelpDefinition: [ { entity: { name: 'C_AllocationLedgerVH', element: 'Ledger' } } ]
@ObjectModel.text.element: ['LedgerName']
@UI.textArrangement: #TEXT_LAST
// @Consumption.filter.mandatory: true
_CycleCalc.Ledger,
_CycleCalc.LedgerName,
@UI.selectionField: [{position: 60}]
@UI.lineItem: [{position: 100}]
@Consumption.valueHelpDefinition: [ { entity: { name: 'C_AllocationCategoryVH', element: 'PlanningCategory' } } ]
_CycleCalc.AllocationCycleCategory,
cast( '' as alloc_cycle_group ) as AllocationCycleGroup,
@UI.hidden
cast( concat_with_space( AllocationCycleName, AllocationCycleStartDate, 1) as ke_kscyc_sdate ) as AllocationCycleSemanticKey,
@Consumption.valueHelpDefinition: [{ entity:{ name: 'C_ControllingAreaVH', element: 'ControllingArea' } }]
cast( _Field[1:AllocationFieldName = 'KOKRS'].AllocationFieldMinimumValue as fis_kokrs ) as ControllingArea,
//_CompanyCode,
_LastExecUserContactCard,
_LastChangeUserContactCard,
_CreatedByUserContactCard,
_CycleCalc._AllocationStatus,
//_Context,
// _CycleCalc,
@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'
)