P_PurContrMassUpdt
Purchase Contract Hdr
P_PurContrMassUpdt is a Consumption CDS View that provides data about "Purchase Contract Hdr" in SAP S/4HANA. It reads from 1 data source (R_PurchasingDocument) and exposes 47 fields with key field PurchaseContract. It has 1 association to related views. Part of development package ODATA_MM_PUR_CTRMASS_UPDATE.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| R_PurchasingDocument | R_PurchasingDocument | from |
Parameters (1)
| Name | Type | Default |
|---|---|---|
| P_Date | sydatum |
Associations (1)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..1] | I_PurchaseContract | _PurchaseContract | _PurchaseContract.PurchaseContract = $projection.PurchaseContract |
Annotations (8)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PPURCTRHDR | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| AccessControl.authorizationCheck | #PRIVILEGED_ONLY | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| VDM.viewType | #CONSUMPTION | view | |
| VDM.private | true | view | |
| EndUserText.label | Purchase Contract Hdr | view |
Fields (47)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | PurchaseContract | Purchasing Document | ||
| PurchasingContractCategory | PurchasingDocumentCategory | Doc. Category | ||
| PurchaseContractType | PurchasingDocumentType | RFQ Type | ||
| ExchangeRate | ExchangeRate | Exchange rate | ||
| ExchangeRateIsFixed | ExchangeRateIsFixed | Fixed Exch.Rate | ||
| PurchasingDocVersionReasonCode | _PurchaseContract | PurchasingDocVersionReasonCode | Reason | |
| CreationDate | CreationDate | Time Stamp | ||
| Supplier | Supplier | Supplier | ||
| DocumentCurrency | DocumentCurrency | Document Currency | ||
| PaymentTerms | PaymentTerms | Pyt Terms | ||
| PurchaseContractTargetAmount | TargetAmount | Target Value | ||
| ValidityStartDate | Validity Start Date | |||
| ValidityEndDate | ValidTo | |||
| NoOfDaysFromValidityStart | ||||
| NoOfDaysBtwnValidityStrtAndEnd | ||||
| IsEndOfPurposeBlocked | IsEndOfPurposeBlocked | Busin. Purp. Cmpltd. | ||
| PurchasingDocumentDeletionCode | PurchasingDocumentDeletionCode | Del. Indicator | ||
| CompanyCode | CompanyCode | Receiver Company Code | ||
| PurchasingOrganization | PurchasingOrganization | Purchasing Organization | ||
| PurchasingGroup | PurchasingGroup | Purchasing Group | ||
| IncotermsClassification | IncotermsClassification | Incoterms | ||
| CorrespncExternalReference | CorrespncExternalReference | Your Reference | ||
| CorrespncInternalReference | CorrespncInternalReference | Our Reference | ||
| SupplierRespSalesPersonName | SupplierRespSalesPersonName | Salesperson | ||
| SupplierPhoneNumber | SupplierPhoneNumber | Telephone | ||
| PurchasingDocumentName | PurchasingDocumentName | Purch. Doc. Name | ||
| IncotermsVersion | IncotermsVersion | Inco. Version | ||
| IncotermsLocation1 | IncotermsLocation1 | Inco. Location1 | ||
| IncotermsLocation2 | IncotermsLocation2 | Inco. Location2 | ||
| CreatedByUser | CreatedByUser | User Name | ||
| CashDiscount1Percent | CashDiscount1Percent | Disc. Percent 1 | ||
| CashDiscount1Days | CashDiscount1Days | Days from Baseline Date for Payment | ||
| CashDiscount2Percent | CashDiscount2Percent | Disc. Percent 2 | ||
| CashDiscount2Days | CashDiscount2Days | Days from Baseline Date for Payment | ||
| NetPaymentDays | NetPaymentDays | Net Pmt Terms Period | ||
| SupplierQuotation | SupplierQuotationExternalID | Quotation | ||
| QuotationSubmissionDate | QuotationSubmissionDate | Quotation Date | ||
| InvoicingParty | InvoicingParty | Supplier | ||
| SupplyingSupplier | SupplyingSupplier | Goods Supplier | ||
| _Supplier | _Supplier | |||
| _CompanyCode | _CompanyCode | |||
| _PurchasingOrganization | _PurchasingOrganization | |||
| _PurchasingGroup | _PurchasingGroup | |||
| _IncotermsClassification | _IncotermsClassification | |||
| _IncotermsVersion | _IncotermsVersion | |||
| _PaymentTerms | _PaymentTerms | |||
| _PurchasingDocumentType | _PurchasingDocumentType |
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_PurContrMassUpdt.
-- 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: PPURCTRHDR
-- Parameters: P_Date : sydatum
CREATE VIEW P_PurContrMassUpdt AS
SELECT
cast (PurchasingDocument as vdm_purchasecontract preserving type) AS PurchaseContract,
PurchasingDocumentCategory AS PurchasingContractCategory,
PurchasingDocumentType AS PurchaseContractType,
ExchangeRate,
ExchangeRateIsFixed,
_PurchaseContract.PurchasingDocVersionReasonCode AS PurchasingDocVersionReasonCode,
CreationDate,
Supplier,
DocumentCurrency,
PaymentTerms,
TargetAmount AS PurchaseContractTargetAmount,
cast (ValidityStartDate as vdm_validitystart) AS ValidityStartDate,
cast (ValidityEndDate as vdm_validityend) AS ValidityEndDate,
dats_days_between( ValidityStartDate , $parameters.P_Date ) * 10 AS NoOfDaysFromValidityStart,
dats_days_between( ValidityStartDate , ValidityEndDate ) * 9 AS NoOfDaysBtwnValidityStrtAndEnd,
IsEndOfPurposeBlocked,
PurchasingDocumentDeletionCode,
CompanyCode,
PurchasingOrganization,
PurchasingGroup,
IncotermsClassification,
CorrespncExternalReference,
CorrespncInternalReference,
SupplierRespSalesPersonName,
SupplierPhoneNumber,
PurchasingDocumentName,
IncotermsVersion,
IncotermsLocation1,
IncotermsLocation2,
CreatedByUser,
CashDiscount1Percent,
CashDiscount1Days,
CashDiscount2Percent,
CashDiscount2Days,
NetPaymentDays,
SupplierQuotationExternalID AS SupplierQuotation,
QuotationSubmissionDate,
InvoicingParty,
SupplyingSupplier
FROM R_PurchasingDocument
LEFT OUTER JOIN I_PurchaseContract AS _PurchaseContract ON _PurchaseContract.PurchaseContract = PurchaseContract -- 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