P_PurchaseContractMassUpdate

DDL: P_PURCHASECONTRACTMASSUPDATE SQL: PCTRMASSCHANGE Type: view CONSUMPTION

Mass Changes to Purchase Contracts

P_PurchaseContractMassUpdate is a Consumption CDS View that provides data about "Mass Changes to Purchase Contracts" in SAP S/4HANA. It reads from 4 data sources (I_PurchaseContract, I_PurchaseContract, I_PurchaseContractItem, I_PurchasingDocumentPartner) and exposes 247 fields with key field FormattedPurchaseContractItem. It has 3 associations to related views.

Data Sources (4)

SourceAliasJoin Type
I_PurchaseContract _Hdr inner
I_PurchaseContract _Header from
I_PurchaseContractItem _Item union_all
I_PurchasingDocumentPartner _Partner union

Associations (3)

CardinalityTargetAliasCondition
[1..1] C_PurContrMassUpdtValdtyStsVH _ContractStatusVH $projection.PurchaseContract = _ContractStatusVH.PurchaseContract
[1..1] P_ContractItemCount _CtrCount _CtrCount.PurchaseContract = $projection.PurchaseContract
[1..1] I_PurgDocumentItemCategory _ItemCategory _Item.PurchasingDocumentItemCategory = _ItemCategory.PurchasingDocumentItemCategory

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName PCTRMASSCHANGE view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #PRIVILEGED_ONLY view
EndUserText.label Mass Changes to Purchase Contracts view
VDM.private true view
VDM.viewType #CONSUMPTION view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
Metadata.ignorePropagatedAnnotations true view

Fields (247)

