@AbapCatalog.sqlViewName: 'PFICOSTCENTER'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@AccessControl.personalData.blocking: #REQUIRED
@AccessControl.privilegedAssociations: [ '_UserRespContactCard', '_UserCrtedContactCard' ]
@VDM.private: true
@VDM.viewType: #COMPOSITE
@ObjectModel.usageType.dataClass: #ORGANIZATIONAL
@ObjectModel.usageType.serviceQuality: #A
@ObjectModel.usageType.sizeCategory: #L
@Metadata.ignorePropagatedAnnotations: true
@ClientHandling.algorithm: #SESSION_VARIABLE
define view P_CostCenter
as select from I_CostCenter
association [0..*] to I_ProfitCenter as _ProfitCenter on _ProfitCenter.ControllingArea = $projection.ControllingArea
and _ProfitCenter.ProfitCenter = $projection.ProfitCenter
and _ProfitCenter.ValidityStartDate < $projection.ValidityEndDate
and _ProfitCenter.ValidityEndDate >= $projection.ValidityEndDate
{
@ObjectModel.foreignKey.association: '_ControllingArea'
key I_CostCenter.ControllingArea,
@ObjectModel.hierarchy.association: '_CostCenterHierarchyNode'
key I_CostCenter.CostCenter,
key I_CostCenter.ValidityEndDate,
I_CostCenter.ValidityStartDate,
cast(I_CostCenter.IsBlkdForPrimaryCostsPosting as fis_cc_bkzkp preserving type ) as IsBlkdForPrimaryCostsPosting,
cast(I_CostCenter.IsBlockedForPlanPrimaryCosts as fis_cc_pkzkp preserving type ) as IsBlockedForPlanPrimaryCosts,
@ObjectModel.foreignKey.association: '_CompanyCode'
I_CostCenter.CompanyCode,
@ObjectModel.foreignKey.association: '_BusinessArea'
I_CostCenter.BusinessArea,
@ObjectModel.foreignKey.association: '_CostCenterCategory'
I_CostCenter.CostCenterCategory,
I_CostCenter.CostCtrResponsiblePersonName,
@ObjectModel.foreignKey.association: '_UserRespContactCard'
I_CostCenter.CostCtrResponsibleUser,
@Semantics.currencyCode: true
@ObjectModel.foreignKey.association: '_Currency'
I_CostCenter.CostCenterCurrency,
@ObjectModel.foreignKey.association: '_CostingSheetProcedure'
I_CostCenter.CostingSheet,
I_CostCenter.TaxJurisdiction,
@ObjectModel.foreignKey.association: '_ProfitCenter'
I_CostCenter.ProfitCenter,
I_CostCenter.Plant,
I_CostCenter.LogicalSystem,
cast(I_CostCenter.CostCenterCreationDate as fis_cc_erfdt preserving type ) as CostCenterCreationDate,
@ObjectModel.foreignKey.association: '_UserCrtedContactCard'
cast(I_CostCenter.CostCenterCreatedByUser as fis_cc_erfnm preserving type ) as CostCenterCreatedByUser,
cast(I_CostCenter.IsBlkdForSecondaryCostsPosting as fis_cc_bkzks preserving type ) as IsBlkdForSecondaryCostsPosting,
cast(I_CostCenter.IsBlockedForRevenuePosting as fis_cc_bkzer preserving type ) as IsBlockedForRevenuePosting,
cast(I_CostCenter.IsBlockedForCommitmentPosting as fis_cc_bkzob preserving type ) as IsBlockedForCommitmentPosting,
cast(I_CostCenter.IsBlockedForPlanSecondaryCosts as fis_cc_pkzks preserving type ) as IsBlockedForPlanSecondaryCosts,
cast(I_CostCenter.IsBlockedForPlanRevenues as fis_cc_pkzer preserving type ) as IsBlockedForPlanRevenues,
I_CostCenter.CostCenterAllocationMethod,
I_CostCenter.ConsumptionQtyIsRecorded,
I_CostCenter.Department,
I_CostCenter.SubsequentCostCenter,
I_CostCenter.ConditionUsage,
I_CostCenter.ConditionApplication,
I_CostCenter.CostCenterAccountingOverhead,
@ObjectModel.foreignKey.association: '_Country'
cast(I_CostCenter.Country as fis_land1 preserving type ) as Country,
I_CostCenter.FormOfAddress,
cast(I_CostCenter.AddressName as fco_cc_addressname preserving type ) as AddressName,
I_CostCenter.AddressAdditionalName,
I_CostCenter.CostCenterAddrName3,
I_CostCenter.CostCenterAddrName4,
I_CostCenter.CityName,
I_CostCenter.District,
I_CostCenter.StreetAddressName,
I_CostCenter.POBox,
I_CostCenter.PostalCode,
I_CostCenter.POBoxPostalCode,
@ObjectModel.foreignKey.association: '_Region'
I_CostCenter.Region,
@ObjectModel.foreignKey.association: '_Language'
I_CostCenter.Language,
I_CostCenter.TeleboxNumber,
cast(I_CostCenter.PhoneNumber1 as fco_cc_telf1 preserving type ) as PhoneNumber1,
I_CostCenter.PhoneNumber2,
I_CostCenter.FaxNumber,
I_CostCenter.TeletexNumber,
I_CostCenter.TelexNumber,
I_CostCenter.DataCommunicationPhoneNumber,
cast(I_CostCenter.CostCenterPrinterDestination as fis_kdnam preserving type ) as CostCenterPrinterDestination,
cast(I_CostCenter.CostCenterStandardHierArea as fco_cc_khinr preserving type ) as CostCenterStandardHierArea,
I_CostCenter.CostCollector,
I_CostCenter.CostCenterIsComplete,
I_CostCenter.IsStatisticalCostCenter,
I_CostCenter.ObjectInternalID,
I_CostCenter.CostCenterFunction,
I_CostCenter.CostCenterAlternativeFunction,
@ObjectModel.foreignKey.association: '_FunctionalArea'
I_CostCenter.FunctionalArea,
cast( I_CostCenter._Text[1:Language=$session.system_language].CostCenterName as ktext preserving type ) as CostCenterName,
cast( coalesce( I_CostCenter._Text[1:Language=$session.system_language].CostCenterDescription, '' ) as kltxt preserving type ) as CostCenterDescription,
// I_CostCenter._Text[1:Language=$session.system_language].CostCenterDescription,
cast(I_CostCenter._ControllingArea.ControllingAreaName as fis_cc_bezei preserving type ) as ControllingAreaName,
cast( coalesce( I_CostCenter._CostCenterCategory._Text[1:Language=$session.system_language].CostCenterCategoryName, '' ) as fis_cc_kosar_name preserving type ) as CostCenterCategoryName,
I_CostCenter._CompanyCode.CompanyCodeName,
cast ( coalesce( I_CostCenter._BusinessArea._Text[1:Language=$session.system_language].BusinessAreaName, '' ) as fis_gtext preserving type ) as BusinessAreaName,
cast ( coalesce( I_CostCenter._FunctionalArea._Text[1:Language=$session.system_language].FunctionalAreaName, '' ) as fis_fkbtx preserving type ) as FunctionalAreaName,
I_CostCenter._CostingSheetProcedure._Text[1:Language=$session.system_language].CostingSheetProcedureDesc,
cast ( coalesce( _ProfitCenter._Text[1:Language=$session.system_language].ProfitCenterName, '' ) as fis_prctr_shorttext preserving type ) as ProfitCenterName,
I_CostCenter._UserRespContactCard.FullName as ResponsibleUserFullName,
I_CostCenter._UserCrtedContactCard.FullName as CreatedByUserFullName,
case( length( ControllingArea ) )
when 2 then cast( concat_with_space(ControllingArea, CostCenter, 2 ) as cdobjectv )
when 3 then cast( concat_with_space(ControllingArea, CostCenter, 1 ) as cdobjectv )
else cast( concat(ControllingArea, CostCenter ) as cdobjectv )
end as ChangeDocObject,
case( length( ControllingArea ) )
when 2 then cast( concat('KS', concat_with_space(ControllingArea, CostCenter, 2 ) ) as fis_cc_respon_area )
when 3 then cast( concat('KS', concat_with_space(ControllingArea, CostCenter, 1 ) ) as fis_cc_respon_area )
else cast( concat('KS', concat(ControllingArea, CostCenter)) as fis_cc_respon_area preserving type )
end as CostCenterResponsibilityArea,
case( length( ControllingArea ) )
when 2 then cast( concat('HI', concat_with_space(ControllingArea, CostCenterStandardHierArea, 2 ) ) as fis_cc_hier_respa )
when 3 then cast( concat('HI', concat_with_space(ControllingArea, CostCenterStandardHierArea, 1 ) ) as fis_cc_hier_respa )
else cast( concat('HI', concat(ControllingArea, CostCenterStandardHierArea)) as fis_cc_hier_respa preserving type )
end as CostCenterHierarchyRespyArea,
@ObjectModel.foreignKey.association: '_ActivityBasedCostingTmplCpi'
cast( ActyIndepFormulaPlanningTmpl as fco_cca_templ_cpi preserving type ) as ActyIndepFormulaPlanningTmpl,
@ObjectModel.foreignKey.association: '_ActivityBasedCostingTmplCpd'
cast ( ActyDepdntFormulaPlanningTmpl as fco_cca_templ_cpd preserving type ) as ActyDepdntFormulaPlanningTmpl,
@ObjectModel.foreignKey.association: '_ActivityBasedCostingTmplSci'
cast ( ActyIndependentAllocationTmpl as fco_cca_templ_sci preserving type ) as ActyIndependentAllocationTmpl,
@ObjectModel.foreignKey.association: '_ActivityBasedCostingTmplScd'
cast ( ActyDependentAllocationTmpl as fco_cca_templ_scd preserving type ) as ActyDependentAllocationTmpl,
@ObjectModel.foreignKey.association: '_ActivityBasedCostingTmplSki'
cast ( ActlIndepStatisticalKeyFigures as fco_cca_templ_ski preserving type ) as ActlIndepStatisticalKeyFigures,
@ObjectModel.foreignKey.association: '_ActivityBasedCostingTmplSkd'
cast ( ActlDepStatisticalKeyFigures as fco_cca_templ_skd preserving type ) as ActlDepStatisticalKeyFigures,
JointVenture,
JointVentureRecoveryCode,
JointVentureEquityType,
JointVentureObjectType,
JointVentureClass,
JointVentureSubClass,
cast( BudgetCarryingCostCenter as fco_budgetcarryingcostcenter preserving type ) as BudgetCarryingCostCenter,
cast( AvailabilityControlProfile as fco_budgetavailabilityctrlprof preserving type ) as AvailabilityControlProfile,
cast( AvailabilityControlIsActive as fco_availabilityctrlprofisact preserving type ) as AvailabilityControlIsActive,
Fund,
GrantID,
FundIsFixAssigned,
GrantIDIsFixAssigned,
FunctionalAreaIsFixAssigned,
I_CostCenter._ControllingArea,
I_CostCenter._Text,
I_CostCenter._CostCenterHierarchyNode,
I_CostCenter._Currency,
I_CostCenter._CompanyCode,
I_CostCenter._BusinessArea,
_ProfitCenter,
I_CostCenter._FunctionalArea,
I_CostCenter._CostCenterCategory,
I_CostCenter._Country,
I_CostCenter._Region,
I_CostCenter._CostingSheetProcedure,
I_CostCenter._Language,
I_CostCenter._UserRespContactCard,
I_CostCenter._UserCrtedContactCard,
I_CostCenter._ActivityBasedCostingTmplCpi,
I_CostCenter._ActivityBasedCostingTmplCpd,
I_CostCenter._ActivityBasedCostingTmplSci,
I_CostCenter._ActivityBasedCostingTmplScd,
I_CostCenter._ActivityBasedCostingTmplSki,
I_CostCenter._ActivityBasedCostingTmplSkd
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_BUSINESSAREA",
"I_BUSINESSAREATEXT",
"I_COMPANYCODE",
"I_CONTROLLINGAREA",
"I_COSTCENTER",
"I_COSTCENTERCATEGORY",
"I_COSTCENTERCATEGORYTEXT",
"I_COSTCENTERTEXT",
"I_COSTINGSHEETPROCEDURE",
"I_COSTINGSHEETPROCEDURETEXT",
"I_FUNCTIONALAREA",
"I_FUNCTIONALAREATEXT",
"I_PROFITCENTER",
"I_PROFITCENTERTEXT",
"I_USERCONTACTCARD"
],
"ASSOCIATED":
[
"I_ACTIVITYBASEDCOSTINGTMPL",
"I_BUSINESSAREA",
"I_COMPANYCODE",
"I_CONTROLLINGAREA",
"I_COSTCENTERCATEGORY",
"I_COSTCENTERHIERARCHYNODE",
"I_COSTCENTERTEXT",
"I_COSTINGSHEETPROCEDURE",
"I_COUNTRY",
"I_CURRENCY",
"I_FUNCTIONALAREA",
"I_LANGUAGE",
"I_PROFITCENTER",
"I_REGION",
"I_USERCONTACTCARD"
],
"BASE":
[
"I_COSTCENTER"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/