P_ContractDaysToExpiry
P_ContractDaysToExpiry is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (I_CalendarDate, I_PurchaseContractWD) and exposes 6 fields with key field PurchaseContract.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| I_CalendarDate | CalendarDate | left_outer |
| I_PurchaseContractWD | PurchaseContract | from |
Annotations (6)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PMMCTRDAYSEXP | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| VDM.private | true | view | |
| VDM.viewType | #COMPOSITE | view | |
| AccessControl.personalData.blocking | #BLOCKED_DATA_EXCLUDED | view |
Fields (6)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | PurchaseContract | PurchaseContract | ||
| PurchaseContractType | PurchaseContractType | |||
| PurchasingOrganization | PurchasingOrganization | |||
| PurchasingGroup | PurchasingGroup | |||
| ValidityEndDate | ValidityEndDate | |||
| DaysBetween |
@AbapCatalog.sqlViewName: 'PMMCTRDAYSEXP'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
//@EndUserText.label: 'Contract Days to Expiry'
@VDM.private: true
@VDM.viewType: #COMPOSITE
@AccessControl.personalData.blocking: #BLOCKED_DATA_EXCLUDED
define view P_ContractDaysToExpiry
as select from I_PurchaseContractWD as PurchaseContract
left outer join I_CalendarDate as CalendarDate on CalendarDate.CalendarDate = $session.system_date
{
key PurchaseContract,
PurchaseContractType,
PurchasingOrganization,
PurchasingGroup,
ValidityEndDate,
dats_days_between( CalendarDate.CalendarDate, PurchaseContract.ValidityEndDate ) as DaysBetween
}
where IsEndOfPurposeBlocked = ''
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_CALENDARDATE",
"I_PURCHASECONTRACTWD"
],
"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