KeyFieldSource TableSource FieldDescription
KEY FormattedPurchaseContractItem
PurchaseContract I_PurchaseContract PurchaseContract Purchasing Document
PurchaseContractItem Item
NumberOfContractItems _CtrCount NumberOfContractItems
HierarchyNodeLevel
ParentNode Purchasing Document
DrillDownState
Supplier I_PurchaseContract Supplier Supplier
PurchasingOrganization I_PurchaseContract PurchasingOrganization Purchasing Organization
PurchasingGroup I_PurchaseContract PurchasingGroup Purchasing Group
PurchaseContractType I_PurchaseContract PurchaseContractType RFQ Type
CompanyCode I_PurchaseContract CompanyCode Receiver Company Code
IncotermsClassification I_PurchaseContract IncotermsClassification Incoterms
CreationDateendasCreationDate
PurchaseContractValidityStatus _ContractStatusVH PurchaseContractValidityStatus Validity Status
SupplierName
ReleaseCode I_PurchaseContract ReleaseCode Release ind.
PaymentTerms I_PurchaseContract PaymentTerms Pyt Terms
DocumentCurrency I_PurchaseContract DocumentCurrency Document Currency
ExchangeRate
ExchangeRateIsFixed I_PurchaseContract ExchangeRateIsFixed Fixed Exch.Rate
CorrespncExternalReference I_PurchaseContract CorrespncExternalReference Your Reference
SupplierRespSalesPersonName I_PurchaseContract SupplierRespSalesPersonName Salesperson
SupplierPhoneNumber I_PurchaseContract SupplierPhoneNumber Telephone
PurchaseContractTargetAmount I_PurchaseContract PurchaseContractTargetAmount Target Value
CorrespncInternalReference I_PurchaseContract CorrespncInternalReference Our Reference
PurchasingDocumentName I_PurchaseContract PurchasingDocumentName Purch. Doc. Name
IncotermsVersion I_PurchaseContract IncotermsVersion Inco. Version
IncotermsLocation1 I_PurchaseContract IncotermsLocation1 Inco. Location1
IncotermsLocation2 I_PurchaseContract IncotermsLocation2 Inco. Location2
IncotermsClassificationName
PurchasingContractDeletionCode I_PurchaseContract PurchasingDocumentDeletionCode Del. Indicator
PurchaseContractItemText Short Text
Material Vehicle Model
Plant Valuation Area
StorageLocation StorageLocation
RequirementTracking Tracking Number
MaterialGroup Product Group
SupplierMaterialNumber Supp. Mat. No.
TargetQuantity Target Quantity
OrderQuantityUnit Sales Unit
OrderPriceUnit Order Price Un.
TaxCode Tax Code
StockType Stock Type
IsInfoRecordUpdated InfoUpdate
PriceIsToBePrinted Print Price
PurgDocEstimatedPrice Estimated Price
NoDaysReminder1 1st Rem./Exped.
NoDaysReminder2 2nd Rem./Exped.
NoDaysReminder3 3rd Rem./Exped.
OverdelivTolrtdLmtRatioInPct Overdeliv. Tol.
UnlimitedOverdeliveryIsAllowed Unlimited Tol.
UnderdelivTolrtdLmtRatioInPct Underdel. Tol.
PurchasingDocumentItemCategory Item Category
PurgDocExternalItemCategory
AccountAssignmentCategory Acct Assgmt Cat
MultipleAcctAssgmtDistribution Distribution
InvoiceIsExpected Invoice Receipt
InvoiceIsGoodsReceiptBased GR-Based IV
IsOrderAcknRqd Acknowl. Reqd.
PurgDocOrderAcknNumber Order Acknowl.
ShippingInstruction Shipping Instr.
PurgDocReleaseOrderQuantity Rel. order qty.
ManualDeliveryAddressID Address Number
SupplierConfirmationControlKey Conf. Control
VolumeUnit Volume Unit
ReferenceDeliveryAddressID Reference Address
MaterialType Material Type
ServicePerformer Service Performer
ProductType Product Type Group
MaterialName
TaxCalculationProcedure
DefaultPartner Default Partner
EmploymentInternalID WorkForce Assgmt ID
PartnerCounter Partner counter
PartnerFunction Partner Functn
SupplierContact Contact Person
ReferenceSupplier Supplier
SupplierSubrange Suppl. Subrange
IsStrategicPartner
char16asFormattedPurchaseContractItem
PurchaseContract I_PurchaseContractItem PurchaseContract Purchasing Document
PurchaseContractItem PurchaseContractItem Item
NumberOfContractItems
HierarchyNodeLevel
ParentNode I_PurchaseContractItem PurchaseContract Purchasing Document
DrillDownState
Supplier Supplier
PurchasingOrganization PurchasingOrganization Purchasing Organization
PurchasingGroup Purchasing Group
PurchaseContractType RFQ Type
CompanyCode _PurchaseContract CompanyCode Receiver Company Code
IncotermsClassification Incoterms
CreationDate
PurchaseContractValidityStatus Validity Status
SupplierName
ReleaseCode Release ind.
ApprovalStatus
PaymentTerms Pyt Terms
DocumentCurrency I_PurchaseContractItem DocumentCurrency Document Currency
ExchangeRate
ExchangeRateIsFixed Fixed Exch.Rate
ValidityStartDate
ValidityEndDate
CorrespncExternalReference Your Reference
SupplierRespSalesPersonName Salesperson
SupplierPhoneNumber Telephone
PurchaseContractTargetAmount Target Value
CorrespncInternalReference Our Reference
PurchasingDocumentName Purch. Doc. Name
IncotermsVersion Inco. Version
IncotermsLocation1 Inco. Location1
IncotermsLocation2 Inco. Location2
IncotermsClassificationName
PurchasingContractDeletionCode PurchasingContractDeletionCode Del. Indicator
PurchaseContractItemText PurchaseContractItemText Short Text
Material Material Vehicle Model
Plant Plant Valuation Area
StorageLocation StorageLocation StorageLocation
RequirementTracking RequirementTracking Tracking Number
MaterialGroup MaterialGroup Product Group
SupplierMaterialNumber SupplierMaterialNumber Supp. Mat. No.
TargetQuantity TargetQuantity Target Quantity
OrderQuantityUnit OrderQuantityUnit Sales Unit
OrderPriceUnit OrderPriceUnit Order Price Un.
TaxCode TaxCode Tax Code
StockType StockType Stock Type
IsInfoRecordUpdated IsInfoRecordUpdated InfoUpdate
PriceIsToBePrinted PriceIsToBePrinted Print Price
PurgDocEstimatedPrice PurgDocEstimatedPrice Estimated Price
NoDaysReminder1 NoDaysReminder1 1st Rem./Exped.
NoDaysReminder2 NoDaysReminder2 2nd Rem./Exped.
NoDaysReminder3 NoDaysReminder3 3rd Rem./Exped.
OverdelivTolrtdLmtRatioInPct OverdelivTolrtdLmtRatioInPct Overdeliv. Tol.
UnlimitedOverdeliveryIsAllowed UnlimitedOverdeliveryIsAllowed Unlimited Tol.
UnderdelivTolrtdLmtRatioInPct UnderdelivTolrtdLmtRatioInPct Underdel. Tol.
PurchasingDocumentItemCategory PurchasingDocumentItemCategory Item Category
PurgDocExternalItemCategory
AccountAssignmentCategory AccountAssignmentCategory Acct Assgmt Cat
MultipleAcctAssgmtDistribution MultipleAcctAssgmtDistribution Distribution
InvoiceIsExpected InvoiceIsExpected Invoice Receipt
InvoiceIsGoodsReceiptBased InvoiceIsGoodsReceiptBased GR-Based IV
IsOrderAcknRqd IsOrderAcknRqd Acknowl. Reqd.
PurgDocOrderAcknNumber PurgDocOrderAcknNumber Order Acknowl.
ShippingInstruction ShippingInstruction Shipping Instr.
PurgDocReleaseOrderQuantity PurgDocReleaseOrderQuantity Rel. order qty.
ManualDeliveryAddressID ManualDeliveryAddressID Address Number
SupplierConfirmationControlKey SupplierConfirmationControlKey Conf. Control
VolumeUnit VolumeUnit Volume Unit
ReferenceDeliveryAddressID ReferenceDeliveryAddressID Reference Address
MaterialType MaterialType Material Type
ServicePerformer ServicePerformer Service Performer
ProductType ProductType Product Type Group
MaterialName
TaxCalculationProcedure
DefaultPartner Default Partner
EmploymentInternalID WorkForce Assgmt ID
PartnerCounter Partner counter
PartnerFunction Partner Functn
SupplierContact Contact Person
ReferenceSupplier Supplier
SupplierSubrange Suppl. Subrange
IsStrategicPartner
char16asFormattedPurchaseContractItem
PurchaseContract I_PurchasingDocumentPartner PurchasingDocument Purchasing Document
PurchaseContractItem Item
NumberOfContractItems
HierarchyNodeLevel
ParentNode I_PurchasingDocumentPartner PurchasingDocument Purchasing Document
DrillDownState
Supplier Supplier
PurchasingOrganization I_PurchasingDocumentPartner PurchasingOrganization Purchasing Organization
PurchasingGroup Purchasing Group
PurchaseContractType PurchasingDocumentType RFQ Type
CompanyCode _PurchasingDocument CompanyCode Receiver Company Code
IncotermsClassification Incoterms
CreationDate
PurchaseContractValidityStatus Validity Status
SupplierName
ReleaseCode Release ind.
ApprovalStatus
PaymentTerms Pyt Terms
DocumentCurrency Document Currency
ExchangeRate
ExchangeRateIsFixed Fixed Exch.Rate
ValidityStartDate
ValidityEndDate
CorrespncExternalReference Your Reference
SupplierRespSalesPersonName Salesperson
SupplierPhoneNumber Telephone
PurchaseContractTargetAmount Target Value
CorrespncInternalReference Our Reference
PurchasingDocumentName Purch. Doc. Name
IncotermsVersion Inco. Version
IncotermsLocation1 Inco. Location1
IncotermsLocation2 Inco. Location2
IncotermsClassificationName
PurchasingContractDeletionCode Del. Indicator
PurchaseContractItemText Short Text
Material Vehicle Model
Plant Valuation Area
StorageLocation StorageLocation
RequirementTracking Tracking Number
MaterialGroup Product Group
SupplierMaterialNumber Supp. Mat. No.
TargetQuantity Target Quantity
OrderQuantityUnit Sales Unit
OrderPriceUnit Order Price Un.
TaxCode Tax Code
StockType Stock Type
IsInfoRecordUpdated InfoUpdate
PriceIsToBePrinted Print Price
PurgDocEstimatedPrice Estimated Price
NoDaysReminder1 1st Rem./Exped.
NoDaysReminder2 2nd Rem./Exped.
NoDaysReminder3 3rd Rem./Exped.
OverdelivTolrtdLmtRatioInPct Overdeliv. Tol.
UnlimitedOverdeliveryIsAllowed Unlimited Tol.
UnderdelivTolrtdLmtRatioInPct Underdel. Tol.
PurchasingDocumentItemCategory Item Category
PurgDocExternalItemCategory
AccountAssignmentCategory Acct Assgmt Cat
MultipleAcctAssgmtDistribution Distribution
InvoiceIsExpected Invoice Receipt
InvoiceIsGoodsReceiptBased GR-Based IV
IsOrderAcknRqd Acknowl. Reqd.
PurgDocOrderAcknNumber Order Acknowl.
ShippingInstruction Shipping Instr.
PurgDocReleaseOrderQuantity Rel. order qty.
ManualDeliveryAddressID Address Number
SupplierConfirmationControlKey Conf. Control
VolumeUnit Volume Unit
ReferenceDeliveryAddressID Reference Address
MaterialType Material Type
ServicePerformer Service Performer
ProductType Product Type Group
MaterialName
TaxCalculationProcedure
DefaultPartner DefaultPartner Default Partner
EmploymentInternalID EmploymentInternalID WorkForce Assgmt ID
PartnerCounter PartnerCounter Partner counter
PartnerFunction PartnerFunction Partner Functn
SupplierContact SupplierContact Contact Person
ReferenceSupplier I_PurchasingDocumentPartner Supplier Supplier
SupplierSubrange SupplierSubrange Suppl. Subrange
IsStrategicPartner
PreferredSupplierName

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_PurchaseContractMassUpdate.
-- 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: PCTRMASSCHANGE

