P_ProjectStockCostLineItem
Project Stock Cost line item
P_ProjectStockCostLineItem is a Composite CDS View that provides data about "Project Stock Cost line item" in SAP S/4HANA. It reads from 4 data sources (P_IsLeadingLedger, I_ProjectBasicData, P_ProjectStockAcctSemanticTag, I_LedgerSourceLedger) and exposes 73 fields with key fields SourceLedger, Ledger, CompanyCode, FiscalYear, AccountingDocument.
Data Sources (4)
| Source | Alias | Join Type |
|---|---|---|
| P_IsLeadingLedger | _Ledger | inner |
| I_ProjectBasicData | _Project | from |
| P_ProjectStockAcctSemanticTag | _SemanticTag | inner |
| I_LedgerSourceLedger | _SourceLedger | inner |
Annotations (13)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PPRJBYPRJSTCKCST | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | 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 | |
| EndUserText.label | Project Stock Cost line item | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view |
Fields (73)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | SourceLedger | _ProjCstLineItm | SourceLedger | |
| KEY | Ledger | I_LedgerSourceLedger | Ledger | |
| KEY | CompanyCode | _ProjCstLineItm | CompanyCode | |
| KEY | FiscalYear | _ProjCstLineItm | FiscalYear | |
| KEY | AccountingDocument | _ProjCstLineItm | AccountingDocument | |
| FinancialPlanningReqTransSqnc | ||||
| FinancialPlanningDataPacket | ||||
| ActualPlanJournalEntryItem | ||||
| LedgerFiscalYear | _ProjCstLineItm | LedgerFiscalYear | ||
| LedgerGLLineItem | _ProjCstLineItm | LedgerGLLineItem | ||
| FinancialPlanningEntryItem | ||||
| ActualPlanCode | ||||
| GLAccountHierarchy | P_ProjectStockAcctSemanticTag | GLAccountHierarchy | ||
| AccountingDocCreatedByUser | _ProjCstLineItm | AccountingDocCreatedByUser | ||
| BusinessArea | _ProjCstLineItm | BusinessArea | ||
| PartnerOrder | _ProjCstLineItm | PartnerOrder | ||
| OrderID | _ProjCstLineItm | OrderID | ||
| OrderOperation | _ProjCstLineItm | OrderOperation | ||
| MaintenanceOrderDesc | ||||
| PartnerAccountAssignmentType | _ProjCstLineItm | PartnerAccountAssignmentType | ||
| OperationDescription | ||||
| PartnerOrderCategory | _ProjCstLineItm | PartnerOrderCategory | ||
| PartnerWBSElement | ||||
| PartnerProject | ||||
| BusinessTransactionType | _ProjCstLineItm | BusinessTransactionType | ||
| DebitCreditCode | _ProjCstLineItm | DebitCreditCode | ||
| ControllingDebitCreditCode | _ProjCstLineItm | ControllingDebitCreditCode | ||
| WBSElement | _WBS | WBSElementExternalID | ||
| Project | I_ProjectBasicData | ProjectExternalID | ||
| ProjectInternalID | I_ProjectBasicData | ProjectInternalID | ||
| WBSElementInternalID | _ProjCstLineItm | WBSElementInternalID | ||
| ControllingArea | _ProjCstLineItm | ControllingArea | ||
| GLAccount | _ProjCstLineItm | GLAccount | ||
| ChartOfAccounts | _ProjCstLineItm | ChartOfAccounts | ||
| CostCenter | _ProjCstLineItm | CostCenter | ||
| ProfitCenter | _ProjCstLineItm | ProfitCenter | ||
| CreationDate | _ProjCstLineItm | CreationDate | ||
| FunctionalArea | _ProjCstLineItm | FunctionalArea | ||
| CostCtrActivityType | _ProjCstLineItm | CostCtrActivityType | ||
| ControllingObjectCurrency | _ProjCstLineItm | ControllingObjectCurrency | ||
| TransactionCurrency | _ProjCstLineItm | TransactionCurrency | ||
| CompanyCodeCurrency | _ProjCstLineItm | CompanyCodeCurrency | ||
| FunctionalCurrency | _ProjCstLineItm | FunctionalCurrency | ||
| GlobalCurrency | _ProjCstLineItm | GlobalCurrency | ||
| AmountInGlobalCurrency | _ProjCstLineItm | AmountInGlobalCurrency | ||
| PrjStockAmountInGlobalCurrency | _ProjCstLineItm | AmountInGlobalCurrency | ||
| SourceReferenceDocumentType | _ProjCstLineItm | SourceReferenceDocumentType | ||
| SourceLogicalSystem | _ProjCstLineItm | SourceLogicalSystem | ||
| SourceReferenceDocumentCntxt | _ProjCstLineItm | SourceReferenceDocumentCntxt | ||
| SourceReferenceDocument | _ProjCstLineItm | SourceReferenceDocument | ||
| SourceReferenceDocumentItem | _ProjCstLineItm | SourceReferenceDocumentItem | ||
| SourceReferenceDocSubitem | _ProjCstLineItm | SourceReferenceDocSubitem | ||
| IsCommitment | _ProjCstLineItm | IsCommitment | ||
| PlanningCategory | ||||
| PostingDate | _ProjCstLineItm | PostingDate | ||
| DocumentDate | _ProjCstLineItm | DocumentDate | ||
| FiscalPeriod | _ProjCstLineItm | FiscalPeriod | ||
| FiscalYearPeriod | _ProjCstLineItm | FiscalYearPeriod | ||
| FiscalYearVariant | _ProjCstLineItm | FiscalYearVariant | ||
| MaintenanceOrderIsSelected | ||||
| SemanticTag | P_ProjectStockAcctSemanticTag | SemanticTag | ||
| WBSElementProfitCenter | _WBS | ProfitCenter | ||
| WBSDescription | _WBS | WBSDescription | ||
| ProjectObjectNode | _WBS | WBSElementObject | ||
| ResponsibleCostCenter | _WBS | ResponsibleCostCenter | ||
| ProjectType | _WBS | ProjectType | ||
| ProjectDescription | I_ProjectBasicData | ProjectDescription | ||
| ProjectProfileCode | I_ProjectBasicData | ProjectProfileCode | ||
| ProjectObject | I_ProjectBasicData | ProjectObject | ||
| AvailabilityControlProfile | I_ProjectBasicData | AvailabilityControlProfile | ||
| AvailabilityControlIsActive | I_ProjectBasicData | AvailabilityControlIsActive | ||
| AvailyCtrlTimeRangeType | ||||
| BudgetCurrencyRole |
@AbapCatalog.sqlViewName: 'PPRJBYPRJSTCKCST'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@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
@EndUserText.label: 'Project Stock Cost line item'
@ClientHandling.algorithm: #SESSION_VARIABLE
define view P_ProjectStockCostLineItem as select from I_ProjectBasicData as _Project
left outer to many join I_WBSElementBasicData as _WBS on _Project.ProjectInternalID = _WBS.ProjectInternalID
left outer to many join I_GLAccountLineItemRawData as _ProjCstLineItm //I_ProjectBasicData as _Project
on ( _ProjCstLineItm.ProjectInternalID = _Project.ProjectInternalID
or _ProjCstLineItm.Project = _Project.Project )
and _WBS.ProjectInternalID = _Project.ProjectInternalID
and _ProjCstLineItm.WBSElementInternalID = _WBS.WBSElementInternalID
inner join I_LedgerSourceLedger as _SourceLedger on _ProjCstLineItm.SourceLedger = _SourceLedger.SourceLedger
inner join P_IsLeadingLedger as _Ledger on _SourceLedger.Ledger = _Ledger.Ledger
inner join P_ProjectStockAcctSemanticTag as _SemanticTag on _SemanticTag.ControllingArea = _ProjCstLineItm.ControllingArea
and _SemanticTag.HierarchyNodeVal = _ProjCstLineItm.GLAccount
and _SemanticTag.HierarchyNodeClass = _ProjCstLineItm.ChartOfAccounts
{
key _ProjCstLineItm.SourceLedger, //key
key _SourceLedger.Ledger, //key
key _ProjCstLineItm.CompanyCode, //key
key _ProjCstLineItm.FiscalYear,
key _ProjCstLineItm.AccountingDocument, //key
cast(cast( '00000000000000000000000' as abap.numc (23)) as fis_fp_request_tsn ) as FinancialPlanningReqTransSqnc,
cast(cast( '000000' as abap.numc (6)) as fis_fp_data_packet ) as FinancialPlanningDataPacket,
// field ActualPlanJournalEntryItem required for representative key definition
cast( LedgerGLLineItem as fis_act_pln_docln) as ActualPlanJournalEntryItem,
_ProjCstLineItm.LedgerFiscalYear,
_ProjCstLineItm.LedgerGLLineItem,
@DefaultAggregation: #NONE
cast(cast( 0 as abap.int4 ) as fis_fp_entry_item ) as FinancialPlanningEntryItem,
cast(cast( 'A' as abap.char (1)) as fis_actual_plan_code) as ActualPlanCode,
_SemanticTag.GLAccountHierarchy,
_ProjCstLineItm.AccountingDocCreatedByUser,
_ProjCstLineItm.BusinessArea,
//Sending Partner fields
_ProjCstLineItm.PartnerOrder,
_ProjCstLineItm.OrderID,
_ProjCstLineItm.OrderOperation,
//S/4HANA CE2108 - Maintenance Order enablement-Begin
' ' as MaintenanceOrderDesc,
//_ProjCstLineItm._Order.OrderDescription as MaintenanceOrderDesc,
_ProjCstLineItm.PartnerAccountAssignmentType,
//S/4HANA CE2108 - Maintenance Order enablement-End
'' as OperationDescription,
_ProjCstLineItm.PartnerOrderCategory,
// S/4 Hana CE2302- Field Deprecation - Begin
// _ProjCstLineItm.PartnerWBSElement,
_ProjCstLineItm._PartnerWBSElementBasicData.WBSElementExternalID as PartnerWBSElement,
// _ProjCstLineItm.PartnerProject,
_ProjCstLineItm._PartnerProjectBasicData.ProjectExternalID as PartnerProject,
// S/4 Hana CE2302- Field Deprecation - End
_ProjCstLineItm.BusinessTransactionType,
_ProjCstLineItm.DebitCreditCode,
_ProjCstLineItm.ControllingDebitCreditCode,
_WBS.WBSElementExternalID as WBSElement,
_Project.ProjectExternalID as Project,
_Project.ProjectInternalID as ProjectInternalID,
_ProjCstLineItm.WBSElementInternalID as WBSElementInternalID,
_ProjCstLineItm.ControllingArea,
_ProjCstLineItm.GLAccount,
_ProjCstLineItm.ChartOfAccounts,
_ProjCstLineItm.CostCenter,
_ProjCstLineItm.ProfitCenter,
_ProjCstLineItm.CreationDate,
_ProjCstLineItm.FunctionalArea,
_ProjCstLineItm.CostCtrActivityType,
@Semantics.currencyCode: true
_ProjCstLineItm.ControllingObjectCurrency,
@Semantics.currencyCode:true
_ProjCstLineItm.TransactionCurrency,
@Semantics.currencyCode:true
_ProjCstLineItm.CompanyCodeCurrency,
@Semantics.currencyCode: true
_ProjCstLineItm.FunctionalCurrency,
@Semantics.currencyCode:true
_ProjCstLineItm.GlobalCurrency,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'GlobalCurrency'} }
_ProjCstLineItm.AmountInGlobalCurrency,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'GlobalCurrency'} }
_ProjCstLineItm.AmountInGlobalCurrency as PrjStockAmountInGlobalCurrency,
_ProjCstLineItm.SourceReferenceDocumentType,
_ProjCstLineItm.SourceLogicalSystem,
_ProjCstLineItm.SourceReferenceDocumentCntxt,
_ProjCstLineItm.SourceReferenceDocument,
_ProjCstLineItm.SourceReferenceDocumentItem,
_ProjCstLineItm.SourceReferenceDocSubitem,
_ProjCstLineItm.IsCommitment,
case
when ControllingDebitCreditCode = 'A'
then ''
when ControllingDebitCreditCode = 'S' and
(BusinessTransactionType = 'KOAO' or BusinessTransactionType = 'KOAE') and
( PartnerProject = ' ' and PartnerOrder = ' ' and PartnerSalesDocument = ' ' and PartnerProjectNetwork = ' ' and PartnerProjectNetworkActivity = ' ' and PartnerBusinessProcess = ' ' and PartnerCostObject = ' ')
then ''
when ControllingDebitCreditCode = 'S' and (BusinessTransactionType = 'KOAO' or BusinessTransactionType = 'KOAE') and
(PartnerProject = _ProjCstLineItm.Project)
then ''
when ControllingDebitCreditCode = 'S' and (BusinessTransactionType = 'KOAO' or BusinessTransactionType = 'KOAE') and
(PartnerAccountAssignmentType = 'OR')
then ''
else 'X'
end as IsSettled,
cast( cast( 'ACT01' as abap.char( 10 )) as fcom_category) as PlanningCategory,
_ProjCstLineItm.PostingDate,
_ProjCstLineItm.DocumentDate,
_ProjCstLineItm.FiscalPeriod,
_ProjCstLineItm.FiscalYearPeriod,
_ProjCstLineItm.FiscalYearVariant,
cast( 'X' as boolean ) as MaintenanceOrderIsSelected,
_SemanticTag.SemanticTag,
_WBS.ProfitCenter as WBSElementProfitCenter,
_WBS.WBSDescription as WBSDescription,
_WBS.WBSElementObject as ProjectObjectNode,
_WBS.ResponsibleCostCenter as ResponsibleCostCenter,
_WBS.ProjectType,
_Project.ProjectDescription,
_Project.ProjectProfileCode,
_Project.ProjectObject,
_Project.AvailabilityControlProfile,
_Project.AvailabilityControlIsActive,
_Project._AvailabilityCtrlProfile.AvailyCtrlTimeRangeType,
_Project._AvailabilityCtrlProfile.BudgetCurrencyRole
}
where
_ProjCstLineItm.ProjectInternalID = _WBS.ProjectInternalID
and _ProjCstLineItm.ProjectInternalID = _Project.ProjectInternalID
and _ProjCstLineItm.CompanyCode = _WBS.CompanyCode
and IsCommitment != 'X'
and _ProjCstLineItm.FiscalPeriod > '000'
and (_ProjCstLineItm.AccountAssignmentType = 'PR'
or _ProjCstLineItm.AccountAssignmentType = 'KS' )
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_AVAILABILITYCTRLPROFILE",
"I_GLACCOUNTLINEITEMRAWDATA",
"I_LEDGERSOURCELEDGER",
"I_PROJECTBASICDATA",
"I_WBSELEMENTBASICDATA",
"P_ISLEADINGLEDGER",
"P_PROJECTSTOCKACCTSEMANTICTAG"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
Learn More
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Annotations — A Complete Guide
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA