P_CostCenter

DDL: P_COSTCENTER SQL: PFICOSTCENTER Type: view COMPOSITE

P_CostCenter is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (I_CostCenter) and exposes 113 fields with key fields ControllingArea, CostCenter, ValidityEndDate. It has 1 association to related views.

Data Sources (1)

SourceAliasJoin Type
I_CostCenter I_CostCenter from

Associations (1)

CardinalityTargetAliasCondition
[0..*] I_ProfitCenter _ProfitCenter _ProfitCenter.ControllingArea = $projection.ControllingArea and _ProfitCenter.ProfitCenter = $projection.ProfitCenter and _ProfitCenter.ValidityStartDate < $projection.ValidityEndDate and _ProfitCenter.ValidityEndDate >= $projection.ValidityEndDate

Annotations (12)

NameValueLevelField
AbapCatalog.sqlViewName PFICOSTCENTER view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #REQUIRED view
VDM.private true view
VDM.viewType #COMPOSITE view
ObjectModel.usageType.dataClass #ORGANIZATIONAL view
ObjectModel.usageType.serviceQuality #A view
ObjectModel.usageType.sizeCategory #L view
Metadata.ignorePropagatedAnnotations true view
ClientHandling.algorithm #SESSION_VARIABLE view

Fields (113)

KeyFieldSource TableSource FieldDescription
KEY ControllingArea I_CostCenter ControllingArea
KEY CostCenter I_CostCenter CostCenter
KEY ValidityEndDate I_CostCenter ValidityEndDate
ValidityStartDate I_CostCenter ValidityStartDate
IsBlkdForPrimaryCostsPosting
IsBlockedForPlanPrimaryCosts
CompanyCode I_CostCenter CompanyCode
BusinessArea I_CostCenter BusinessArea
CostCenterCategory I_CostCenter CostCenterCategory
CostCtrResponsiblePersonName I_CostCenter CostCtrResponsiblePersonName
CostCtrResponsibleUser I_CostCenter CostCtrResponsibleUser
CostCenterCurrency I_CostCenter CostCenterCurrency
CostingSheet I_CostCenter CostingSheet
TaxJurisdiction I_CostCenter TaxJurisdiction
ProfitCenter I_CostCenter ProfitCenter
Plant I_CostCenter Plant
LogicalSystem I_CostCenter LogicalSystem
CostCenterCreationDate
CostCenterCreatedByUser
IsBlkdForSecondaryCostsPosting
IsBlockedForRevenuePosting
IsBlockedForCommitmentPosting
IsBlockedForPlanSecondaryCosts
IsBlockedForPlanRevenues
CostCenterAllocationMethod I_CostCenter CostCenterAllocationMethod
ConsumptionQtyIsRecorded I_CostCenter ConsumptionQtyIsRecorded
Department I_CostCenter Department
SubsequentCostCenter I_CostCenter SubsequentCostCenter
ConditionUsage I_CostCenter ConditionUsage
ConditionApplication I_CostCenter ConditionApplication
CostCenterAccountingOverhead I_CostCenter CostCenterAccountingOverhead
Country
FormOfAddress I_CostCenter FormOfAddress
AddressName
AddressAdditionalName I_CostCenter AddressAdditionalName
CostCenterAddrName3 I_CostCenter CostCenterAddrName3
CostCenterAddrName4 I_CostCenter CostCenterAddrName4
CityName I_CostCenter CityName
District I_CostCenter District
StreetAddressName I_CostCenter StreetAddressName
POBox I_CostCenter POBox
PostalCode I_CostCenter PostalCode
POBoxPostalCode I_CostCenter POBoxPostalCode
Region I_CostCenter Region
Language I_CostCenter Language
TeleboxNumber I_CostCenter TeleboxNumber
PhoneNumber1
PhoneNumber2 I_CostCenter PhoneNumber2
FaxNumber I_CostCenter FaxNumber
TeletexNumber I_CostCenter TeletexNumber
TelexNumber I_CostCenter TelexNumber
DataCommunicationPhoneNumber I_CostCenter DataCommunicationPhoneNumber
CostCenterPrinterDestination
CostCenterStandardHierArea
CostCollector I_CostCenter CostCollector
CostCenterIsComplete I_CostCenter CostCenterIsComplete
IsStatisticalCostCenter I_CostCenter IsStatisticalCostCenter
ObjectInternalID I_CostCenter ObjectInternalID
CostCenterFunction I_CostCenter CostCenterFunction
CostCenterAlternativeFunction I_CostCenter CostCenterAlternativeFunction
FunctionalArea I_CostCenter FunctionalArea
CostCenterName
CostCenterDescription
ControllingAreaName
CostCenterCategoryName
CompanyCodeName
BusinessAreaName
FunctionalAreaName
CostingSheetProcedureDesc
ProfitCenterName
ResponsibleUserFullName
CreatedByUserFullName
ActyIndepFormulaPlanningTmpl
ActyDepdntFormulaPlanningTmpl
ActyIndependentAllocationTmpl
ActyDependentAllocationTmpl
ActlIndepStatisticalKeyFigures
ActlDepStatisticalKeyFigures
JointVenture JointVenture
JointVentureRecoveryCode JointVentureRecoveryCode
JointVentureEquityType JointVentureEquityType
JointVentureObjectType JointVentureObjectType
JointVentureClass JointVentureClass
JointVentureSubClass JointVentureSubClass
BudgetCarryingCostCenter
AvailabilityControlProfile
AvailabilityControlIsActive
Fund Fund
GrantID GrantID
FundIsFixAssigned FundIsFixAssigned
GrantIDIsFixAssigned GrantIDIsFixAssigned
FunctionalAreaIsFixAssigned FunctionalAreaIsFixAssigned
_ControllingArea I_CostCenter _ControllingArea
_Text I_CostCenter _Text
_CostCenterHierarchyNode I_CostCenter _CostCenterHierarchyNode
_Currency I_CostCenter _Currency
_CompanyCode I_CostCenter _CompanyCode
_BusinessArea I_CostCenter _BusinessArea
_ProfitCenter _ProfitCenter
_FunctionalArea I_CostCenter _FunctionalArea
_CostCenterCategory I_CostCenter _CostCenterCategory
_Country I_CostCenter _Country
_Region I_CostCenter _Region
_CostingSheetProcedure I_CostCenter _CostingSheetProcedure
_Language I_CostCenter _Language
_UserRespContactCard I_CostCenter _UserRespContactCard
_UserCrtedContactCard I_CostCenter _UserCrtedContactCard
_ActivityBasedCostingTmplCpi I_CostCenter _ActivityBasedCostingTmplCpi
_ActivityBasedCostingTmplCpd I_CostCenter _ActivityBasedCostingTmplCpd
_ActivityBasedCostingTmplSci I_CostCenter _ActivityBasedCostingTmplSci
_ActivityBasedCostingTmplScd I_CostCenter _ActivityBasedCostingTmplScd
_ActivityBasedCostingTmplSki I_CostCenter _ActivityBasedCostingTmplSki
_ActivityBasedCostingTmplSkd I_CostCenter _ActivityBasedCostingTmplSkd
@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":""
}
}*/