Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.
-- Derived SQL interpretation of CDS view P_CostCenter.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.
-- SQL view name: PFICOSTCENTER
CREATE VIEW P_CostCenter AS
SELECT
I_CostCenter.ControllingArea AS ControllingArea,
I_CostCenter.CostCenter AS CostCenter,
I_CostCenter.ValidityEndDate AS ValidityEndDate,
I_CostCenter.ValidityStartDate AS 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,
I_CostCenter.CompanyCode AS CompanyCode,
I_CostCenter.BusinessArea AS BusinessArea,
I_CostCenter.CostCenterCategory AS CostCenterCategory,
I_CostCenter.CostCtrResponsiblePersonName AS CostCtrResponsiblePersonName,
I_CostCenter.CostCtrResponsibleUser AS CostCtrResponsibleUser,
I_CostCenter.CostCenterCurrency AS CostCenterCurrency,
I_CostCenter.CostingSheet AS CostingSheet,
I_CostCenter.TaxJurisdiction AS TaxJurisdiction,
I_CostCenter.ProfitCenter AS ProfitCenter,
I_CostCenter.Plant AS Plant,
I_CostCenter.LogicalSystem AS LogicalSystem,
cast(I_CostCenter.CostCenterCreationDate as fis_cc_erfdt preserving type ) AS CostCenterCreationDate,
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 AS CostCenterAllocationMethod,
I_CostCenter.ConsumptionQtyIsRecorded AS ConsumptionQtyIsRecorded,
I_CostCenter.Department AS Department,
I_CostCenter.SubsequentCostCenter AS SubsequentCostCenter,
I_CostCenter.ConditionUsage AS ConditionUsage,
I_CostCenter.ConditionApplication AS ConditionApplication,
I_CostCenter.CostCenterAccountingOverhead AS CostCenterAccountingOverhead,
cast(I_CostCenter.Country as fis_land1 preserving type ) AS Country,
I_CostCenter.FormOfAddress AS FormOfAddress,
cast(I_CostCenter.AddressName as fco_cc_addressname preserving type ) AS AddressName,
I_CostCenter.AddressAdditionalName AS AddressAdditionalName,
I_CostCenter.CostCenterAddrName3 AS CostCenterAddrName3,
I_CostCenter.CostCenterAddrName4 AS CostCenterAddrName4,
I_CostCenter.CityName AS CityName,
I_CostCenter.District AS District,
I_CostCenter.StreetAddressName AS StreetAddressName,
I_CostCenter.POBox AS POBox,
I_CostCenter.PostalCode AS PostalCode,
I_CostCenter.POBoxPostalCode AS POBoxPostalCode,
I_CostCenter.Region AS Region,
I_CostCenter.Language AS Language,
I_CostCenter.TeleboxNumber AS TeleboxNumber,
cast(I_CostCenter.PhoneNumber1 as fco_cc_telf1 preserving type ) AS PhoneNumber1,
I_CostCenter.PhoneNumber2 AS PhoneNumber2,
I_CostCenter.FaxNumber AS FaxNumber,
I_CostCenter.TeletexNumber AS TeletexNumber,
I_CostCenter.TelexNumber AS TelexNumber,
I_CostCenter.DataCommunicationPhoneNumber AS 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 AS CostCollector,
I_CostCenter.CostCenterIsComplete AS CostCenterIsComplete,
I_CostCenter.IsStatisticalCostCenter AS IsStatisticalCostCenter,
I_CostCenter.ObjectInternalID AS ObjectInternalID,
I_CostCenter.CostCenterFunction AS CostCenterFunction,
I_CostCenter.CostCenterAlternativeFunction AS CostCenterAlternativeFunction,
I_CostCenter.FunctionalArea AS 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,
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 AS 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 AS 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,
cast( ActyIndepFormulaPlanningTmpl as fco_cca_templ_cpi preserving type ) AS ActyIndepFormulaPlanningTmpl,
cast ( ActyDepdntFormulaPlanningTmpl as fco_cca_templ_cpd preserving type ) AS ActyDepdntFormulaPlanningTmpl,
cast ( ActyIndependentAllocationTmpl as fco_cca_templ_sci preserving type ) AS ActyIndependentAllocationTmpl,
cast ( ActyDependentAllocationTmpl as fco_cca_templ_scd preserving type ) AS ActyDependentAllocationTmpl,
cast ( ActlIndepStatisticalKeyFigures as fco_cca_templ_ski preserving type ) AS ActlIndepStatisticalKeyFigures,
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 AS _ControllingArea,
I_CostCenter._Text AS _Text,
I_CostCenter._CostCenterHierarchyNode AS _CostCenterHierarchyNode,
I_CostCenter._Currency AS _Currency,
I_CostCenter._CompanyCode AS _CompanyCode,
I_CostCenter._BusinessArea AS _BusinessArea,
I_CostCenter._FunctionalArea AS _FunctionalArea,
I_CostCenter._CostCenterCategory AS _CostCenterCategory,
I_CostCenter._Country AS _Country,
I_CostCenter._Region AS _Region,
I_CostCenter._CostingSheetProcedure AS _CostingSheetProcedure,
I_CostCenter._Language AS _Language,
I_CostCenter._UserRespContactCard AS _UserRespContactCard,
I_CostCenter._UserCrtedContactCard AS _UserCrtedContactCard,
I_CostCenter._ActivityBasedCostingTmplCpi AS _ActivityBasedCostingTmplCpi,
I_CostCenter._ActivityBasedCostingTmplCpd AS _ActivityBasedCostingTmplCpd,
I_CostCenter._ActivityBasedCostingTmplSci AS _ActivityBasedCostingTmplSci,
I_CostCenter._ActivityBasedCostingTmplScd AS _ActivityBasedCostingTmplScd,
I_CostCenter._ActivityBasedCostingTmplSki AS _ActivityBasedCostingTmplSki,
I_CostCenter._ActivityBasedCostingTmplSkd AS _ActivityBasedCostingTmplSkd
FROM I_CostCenter
LEFT OUTER JOIN I_ProfitCenter AS _ProfitCenter ON _ProfitCenter.ControllingArea = ControllingArea AND _ProfitCenter.ProfitCenter = ProfitCenter AND _ProfitCenter.ValidityStartDate < ValidityEndDate AND _ProfitCenter.ValidityEndDate >= ValidityEndDate -- association [0..*]
;