C_PurchaseContractHdr

DDL: C_PURCHASECONTRACTHDR SQL: CMMPURHDR Type: view CONSUMPTION

Purchase Contract Header View

C_PurchaseContractHdr is a Consumption CDS View that provides data about "Purchase Contract Header View" in SAP S/4HANA. It reads from 1 data source (I_PurchaseContract) and exposes 23 fields with key field PurchaseContract. It has 3 associations to related views.

Data Sources (1)

SourceAliasJoin Type
I_PurchaseContract PurchaseContract from

Associations (3)

CardinalityTargetAliasCondition
[0..*] C_SupplierDetails _Supplier _Supplier.Supplier = $projection.Supplier
[1..*] C_PurchaseContractItem _PurCtrItem _PurCtrItem.PurchaseContract = $projection.PurchaseContract
[0..*] I_PurCtrCond _PurContHdrCond _PurContHdrCond.PurchaseContract = $projection.PurchaseContract

Annotations (9)

NameValueLevelField
AbapCatalog.sqlViewName CMMPURHDR view
AbapCatalog.compiler.compareFilter true view
VDM.viewType #CONSUMPTION view
AccessControl.authorizationCheck #CHECK view
EndUserText.label Purchase Contract Header View view
ObjectModel.usageType.serviceQuality #B view
ObjectModel.usageType.sizeCategory #M view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
AccessControl.personalData.blocking #REQUIRED view

Fields (23)

KeyFieldSource TableSource FieldDescription
KEY PurchaseContract I_PurchaseContract PurchaseContract Purchasing Doc.
PurchaseContractType I_PurchaseContract PurchaseContractType Order Type
CreationDate I_PurchaseContract CreationDate Time Stamp
CreatedByUser I_PurchaseContract CreatedByUser User Name
SupplierRespSalesPersonName I_PurchaseContract SupplierRespSalesPersonName Salesperson
ValidityStartDate I_PurchaseContract ValidityStartDate Validity Start Date
ValidityEndDate I_PurchaseContract ValidityEndDate ValidTo
IncotermsClassification I_PurchaseContract IncotermsClassification Incoterms
IncotermsTransferLocation I_PurchaseContract IncotermsTransferLocation Incoterms 2
DocumentCurrency I_PurchaseContract DocumentCurrency Document Currency
SupplierQuotation I_PurchaseContract SupplierQuotation RFQ
QuotationSubmissionDate I_PurchaseContract QuotationSubmissionDate Quotation Date
CorrespncExternalReference I_PurchaseContract CorrespncExternalReference Your Reference
PaymentTerms I_PurchaseContract PaymentTerms Pyt Terms
PurchaseContractTargetAmount I_PurchaseContract PurchaseContractTargetAmount Target Value
Supplier I_PurchaseContract Supplier Supplier
IncotermsVersion I_PurchaseContract IncotermsVersion Inco. Version
PurchasingGroup I_PurchaseContract PurchasingGroup Purchasing Group
PurchasingOrganization I_PurchaseContract PurchasingOrganization Purchasing Organization
IsEndOfPurposeBlocked I_PurchaseContract IsEndOfPurposeBlocked Busin. Purp. Cmpltd.
_Supplier _Supplier
_PurCtrItem _PurCtrItem
_PurContHdrCond _PurContHdrCond

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 C_PurchaseContractHdr.
-- 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: CMMPURHDR

CREATE VIEW C_PurchaseContractHdr AS
SELECT
  PurchaseContract.PurchaseContract AS PurchaseContract,
  PurchaseContract.PurchaseContractType AS PurchaseContractType,
  PurchaseContract.CreationDate AS CreationDate,
  PurchaseContract.CreatedByUser AS CreatedByUser,
  PurchaseContract.SupplierRespSalesPersonName AS SupplierRespSalesPersonName,
  PurchaseContract.ValidityStartDate AS ValidityStartDate,
  PurchaseContract.ValidityEndDate AS ValidityEndDate,
  PurchaseContract.IncotermsClassification AS IncotermsClassification,
  PurchaseContract.IncotermsTransferLocation AS IncotermsTransferLocation,
  PurchaseContract.DocumentCurrency AS DocumentCurrency,
  PurchaseContract.SupplierQuotation AS SupplierQuotation,
  PurchaseContract.QuotationSubmissionDate AS QuotationSubmissionDate,
  PurchaseContract.CorrespncExternalReference AS CorrespncExternalReference,
  PurchaseContract.PaymentTerms AS PaymentTerms,
  PurchaseContract.PurchaseContractTargetAmount AS PurchaseContractTargetAmount,
  PurchaseContract.Supplier AS Supplier,
  PurchaseContract.IncotermsVersion AS IncotermsVersion,
  PurchaseContract.PurchasingGroup AS PurchasingGroup,
  PurchaseContract.PurchasingOrganization AS PurchasingOrganization,
  PurchaseContract.IsEndOfPurposeBlocked AS IsEndOfPurposeBlocked
FROM I_PurchaseContract AS PurchaseContract
LEFT OUTER JOIN C_SupplierDetails AS _Supplier ON _Supplier.Supplier = Supplier  -- association [0..*]
LEFT OUTER JOIN C_PurchaseContractItem AS _PurCtrItem ON _PurCtrItem.PurchaseContract = PurchaseContract  -- association [1..*]
LEFT OUTER JOIN I_PurCtrCond AS _PurContHdrCond ON _PurContHdrCond.PurchaseContract = PurchaseContract  -- association [0..*]
;