P_ProjCostAcctgLineItms

DDL: P_PROJCOSTACCTGLINEITMS SQL: PPRJBYPMOCST Type: view COMPOSITE

P_ProjCostAcctgLineItms is a Composite CDS View in SAP S/4HANA. It reads from 4 data sources (P_SEMTAGVERMAP, I_ControllingArea, I_ActualPlanJournalEntryItem, R_ProjectSemTagGLAccount) and exposes 85 fields with key fields SourceLedger, Ledger, CompanyCode, FiscalYear, AccountingDocument. It has 1 association to related views.

Data Sources (4)

SourceAliasJoin Type
P_SEMTAGVERMAP _ChildTag inner
I_ControllingArea _ContArea inner
I_ActualPlanJournalEntryItem _ProjCstLineItm from
R_ProjectSemTagGLAccount _SemTagGL inner

Associations (1)

CardinalityTargetAliasCondition
[0..1] I_FiscalPeriodForVariant _FiscalPeriod _FiscalPeriod.FiscalYear = $projection.LedgerFiscalYear and _FiscalPeriod.FiscalPeriod = $projection.FiscalPeriod and _FiscalPeriod.FiscalYearVariant = $projection.FiscalYearVariant

Annotations (12)

NameValueLevelField
AbapCatalog.sqlViewName PPRJBYPMOCST view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #CHECK view
AbapCatalog.buffering.status #NOT_ALLOWED view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #D view
VDM.viewType #COMPOSITE view
VDM.private true view
ClientHandling.algorithm #SESSION_VARIABLE view

Fields (85)

