P_ProjCostsWithCalcdMnth

DDL: P_PROJCOSTSWITHCALCDMNTH SQL: PRJCSTSCALCMNTH Type: view CONSUMPTION Package: ODATA_PS_COS_PROJ_OVERVIEW

Project Costs With Calculated Months

P_ProjCostsWithCalcdMnth is a Consumption CDS View that provides data about "Project Costs With Calculated Months" in SAP S/4HANA. It reads from 1 data source (I_ProjectCostLineItems) and exposes 18 fields with key field PlanningCategory. Part of development package ODATA_PS_COS_PROJ_OVERVIEW.

Data Sources (1)

SourceAliasJoin Type
I_ProjectCostLineItems I_ProjectCostLineItems from

Annotations (13)

NameValueLevelField
AbapCatalog.sqlViewName PRJCSTSCALCMNTH view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
EndUserText.label Project Costs With Calculated Months view
VDM.viewType #CONSUMPTION view
VDM.private true view
AccessControl.personalData.blocking #REQUIRED view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #D view
ClientHandling.algorithm #SESSION_VARIABLE view
AbapCatalog.buffering.status #NOT_ALLOWED view
AbapCatalog.preserveKey true view

Fields (18)

KeyFieldSource TableSource FieldDescription
KEY PlanningCategory PlanningCategory Plan Category
Project Project WBS Element
ProjectInternalID ProjectInternalID Project Def.
ProfitCenter ProfitCenter Profit Center
ControllingArea ControllingArea Controlling Area
CompanyCode CompanyCode Receiver Company Code
CurrentDate CurrentDate
GlobalCurrency GlobalCurrency GM Billing Element: Global Currency
PostingDate PostingDate Posting Date for GR
ProjectSummaryTaskUUID ProjectSummaryTaskUUID Entity GUID
AmountInGlobalCurrency AmountInGlobalCurrency Amount in Global Currency
SemanticTag SemanticTag Semantic Tag
FiscalYearPeriod
FourthMonthInThePast
SecondMonthInThePast
PreviousMonth
CurrentMonth
NextMonth

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_ProjCostsWithCalcdMnth.
-- 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: PRJCSTSCALCMNTH

CREATE VIEW P_ProjCostsWithCalcdMnth AS
SELECT
  PlanningCategory,
  Project,
  ProjectInternalID,
  ProfitCenter,
  ControllingArea,
  CompanyCode,
  CurrentDate,
  GlobalCurrency,
  PostingDate,
  ProjectSummaryTaskUUID,
  AmountInGlobalCurrency,
  SemanticTag,
  substring(PostingDate,1,6) AS FiscalYearPeriod,
  concat(substring( dats_add_months( CurrentDate,-4,'FAIL'), 1, 4), substring( dats_add_months( CurrentDate,-4,'FAIL'), 5, 2)) AS FourthMonthInThePast,
  concat(substring( dats_add_months( CurrentDate,-2,'FAIL'), 1, 4) , substring( dats_add_months( CurrentDate,-2,'FAIL'), 5, 2)) AS SecondMonthInThePast,
  concat(substring( dats_add_months( CurrentDate,-1,'FAIL'), 1, 4) , substring( dats_add_months( CurrentDate,-1,'FAIL'), 5, 2)) AS PreviousMonth,
  concat(substring( dats_add_months( CurrentDate,0,'FAIL'), 1, 4) , substring( dats_add_months( CurrentDate,0,'FAIL'), 5, 2)) AS CurrentMonth,
  concat(substring( dats_add_months( CurrentDate,1,'FAIL'), 1, 4) , substring( dats_add_months( CurrentDate,1,'FAIL'), 5, 2)) AS NextMonth
FROM I_ProjectCostLineItems
;