CREATE VIEW P_PurchaseContractMassUpdate AS
SELECT
  cast (_Header.PurchaseContract as abap.char( 16 )) AS FormattedPurchaseContractItem,
  _Header.PurchaseContract AS PurchaseContract,
  cast ('' as vdm_purchasecontractitem) AS PurchaseContractItem,
  _CtrCount.NumberOfContractItems AS NumberOfContractItems,
  cast ( '0' as abap.char(1)) AS HierarchyNodeLevel,
  cast ( ' ' as abap.char(16)) AS ParentNode,
  cast ('expanded' as abap.char(8)) AS DrillDownState,
  _Header.Supplier AS Supplier,
  _Header.PurchasingOrganization AS PurchasingOrganization,
  _Header.PurchasingGroup AS PurchasingGroup,
  _Header.PurchaseContractType AS PurchaseContractType,
  _Header.CompanyCode AS CompanyCode,
  _Header.IncotermsClassification AS IncotermsClassification,
  case _Header.CreationDate when (' ') then '00000000' else _Header.CreationDate end as CreationDate AS CreationDateendasCreationDate,
  _ContractStatusVH.PurchaseContractValidityStatus AS PurchaseContractValidityStatus,
  _Header._Supplier.SupplierName AS SupplierName,
  _Header.ReleaseCode AS ReleaseCode,
  _Header.PaymentTerms AS PaymentTerms,
  _Header.DocumentCurrency AS DocumentCurrency,
  cast(_Header.ExchangeRate as abap.quan( 9, 5 ) ) AS ExchangeRate,
  _Header.ExchangeRateIsFixed AS ExchangeRateIsFixed,
  _Header.CorrespncExternalReference AS CorrespncExternalReference,
  _Header.SupplierRespSalesPersonName AS SupplierRespSalesPersonName,
  _Header.SupplierPhoneNumber AS SupplierPhoneNumber,
  _Header.PurchaseContractTargetAmount AS PurchaseContractTargetAmount,
  _Header.CorrespncInternalReference AS CorrespncInternalReference,
  _Header.PurchasingDocumentName AS PurchasingDocumentName,
  _Header.IncotermsVersion AS IncotermsVersion,
  _Header.IncotermsLocation1 AS IncotermsLocation1,
  _Header.IncotermsLocation2 AS IncotermsLocation2,
  _IncotermsClassification._Text[1: Language = $session.system_language].IncotermsClassificationName AS IncotermsClassificationName,
  _Header.PurchasingDocumentDeletionCode AS PurchasingContractDeletionCode,
  cast ('' as txz01) AS PurchaseContractItemText,
  cast ('_' as matnr) AS Material,
  cast ('_' as ewerk) AS Plant,
  cast ('' as vdm_storage_location) AS StorageLocation,
  cast ('' as bednr) AS RequirementTracking,
  cast ('_' as matkl) AS MaterialGroup,
  cast ('' as idnlf) AS SupplierMaterialNumber,
  cast ('0' as ktmng) AS TargetQuantity,
  cast ('' as bstme) AS OrderQuantityUnit,
  cast ('' as bprme) AS OrderPriceUnit,
  cast ('' as mwskz) AS TaxCode,
  cast ('' as insmk) AS StockType,
  cast ('' as spinf) AS IsInfoRecordUpdated,
  cast ('' as prsdr) AS PriceIsToBePrinted,
  cast ('' as schpr) AS PurgDocEstimatedPrice,
  cast ('0' as mahn1) AS NoDaysReminder1,
  cast ('0' as mahn2) AS NoDaysReminder2,
  cast ('0' as mahn3) AS NoDaysReminder3,
  cast ('0' as uebto) AS OverdelivTolrtdLmtRatioInPct,
  cast ('' as uebtk) AS UnlimitedOverdeliveryIsAllowed,
  cast ('0' as untto) AS UnderdelivTolrtdLmtRatioInPct,
  cast ('_' as pstyp) AS PurchasingDocumentItemCategory,
  cast ('_' as pstyp) AS PurgDocExternalItemCategory,
  cast ('_' as knttp) AS AccountAssignmentCategory,
  cast ('' as vrtkz) AS MultipleAcctAssgmtDistribution,
  cast ('' as repos) AS InvoiceIsExpected,
  cast ('' as webre) AS InvoiceIsGoodsReceiptBased,
  cast ('' as kzabs) AS IsOrderAcknRqd,
  cast ('' as labnr) AS PurgDocOrderAcknNumber,
  cast ('' as evers) AS ShippingInstruction,
  cast ('0' as noram) AS PurgDocReleaseOrderQuantity,
  cast ('' as adrnr_mm) AS ManualDeliveryAddressID,
  cast ('' as bstae) AS SupplierConfirmationControlKey,
  cast ('' as voleh) AS VolumeUnit,
  cast ('' as adrn2) AS ReferenceDeliveryAddressID,
  cast ('' as mtart) AS MaterialType,
  cast ('' as serviceperformer) AS ServicePerformer,
  cast ('' as producttype) AS ProductType,
  cast ('' as maktx) AS MaterialName,
  cast ('' as kalsm_d) AS TaxCalculationProcedure,
  cast ('' as defpa) AS DefaultPartner,
  cast ('00000000' as pernr_d) AS EmploymentInternalID,
  cast('' as parza) AS PartnerCounter,
  cast('_' as parvw) AS PartnerFunction,
  cast ('0000000000' as parnr) AS SupplierContact,
  cast ('_' as lifn2) AS ReferenceSupplier,
  cast ('_' as ltsnr) AS SupplierSubrange,
  cast(' ' as boolean) AS IsStrategicPartner,
  cast('' as suppliername) as PreferredSupplierName AS char16asFormattedPurchaseContractItem,
  cast ('00000000' as paedt) AS CreationDate,
  cast ('_' as approvalstatus_ll) AS ApprovalStatus,
  cast ('00000000' as kdatb) AS ValidityStartDate,
  cast ('00000000' as kdate) AS ValidityEndDate,
  _Partner._Supplier.SupplierName AS PreferredSupplierName
FROM I_PurchaseContract AS _Header
INNER JOIN I_PurchaseContract AS _Hdr ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN C_PurContrMassUpdtValdtyStsVH AS _ContractStatusVH ON PurchaseContract = _ContractStatusVH.PurchaseContract  -- association [1..1]
LEFT OUTER JOIN P_ContractItemCount AS _CtrCount ON _CtrCount.PurchaseContract = PurchaseContract  -- association [1..1]
LEFT OUTER JOIN I_PurgDocumentItemCategory AS _ItemCategory ON _Item.PurchasingDocumentItemCategory = _ItemCategory.PurchasingDocumentItemCategory  -- association [1..1]
-- UNION ALL with additional select branch(es): I_PurchaseContractItem, I_PurchasingDocumentPartner
;