KeyFieldSource TableSource FieldDescription
KEY SourceLedger SourceLedger
KEY Ledger Ledger
KEY CompanyCode I_ActualPlanJournalEntryItem CompanyCode
KEY FiscalYear FiscalYear
KEY AccountingDocument AccountingDocument
KEY FinancialPlanningReqTransSqnc FinancialPlanningReqTransSqnc
KEY FinancialPlanningDataPacket FinancialPlanningDataPacket
KEY ActualPlanJournalEntryItem ActualPlanJournalEntryItem
LedgerFiscalYear LedgerFiscalYear
LedgerGLLineItem LedgerGLLineItem
FinancialPlanningEntryItem FinancialPlanningEntryItem
GLAccount I_ActualPlanJournalEntryItem GLAccount
ChartOfAccounts I_ActualPlanJournalEntryItem ChartOfAccounts
AccountingDocCreatedByUser AccountingDocCreatedByUser
GLAccountHierarchy R_ProjectSemTagGLAccount GLAccountHierarchy
BusinessArea BusinessArea
CostCenter I_ActualPlanJournalEntryItem CostCenter
PartnerOrder I_ActualPlanJournalEntryItem PartnerOrder_2
PartnerOrderCategory PartnerOrderCategory
PartnerWBSElement I_ActualPlanJournalEntryItem PartnerWBSElementExternalID
PartnerProject I_ActualPlanJournalEntryItem PartnerProjectExternalID
BusinessTransactionType BusinessTransactionType
DebitCreditCode DebitCreditCode
ControllingDebitCreditCode ControllingDebitCreditCode
ProfitCenter I_ActualPlanJournalEntryItem ProfitCenter
SemanticTag R_ProjectSemTagGLAccount SemanticTag
WBSElement I_ActualPlanJournalEntryItem WBSElementExternalID
ControllingArea I_ActualPlanJournalEntryItem ControllingArea
Project I_ActualPlanJournalEntryItem ProjectExternalID
ProjectInternalID I_ActualPlanJournalEntryItem ProjectInternalID
WBSElementInternalID I_ActualPlanJournalEntryItem WBSElementInternalID
CreationDate CreationDate
FunctionalArea I_ActualPlanJournalEntryItem FunctionalArea
CostCtrActivityType CostCtrActivityType
OrderID OrderID
OrderOperation OrderOperation
ControllingObjectCurrency ControllingObjectCurrency
AmountInObjectCurrency AmountInObjectCurrency
TransactionCurrency TransactionCurrency
AmountInTransactionCurrency AmountInTransactionCurrency
CompanyCodeCurrency CompanyCodeCurrency
AmountInCompanyCodeCurrency AmountInCompanyCodeCurrency
GlobalCurrency GlobalCurrency
AmountInGlobalCurrency AmountInGlobalCurrency
FreeDefinedCurrency1 FreeDefinedCurrency1
AmountInFreeDefinedCurrency1 AmountInFreeDefinedCurrency1
FreeDefinedCurrency2 FreeDefinedCurrency2
AmountInFreeDefinedCurrency2 AmountInFreeDefinedCurrency2
FreeDefinedCurrency3 FreeDefinedCurrency3
AmountInFreeDefinedCurrency3 AmountInFreeDefinedCurrency3
FreeDefinedCurrency4 FreeDefinedCurrency4
AmountInFreeDefinedCurrency4 AmountInFreeDefinedCurrency4
FreeDefinedCurrency5 FreeDefinedCurrency5
AmountInFreeDefinedCurrency5 AmountInFreeDefinedCurrency5
FreeDefinedCurrency6 FreeDefinedCurrency6
AmountInFreeDefinedCurrency6 AmountInFreeDefinedCurrency6
FreeDefinedCurrency7 FreeDefinedCurrency7
AmountInFreeDefinedCurrency7 AmountInFreeDefinedCurrency7
FreeDefinedCurrency8 FreeDefinedCurrency8
AmountInFreeDefinedCurrency8 AmountInFreeDefinedCurrency8
PlanningCategory I_ActualPlanJournalEntryItem PlanningCategory
PostingDate PostingDate
DocumentDate DocumentDate
FiscalPeriod FiscalPeriod
FiscalYearPeriod FiscalYearPeriod
FiscalYearVariant I_ActualPlanJournalEntryItem FiscalYearVariant
PartnerSalesDocument PartnerSalesDocument
PartnerProjectNetwork PartnerProjectNetwork
PartnerProjectNetworkActivity PartnerProjectNetworkActivity
PartnerBusinessProcess PartnerBusinessProcess
PartnerCostObject PartnerCostObject
SourceReferenceDocumentType SourceReferenceDocumentType
SourceLogicalSystem SourceLogicalSystem
SourceReferenceDocumentCntxt SourceReferenceDocumentCntxt
SourceReferenceDocument SourceReferenceDocument
SourceReferenceDocumentItem SourceReferenceDocumentItem
SourceReferenceDocSubitem SourceReferenceDocSubitem
IsCommitment IsCommitment
_ProjectBasicData _ProjectBasicData
CtrlgStdFinStatementVersion I_ControllingArea CtrlgStdFinStatementVersion
_FiscalPeriod _FiscalPeriod
IsLeadingLedger _Ledger IsLeadingLedger
_Ledger _Ledger
_MaintenanceOrder I_ActualPlanJournalEntryItem _MaintenanceOrder
_MaintenanceOrderOperation I_ActualPlanJournalEntryItem _MaintenanceOrderOperation
@AbapCatalog.sqlViewName: 'PPRJBYPMOCST'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@AbapCatalog.buffering.status: #NOT_ALLOWED
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.usageType.sizeCategory: #XXL
@ObjectModel.usageType.dataClass:  #MIXED
@ObjectModel.usageType.serviceQuality: #D
@VDM.viewType: #COMPOSITE
@VDM.private: true
@ClientHandling.algorithm: #SESSION_VARIABLE
define view P_ProjCostAcctgLineItms
  as select from I_ActualPlanJournalEntryItem as _ProjCstLineItm
    inner join   I_ControllingArea            as _ContArea on _ProjCstLineItm.ControllingArea = _ContArea.ControllingArea
    inner join   R_ProjectSemTagGLAccount     as _SemTagGL on  _ContArea.CtrlgStdFinStatementVersion = _SemTagGL.GLAccountHierarchy
                                                           and _SemTagGL.HierarchyNodeVal            = _ProjCstLineItm.GLAccount
                                                           and _ProjCstLineItm.ChartOfAccounts       = _SemTagGL.HierarchyNodeClass
    inner join   P_SEMTAGVERMAP               as _ChildTag on _SemTagGL.SemanticTag = _ChildTag.SemanticTag
  association [0..1] to I_FiscalPeriodForVariant as _FiscalPeriod on  _FiscalPeriod.FiscalYear        = $projection.LedgerFiscalYear
                                                                  and _FiscalPeriod.FiscalPeriod      = $projection.FiscalPeriod
                                                                  and _FiscalPeriod.FiscalYearVariant = $projection.FiscalYearVariant
{
  key SourceLedger,
  key Ledger,
  key _ProjCstLineItm.CompanyCode,
  key FiscalYear,
  key AccountingDocument,
  key FinancialPlanningReqTransSqnc,
  key FinancialPlanningDataPacket,
  key ActualPlanJournalEntryItem,
      LedgerFiscalYear,
      LedgerGLLineItem,
      FinancialPlanningEntryItem,
      _ProjCstLineItm.GLAccount,
      _ProjCstLineItm.ChartOfAccounts,
      AccountingDocCreatedByUser,
      _SemTagGL.GLAccountHierarchy,
      BusinessArea,
      _ProjCstLineItm.CostCenter,
      //Sending Partner fields


      // S/4 Hana CE2302- Field Deprecation - Begin

      //PartnerOrder,

      _ProjCstLineItm.PartnerOrder_2              as PartnerOrder,
      // S/4 Hana CE2302- Field Deprecation - Begin


      PartnerOrderCategory,

      // S/4 Hana CE2302- Field Deprecation - Begin

      //PartnerWBSElement,

      _ProjCstLineItm.PartnerWBSElementExternalID as PartnerWBSElement,

      //PartnerProject,

      _ProjCstLineItm.PartnerProjectExternalID    as PartnerProject,
      // S/4 Hana CE2302- Field Deprecation - End


      BusinessTransactionType,
      DebitCreditCode,
      ControllingDebitCreditCode,
      _ProjCstLineItm.ProfitCenter,
      _SemTagGL.SemanticTag,

      // S/4 Hana CE2302- Field Deprecation - Begin

      //_ProjCstLineItm.WBSElement,

      _ProjCstLineItm.WBSElementExternalID        as WBSElement,
      // S/4 Hana CE2302- Field Deprecation - end


      _ProjCstLineItm.ControllingArea,

      // S/4 Hana CE2302- Field Deprecation - Begin

      //_ProjCstLineItm.Project,

      _ProjCstLineItm.ProjectExternalID           as Project,
      // S/4 Hana CE2302- Field Deprecation - end



      _ProjCstLineItm.ProjectInternalID,
      _ProjCstLineItm.WBSElementInternalID, //CE1908

      CreationDate,
      _ProjCstLineItm.FunctionalArea,
      CostCtrActivityType,
      OrderID,
      OrderOperation,

      @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,

      @Semantics.currencyCode:true
      FreeDefinedCurrency1,
      @DefaultAggregation: #SUM
      @Semantics: { amount : {currencyCode: 'FreeDefinedCurrency1'} }
      AmountInFreeDefinedCurrency1,

      @Semantics.currencyCode:true
      FreeDefinedCurrency2,
      @DefaultAggregation: #SUM
      @Semantics: { amount : {currencyCode: 'FreeDefinedCurrency2'} }
      AmountInFreeDefinedCurrency2,

      @Semantics.currencyCode:true
      FreeDefinedCurrency3,
      @DefaultAggregation: #SUM
      @Semantics: { amount : {currencyCode: 'FreeDefinedCurrency3'} }
      AmountInFreeDefinedCurrency3,

      @Semantics.currencyCode:true
      FreeDefinedCurrency4,
      @DefaultAggregation: #SUM
      @Semantics: { amount : {currencyCode: 'FreeDefinedCurrency4'} }
      AmountInFreeDefinedCurrency4,

      @Semantics.currencyCode:true
      FreeDefinedCurrency5,
      @DefaultAggregation: #SUM
      @Semantics: { amount : {currencyCode: 'FreeDefinedCurrency5'} }
      AmountInFreeDefinedCurrency5,

      @Semantics.currencyCode:true
      FreeDefinedCurrency6,
      @DefaultAggregation: #SUM
      @Semantics: { amount : {currencyCode: 'FreeDefinedCurrency6'} }
      AmountInFreeDefinedCurrency6,

      @Semantics.currencyCode:true
      FreeDefinedCurrency7,
      @DefaultAggregation: #SUM
      @Semantics: { amount : {currencyCode: 'FreeDefinedCurrency7'} }
      AmountInFreeDefinedCurrency7,

      @Semantics.currencyCode:true
      FreeDefinedCurrency8,
      @DefaultAggregation: #SUM
      @Semantics: { amount : {currencyCode: 'FreeDefinedCurrency8'} }
      AmountInFreeDefinedCurrency8,

      _ProjCstLineItm.PlanningCategory,
      PostingDate,
      DocumentDate,
      FiscalPeriod,
      FiscalYearPeriod,
      _ProjCstLineItm.FiscalYearVariant,
      PartnerSalesDocument,
      PartnerProjectNetwork,
      PartnerProjectNetworkActivity,
      PartnerBusinessProcess,
      PartnerCostObject,
      SourceReferenceDocumentType,
      SourceLogicalSystem,
      SourceReferenceDocumentCntxt,
      SourceReferenceDocument,
      SourceReferenceDocumentItem,
      SourceReferenceDocSubitem,
      IsCommitment,
      _ProjectBasicData,
      _ContArea.CtrlgStdFinStatementVersion,
      _FiscalPeriod,
      _Ledger.IsLeadingLedger,
      _Ledger,
      _ProjCstLineItm._MaintenanceOrder,
      _ProjCstLineItm._MaintenanceOrderOperation
}

where

        _SemTagGL.GLAccountHierarchy          = _ContArea.CtrlgStdFinStatementVersion
  and   _ContArea.CtrlgStdFinStatementVersion is not initial
  and(
        _ProjCstLineItm.Project != ''
  )
  and(
        _SemTagGL.ValidityStartDate           <= $session.system_date
    and _SemTagGL.ValidityEndDate             >= $session.system_date
  )
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_ACTUALPLANJOURNALENTRYITEM",
"I_CONTROLLINGAREA",
"I_LEDGER",
"P_SEMTAGVERMAP",
"R_PROJECTSEMTAGGLACCOUNT"
],
"ASSOCIATED":
[
"I_FISCALPERIODFORVARIANT",
"I_LEDGER",
"I_MAINTENANCEORDER",
"I_MAINTENANCEORDEROPERATION",
"I_PROJECTBASICDATA"
],
"BASE":
[
"I_ACTUALPLANJOURNALENTRYITEM"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/