P_PPM_ProjectCostLineItem

DDL: P_PPM_PROJECTCOSTLINEITEM SQL: PPRJCSTLINEITEMN Type: view COMPOSITE

P_PPM_ProjectCostLineItem is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (P_ProjectCostLineItems) and exposes 70 fields with key fields Ledger, SourceLedger, CompanyCode, FiscalYear, AccountingDocument. It has 2 associations to related views.

Data Sources (1)

SourceAliasJoin Type
P_ProjectCostLineItems ActPlnJrlEtry from

Associations (2)

CardinalityTargetAliasCondition
[0..1] I_PPM_ProjectSummaryTask _ProjectSummary _ProjectSummary.ProjectInternalID = $projection.ProjectInternalID
[1..1] I_ProjectBudgetPlngCategory _BudgetPlnCat $projection.PlanningCategory = _BudgetPlnCat.PlanningCategory and _BudgetPlnCat.PlanningCatIsForAvailyCtrl = 'X'

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName PPRJCSTLINEITEMN view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
VDM.private true view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #D view
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #NOT_REQUIRED view
VDM.viewType #COMPOSITE view

Fields (70)

KeyFieldSource TableSource FieldDescription
KEY Ledger Ledger
KEY SourceLedger SourceLedger
KEY CompanyCode CompanyCode
KEY FiscalYear FiscalYear
KEY AccountingDocument AccountingDocument
KEY FinancialPlanningReqTransSqnc FinancialPlanningReqTransSqnc
KEY FinancialPlanningDataPacket FinancialPlanningDataPacket
KEY ActualPlanJournalEntryItem ActualPlanJournalEntryItem
FinancialPlanningEntryItem FinancialPlanningEntryItem
FiscalYearPeriod FiscalYearPeriod
SemanticTag SemanticTag
LedgerGLLineItem LedgerGLLineItem
LedgerFiscalYear LedgerFiscalYear
ControllingArea ControllingArea
GLAccount GLAccount
ChartOfAccounts ChartOfAccounts
AccountingDocCreatedByUser AccountingDocCreatedByUser
BusinessArea BusinessArea
ProfitCenter ProfitCenter
WBSElementProfitCenter WBSElementProfitCenter
CostCenter CostCenter
FunctionalArea FunctionalArea
CostCtrActivityType CostCtrActivityType
Project Project
ProjectInternalID ProjectInternalID
ProjectDescription ProjectDescription
ProjectObjectNode ProjectObjectNode
ProjectProfileCode ProjectProfileCode
ProjectObject ProjectObject
ProjectUUID _ProjectSummary ProjectUUID
ProjectCategory _ProjectSummary ProjectCategory
ProjectSummaryTaskUUID _ProjectSummary ProjectSummaryTaskUUID
ProjectProcessingStatus _ProjectSummary ProjectProcessingStatus
AvailabilityControlIsActive AvailabilityControlIsActive
AvailabilityControlProfile AvailabilityControlProfile
AvailyCtrlTimeRangeType AvailyCtrlTimeRangeType
BudgetCurrencyRole BudgetCurrencyRole
WBSElement
WBSDescription WBSDescription
ResponsibleCostCenter ResponsibleCostCenter
WBSElementInternalID WBSElementInternalID
ProjectType P_ProjectCostLineItems ProjectType
SourceReferenceDocumentType SourceReferenceDocumentType
SourceLogicalSystem SourceLogicalSystem
SourceReferenceDocumentCntxt SourceReferenceDocumentCntxt
SourceReferenceDocument SourceReferenceDocument
SourceReferenceDocumentItem SourceReferenceDocumentItem
SourceReferenceDocSubitem SourceReferenceDocSubitem
IsCommitment IsCommitment
PartnerOrder PartnerOrder
PartnerOrderCategory PartnerOrderCategory
PartnerWBSElement PartnerWBSElement
PartnerProject PartnerProject
BusinessTransactionType BusinessTransactionType
DebitCreditCode DebitCreditCode
FiscalPeriod FiscalPeriod
FiscalYearVariant FiscalYearVariant
PlanningCategory PlanningCategory
ControllingObjectCurrency ControllingObjectCurrency
AmountInObjectCurrency AmountInObjectCurrency
TransactionCurrency TransactionCurrency
AmountInTransactionCurrency AmountInTransactionCurrency
CompanyCodeCurrency CompanyCodeCurrency
AmountInCompanyCodeCurrency AmountInCompanyCodeCurrency
GlobalCurrency GlobalCurrency
AmountInGlobalCurrency AmountInGlobalCurrency
ActualAmountInGlobalCurrency ActualAmountInGlobalCurrency
PlanAmountInGlobalCurrency PlanAmountInGlobalCurrency
BaselineAmtInGlobalCrcy BaselineAmtInGlobalCrcy
_FiscalPeriod _FiscalPeriod
@AbapCatalog.sqlViewName: 'PPRJCSTLINEITEMN'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@VDM.private:true
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel: {
  usageType:{ sizeCategory: #XXL,
              dataClass:  #MIXED,
              serviceQuality: #D
   }
  }
