P_DatesCalcdFrmToday
Dates based on today’s date
P_DatesCalcdFrmToday is a Consumption CDS View that provides data about "Dates based on today’s date" in SAP S/4HANA. It reads from 1 data source (I_ProjectCostLineItemsOvw) and exposes 16 fields with key fields Project, CompanyCode, ProfitCenter. It has 1 association to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_ProjectCostLineItemsOvw | _ProjectCostLineItemsOvw | from |
Associations (1)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..1] | I_CalendarDate | _CalendarDate | $projection.CurrentDate = _CalendarDate.CalendarDate |
Annotations (11)
| Name | Value | Level | Field |
|---|---|---|---|
| VDM.viewType | #CONSUMPTION | view | |
| VDM.private | true | view | |
| AbapCatalog.sqlViewName | PDATCALCDFRMTDY | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| ObjectModel.usageType.serviceQuality | #D | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| AbapCatalog.preserveKey | true | view | |
| EndUserText.label | Dates based on today’s date | view |
Fields (16)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | Project | I_ProjectCostLineItemsOvw | Project | WBS Element |
| KEY | CompanyCode | I_ProjectCostLineItemsOvw | CompanyCode | Receiver Company Code |
| KEY | ProfitCenter | I_ProjectCostLineItemsOvw | ProfitCenter | Profit Center |
| ProjectInternalID | I_ProjectCostLineItemsOvw | ProjectInternalID | Project Def. | |
| ControllingArea | I_ProjectCostLineItemsOvw | ControllingArea | Controlling Area | |
| CurrentDate | CurrentDate | |||
| ProjectUUID | ProjectUUID | Project UUID | ||
| BusinessPartnerFullName | BusinessPartnerFullName | Broker Name | ||
| ProjectType | ProjectType | Project Type | ||
| BusinessPartnerUUID | BusinessPartnerUUID | UUID | ||
| ProjectDescription | I_ProjectCostLineItemsOvw | ProjectDescription | Project Name | |
| ProjectsMaxCreationDate | ||||
| LastDateOfFirstInterval | ||||
| LastDateOfSecondInterval | ||||
| FirstDateOfFirstInterval | ||||
| FirstDateOfSecondInterval |
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_DatesCalcdFrmToday.
-- 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: PDATCALCDFRMTDY
CREATE VIEW P_DatesCalcdFrmToday AS
SELECT
_ProjectCostLineItemsOvw.Project AS Project,
_ProjectCostLineItemsOvw.CompanyCode AS CompanyCode,
_ProjectCostLineItemsOvw.ProfitCenter AS ProfitCenter,
_ProjectCostLineItemsOvw.ProjectInternalID AS ProjectInternalID,
_ProjectCostLineItemsOvw.ControllingArea AS ControllingArea,
CurrentDate,
ProjectUUID,
BusinessPartnerFullName,
ProjectType,
BusinessPartnerUUID,
_ProjectCostLineItemsOvw.ProjectDescription AS ProjectDescription,
max(ProjectsMaxCreationDate) AS ProjectsMaxCreationDate,
dats_add_days(dats_add_months(_CalendarDate.FirstDayOfMonthDate,-1,'FAIL'),-1,'FAIL') AS LastDateOfFirstInterval,
dats_add_days(dats_add_months(_CalendarDate.FirstDayOfMonthDate,-5,'FAIL'),-1,'FAIL') AS LastDateOfSecondInterval,
dats_add_months(_CalendarDate.FirstDayOfMonthDate,-3,'FAIL') AS FirstDateOfFirstInterval,
dats_add_months(_CalendarDate.FirstDayOfMonthDate,-7,'FAIL') AS FirstDateOfSecondInterval
FROM I_ProjectCostLineItemsOvw AS _ProjectCostLineItemsOvw
LEFT OUTER JOIN I_CalendarDate AS _CalendarDate ON CurrentDate = _CalendarDate.CalendarDate -- association [1..1]
;
Learn More
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- 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
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- S/4HANA CDS View Deprecation: What You Need to Know
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA