P_SchedValidityStatus

DDL: P_SCHEDVALIDITYSTATUS SQL: PSCHVALST Type: view CONSUMPTION Package: ODATA_MM_PUR_SCHAGTMASS_UPDATE

Validity Status

P_SchedValidityStatus is a Consumption CDS View that provides data about "Validity Status" in SAP S/4HANA. It reads from 1 data source (I_Schedgagrmthdr) and exposes 7 fields with key field SchedulingAgreement. Part of development package ODATA_MM_PUR_SCHAGTMASS_UPDATE.

Data Sources (1)

SourceAliasJoin Type
I_Schedgagrmthdr _Header from

Parameters (1)

NameTypeDefault
P_Date sydatum

Annotations (6)

NameValueLevelField
AbapCatalog.sqlViewName PSCHVALST view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #PRIVILEGED_ONLY view
EndUserText.label Validity Status view
VDM.private true view
VDM.viewType #CONSUMPTION view

Fields (7)

KeyFieldSource TableSource FieldDescription
KEY SchedulingAgreement I_Schedgagrmthdr SchedulingAgreement Scheduling Agreement
ValidityStartDate I_Schedgagrmthdr ValidityStartDate Validity Start Date
ValidityEndDate I_Schedgagrmthdr ValidityEndDate ValidTo
PurchaseContractValidityStatus
PurchasingGroup PurchasingGroup Purchasing Group
PurchasingOrganization PurchasingOrganization Purchasing Organization
PurchasingDocumentType PurchasingDocumentType RFQ Type

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_SchedValidityStatus.
-- 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: PSCHVALST
-- Parameters: P_Date : sydatum

CREATE VIEW P_SchedValidityStatus AS
SELECT
  _Header.SchedulingAgreement AS SchedulingAgreement,
  _Header.ValidityStartDate AS ValidityStartDate,
  _Header.ValidityEndDate AS ValidityEndDate,
  dats_days_between( $parameters.P_Date,ValidityEndDate) AS PurchaseContractValidityStatus,
  PurchasingGroup,
  PurchasingOrganization,
  PurchasingDocumentType
FROM I_Schedgagrmthdr AS _Header
;