@AccessControl.authorizationCheck: #CHECK
@AccessControl.personalData.blocking: #NOT_REQUIRED
//@EndUserText.label: 'prep view to get cost data'

@VDM.viewType: #COMPOSITE
define view P_PPM_ProjectCostLineItem
  as select from P_ProjectCostLineItems as ActPlnJrlEtry
  association [0..1] to I_PPM_ProjectSummaryTask    as _ProjectSummary on  _ProjectSummary.ProjectInternalID = $projection.ProjectInternalID
  association [1..1] to I_ProjectBudgetPlngCategory as _BudgetPlnCat   on  $projection.PlanningCategory             = _BudgetPlnCat.PlanningCategory
                                                                       and _BudgetPlnCat.PlanningCatIsForAvailyCtrl = 'X'

{
  key Ledger,
  key SourceLedger,
  key CompanyCode,
  key FiscalYear,
  key AccountingDocument,
  key FinancialPlanningReqTransSqnc,
  key FinancialPlanningDataPacket,
  key ActualPlanJournalEntryItem,
      FinancialPlanningEntryItem,
      FiscalYearPeriod,
      SemanticTag,
      LedgerGLLineItem,
      LedgerFiscalYear,
      ControllingArea,

      GLAccount,
      ChartOfAccounts,
      AccountingDocCreatedByUser,

      BusinessArea,
      ProfitCenter,
      WBSElementProfitCenter,
      CostCenter,
      FunctionalArea,
      CostCtrActivityType,

      Project,
      //_ProjectBasicData.Project,


      ProjectInternalID,
      ProjectDescription,
      ProjectObjectNode,
      //      case

      //      when OrderID is not initial

      //      then OrderID

      //      else ProjectObjectNode end                                  as ProjectObjectNode,

      ProjectProfileCode,
      ProjectObject,

      _ProjectSummary.ProjectUUID,
      _ProjectSummary.ProjectCategory,
      _ProjectSummary.ProjectSummaryTaskUUID,
      _ProjectSummary.ProjectProcessingStatus,

      //      case

      //      when OrderID is not initial

      //      then  'X'

      //      else '' end                                                 as IncludePmOrder,


      AvailabilityControlIsActive,
      AvailabilityControlProfile,
      AvailyCtrlTimeRangeType,
      BudgetCurrencyRole,

      cast( WBSElement as /s4ppm/tv_external_id preserving type ) as WBSElement,
      WBSDescription,
      ResponsibleCostCenter,
      WBSElementInternalID,

      //CE2005 Projecttype as a filter

      ActPlnJrlEtry.ProjectType,

      //Commitment fields

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

      //Sending Partner fields

      PartnerOrder,
      PartnerOrderCategory,
      PartnerWBSElement,
      PartnerProject,
      BusinessTransactionType,
      DebitCreditCode,


      FiscalPeriod,
      FiscalYearVariant,

      PlanningCategory,

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

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

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

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

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

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

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

      @DefaultAggregation: #SUM
      @Semantics: { amount : {currencyCode: 'GlobalCurrency'} }
      BaselineAmtInGlobalCrcy,


      // _Project,

      //  _WBSElement,

      _FiscalPeriod
}
where
      ActPlnJrlEtry.GlobalCurrency <> ''
  and ActPlnJrlEtry.IsCommitment   <> 'X'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_PPM_PROJECTSUMMARYTASK",
"P_PROJECTCOSTLINEITEMS"
],
"ASSOCIATED":
[
"I_FISCALYEARPERIODFORCMPNYCODE",
"I_PPM_PROJECTSUMMARYTASK",
"I_PROJECTBUDGETPLNGCATEGORY"
],
"BASE":
[
"P_PROJECTCOSTLINEITEMS"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/