P_ENTERPRISEPROJECTCOSTS

CDS View

P_ENTERPRISEPROJECTCOSTS is a CDS View in S/4HANA. It contains 79 fields. 6 CDS views read from this table.

CDS Views using this table (6)

ViewTypeJoinVDMDescription
I_EnterpriseProjectCosts view from COMPOSITE Costs for Enterprise Projects
P_EntProjCostDates view from COMPOSITE
P_ProjectActualCostDates view from COMPOSITE
P_ProjectCostSum view from COMPOSITE
P_PROJECTFINBUDGETSMMRY view from COMPOSITE
P_ProjectPlanCostDates view from COMPOSITE

Fields (79)

KeyField CDS FieldsUsed in Views
KEY AccountingDocument AccountingDocument 2
KEY ActualPlanJournalEntryItem ActualPlanJournalEntryItem 2
KEY CompanyCode CompanyCode 2
KEY FinancialPlanningDataPacket FinancialPlanningDataPacket 2
KEY FinancialPlanningReqTransSqnc FinancialPlanningReqTransSqnc 2
KEY FiscalYear FiscalYear 4
KEY Ledger Ledger 2
KEY ProjectInternalID ProjectInternalID 6
KEY ProjectUUID ProjectUUID 2
KEY SourceLedger SourceLedger 2
AccountingDocCreatedByUser AccountingDocCreatedByUser 1
ActlCostInProjCrcy ActlCostInProjCrcy 2
ActualAmountInGlobalCurrency ActualAmountInGlobalCurrency 1
AmountInCompanyCodeCurrency AmountInCompanyCodeCurrency 1
AmountInGlobalCurrency AmountInGlobalCurrency 2
AmountInObjectCurrency AmountInObjectCurrency 1
AmountInTransactionCurrency AmountInTransactionCurrency 1
AvailabilityControlIsActive AvailabilityControlIsActive 2
AvailabilityControlProfile AvailabilityControlProfile 2
AvailyCtrlTimeRangeType AvailyCtrlTimeRangeType 2
BudgetCurrencyRole BudgetCurrencyRole 2
BusinessArea BusinessArea 1
BusinessTransactionType BusinessTransactionType 1
ChartOfAccounts ChartOfAccounts 1
CmtmtCostInGlobalCurrency CmtmtCostInGlobalCurrency 1
CmtmtCostInProjCrcy CmtmtCostInProjCrcy 1
CompanyCodeCurrency CompanyCodeCurrency 1
ControllingArea ControllingArea 2
ControllingDebitCreditCode ControllingDebitCreditCode 1
ControllingObjectCurrency ControllingObjectCurrency 1
CostCenter CostCenter 1
CostCtrActivityType CostCtrActivityType 1
CreationDate CreationDate 2
DebitCreditCode DebitCreditCode 1
FinancialPlanningEntryItem FinancialPlanningEntryItem 1
FiscalPeriod FiscalPeriod 3
FiscalYearPeriod FiscalYearPeriod 1
FiscalYearVariant FiscalYearVariant 1
FunctionalArea FunctionalArea 2
GLAccount GLAccount 1
GlobalCurrency GlobalCurrency 2
IsCommitment IsCommitment 1
IsSettled IsSettled 2
LedgerFiscalYear LedgerFiscalYear 1
LedgerGLLineItem LedgerGLLineItem 1
PartnerOrder PartnerOrder 1
PartnerOrderCategory PartnerOrderCategory 1
PartnerProject PartnerProject 1
PartnerWBSElement PartnerWBSElement 1
PlanAmountInGlobalCurrency BaselineAmtInGlobalCrcy,PlanAmountInGlobalCurrency 1
PlannedEndDate PlannedEndDate 2
PlannedStartDate PlannedStartDate 2
PlanningCategory PlanningCategory 2
PlndCostAmtInProjCrcy PlndCostAmtInProjCrcy 1
PostingDate PostingDate 2
ProcessingStatus ProcessingStatus 2
ProfitCenter ProfitCenter 2
Project Project 5
ProjectCategory ProjectCategory 2
ProjectDescription ProjectDescription 2
ProjectObject ProjectObject 2
ProjectObjectNode ProjectObjectNode 1
ProjectProfileCode ProjectProfileCode 2
ProjectSummaryTaskUUID ProjectSummaryTaskUUID 2
ProjectType ProjectType 2
ResponsibleCostCenter ResponsibleCostCenter 2
SemanticTag SemanticTag 2
SourceLogicalSystem SourceLogicalSystem 1
SourceReferenceDocSubitem SourceReferenceDocSubitem 1
SourceReferenceDocument SourceReferenceDocument 1
SourceReferenceDocumentCntxt SourceReferenceDocumentCntxt 1
SourceReferenceDocumentItem SourceReferenceDocumentItem 1
SourceReferenceDocumentType SourceReferenceDocumentType 1
TaskUUID TaskUUID 1
TransactionCurrency TransactionCurrency 1
WBSDescription WBSDescription 1
WBSElement WBSElement 1
WBSElementInternalID WBSElementInternalID 1
WBSElementProfitCenter WBSElementProfitCenter 1
@AbapCatalog.sqlViewName: 'PENTPRJCOST'
@VDM.viewType: #COMPOSITE
@AccessControl.authorizationCheck: #CHECK
@VDM.private:true
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog.buffering.status: #NOT_ALLOWED
@Metadata.ignorePropagatedAnnotations: true
@AbapCatalog.preserveKey:true
@AbapCatalog.compiler.compareFilter:true
define view P_EnterpriseProjectCosts
  as select from P_EnterpriseProjectCostsUnion as ProjCstLineItm
  association [0..1] to I_FiscalPeriodForVariant   as _FiscalPeriod on  _FiscalPeriod.FiscalYear        = $projection.LedgerFiscalYear
                                                                    and _FiscalPeriod.FiscalPeriod      = $projection.FiscalPeriod
                                                                    and _FiscalPeriod.FiscalYearVariant = $projection.FiscalYearVariant

  association [0..1] to I_EnterpriseProjectElement as _PPMTask      on  _PPMTask.WBSElementInternalID = $projection.WBSElementInternalID
{
  key ProjCstLineItm.SourceLedger,
  key ProjCstLineItm.Ledger,
  key ProjCstLineItm.CompanyCode,
  key ProjCstLineItm.FiscalYear,
  key ProjCstLineItm.AccountingDocument,
  key ProjCstLineItm.FinancialPlanningReqTransSqnc,
  key ProjCstLineItm.FinancialPlanningDataPacket,
  key ProjCstLineItm.ActualPlanJournalEntryItem,

      ProjCstLineItm.LedgerFiscalYear,
      ProjCstLineItm.LedgerGLLineItem,
      ProjCstLineItm.FinancialPlanningEntryItem,
      ProjCstLineItm.GLAccount,
      ProjCstLineItm.ChartOfAccounts,
      ProjCstLineItm.AccountingDocCreatedByUser,
      ProjCstLineItm.BusinessArea,
      ProjCstLineItm.CostCenter,
      //Sending Partner fields

      ProjCstLineItm.PartnerOrder,
      ProjCstLineItm.PartnerOrderCategory,
      ProjCstLineItm.PartnerWBSElement,
      ProjCstLineItm.PartnerProject,
      ProjCstLineItm.BusinessTransactionType,
      ProjCstLineItm.DebitCreditCode,
      ProjCstLineItm.ControllingDebitCreditCode,

      ProjCstLineItm.ProfitCenter,
      ProjCstLineItm.WBSElementProfitCenter,
      ProjCstLineItm.WBSDescription,
      ProjCstLineItm.ProjectObjectNode,

      ProjCstLineItm.ProjectType,
      ProjCstLineItm.SemanticTag,
      ProjCstLineItm.ProjectSummaryTaskUUID,
      ProjCstLineItm.ProjectUUID,
      ProjCstLineItm.ControllingArea,

      ProjCstLineItm.ProcessingStatus,
      ProjCstLineItm.Project,
      ProjCstLineItm.ProjectInternalID,
      ProjCstLineItm.WBSElement,
      ProjCstLineItm.ResponsibleCostCenter,
      ProjCstLineItm.ProjectDescription,
      ProjCstLineItm.ProjectProfileCode,

      ProjCstLineItm.ProjectObject,
      ProjCstLineItm.AvailabilityControlProfile,
      ProjCstLineItm.AvailabilityControlIsActive,
      ProjCstLineItm.AvailyCtrlTimeRangeType,
      ProjCstLineItm.BudgetCurrencyRole,

      ProjCstLineItm.WBSElementInternalID, //CE1908

      _PPMTask.ProjectElementUUID                as TaskUUID, //CE1908


      //'' as TaskUUID,

      ProjCstLineItm.CreationDate,
      ProjCstLineItm.FunctionalArea,
      ProjCstLineItm.CostCtrActivityType,

      @Semantics.currencyCode: true
      ProjCstLineItm.ControllingObjectCurrency,
      @DefaultAggregation: #SUM
      @Semantics.amount.currencyCode: 'ControllingObjectCurrency'
      ProjCstLineItm.AmountInObjectCurrency,


      @Semantics.currencyCode:true
      ProjCstLineItm.TransactionCurrency,
      @DefaultAggregation: #SUM
      @Semantics: { amount : {currencyCode: 'TransactionCurrency'} }
      ProjCstLineItm.AmountInTransactionCurrency,

      @Semantics.currencyCode:true
      ProjCstLineItm.CompanyCodeCurrency,
      @DefaultAggregation: #SUM
      @Semantics: { amount : {currencyCode: 'CompanyCodeCurrency'} }
      ProjCstLineItm.AmountInCompanyCodeCurrency,

      @Semantics.currencyCode:true
      ProjCstLineItm.GlobalCurrency,
      @DefaultAggregation: #SUM
      @Semantics: { amount : {currencyCode: 'GlobalCurrency'} }
      ProjCstLineItm.AmountInGlobalCurrency,

      @DefaultAggregation: #SUM
      @Semantics: { amount : {currencyCode: 'GlobalCurrency'} }
      ProjCstLineItm.ActualAmountInGlobalCurrency,

      @DefaultAggregation: #SUM
      @Semantics: { amount : {currencyCode: 'ControllingObjectCurrency'} }
      ProjCstLineItm.PlndCostAmtInProjCrcy,

      @DefaultAggregation: #SUM
      @Semantics: { amount : {currencyCode: 'GlobalCurrency'} }
      ProjCstLineItm.PlanAmountInGlobalCurrency,

      @DefaultAggregation: #SUM
      @Semantics: { amount : {currencyCode: 'GlobalCurrency'} }
      ProjCstLineItm.PlanAmountInGlobalCurrency as BaselineAmtInGlobalCrcy,

      @DefaultAggregation: #SUM
      @Semantics: { amount : {currencyCode: 'GlobalCurrency'} }
      ProjCstLineItm.CmtmtCostInGlobalCurrency,

      @DefaultAggregation: #SUM
      @Semantics: { amount : {currencyCode: 'ControllingObjectCurrency'} }
      ProjCstLineItm.CmtmtCostInProjCrcy,

      @DefaultAggregation: #SUM
      @Semantics: { amount : {currencyCode: 'ControllingObjectCurrency'} }
      ProjCstLineItm.ActlCostInProjCrcy,

//      @DefaultAggregation: #SUM

//      @Semantics: { amount : {currencyCode: 'GlobalCurrency'} }

//      ProjCstLineItm.ActlCmtmtCumltvAmtInGlobCrcy,



      @DefaultAggregation: #SUM
      @Semantics: { amount : {currencyCode: 'ControllingObjectCurrency'} }
      ProjCstLineItm.AssgdValForBudgetInProjCrcy,
      
      @Semantics: { amount : {currencyCode: 'GlobalCurrency'} }
      @DefaultAggregation: #SUM
      case
          when  PlanningCategory = 'PREDICT01' and AmountInGlobalCurrency > 0
              then AmountInGlobalCurrency
          else 0
      end                                                         as PredictedAmtInGlobalCurrency,

      @Semantics: { amount : {currencyCode: 'GlobalCurrency'} }
      @DefaultAggregation: #SUM
      case
          when  PlanningCategory = 'PREDICT02' and AmountInGlobalCurrency > 0
              then AmountInGlobalCurrency
          else 0
      end                                                         as LowerPredictionAmtInGlobCrcy,

      @Semantics: { amount : {currencyCode: 'GlobalCurrency'} }
      @DefaultAggregation: #SUM
      case
          when  PlanningCategory = 'PREDICT03'
              then AmountInGlobalCurrency
          else 0
      end                                                         as UpperPredictionAmtInGlobCrcy,
      
      @Semantics: { amount : {currencyCode: 'GlobalCurrency'} }
      @DefaultAggregation: #SUM
      case
          when  PlanningCategory = 'CMTMT' or PlanningCategory = 'ACT01'
              then AmountInGlobalCurrency
          else 0
      end                                                         as ActlCmtmtCumltvAmtInGlobCrcy,  
      
      ProjCstLineItm.ProjectCategory,
      ProjCstLineItm.PlannedStartDate,
      ProjCstLineItm.PlannedEndDate,
      ProjCstLineItm.PlanningCategory,
      ProjCstLineItm.PostingDate,
      ProjCstLineItm.FiscalPeriod,
      ProjCstLineItm.FiscalYearPeriod,
      ProjCstLineItm.FiscalYearVariant,
      ProjCstLineItm.IsSettled,

      ProjCstLineItm.SourceReferenceDocumentType,
      ProjCstLineItm.SourceLogicalSystem,
      ProjCstLineItm.SourceReferenceDocumentCntxt,
      ProjCstLineItm.SourceReferenceDocument,
      ProjCstLineItm.SourceReferenceDocumentItem,
      ProjCstLineItm.SourceReferenceDocSubitem,
      ProjCstLineItm.IsCommitment,

      _FiscalPeriod
      //_maintorder


}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_ENTERPRISEPROJECTELEMENT",
"P_ENTERPRISEPROJECTCOSTSUNION"
],
"ASSOCIATED":
[
"I_ENTERPRISEPROJECTELEMENT",
"I_FISCALPERIODFORVARIANT"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/