C_PPS_PurchaseOrderTP_2

DDL: C_PPS_PURCHASEORDERTP_2 Type: view_entity CONSUMPTION

Purchase Order

C_PPS_PurchaseOrderTP_2 is a Consumption CDS View that provides data about "Purchase Order" in SAP S/4HANA. It reads from 1 data source (R_PPS_PurchaseOrderTP) and exposes 77 fields with key field PurchaseOrder. It has 19 associations to related views.

Data Sources (1)

SourceAliasJoin Type
R_PPS_PurchaseOrderTP R_PPS_PurchaseOrderTP projection

Associations (19)

CardinalityTargetAliasCondition
[0..1] I_UserContactCard _UserContactCard _UserContactCard.ContactCardType = 'User' and _UserContactCard.ContactCardID = $projection.CreatedByUser and _UserContactCard.ContactCardRole = 'Creator'
[0..1] C_PPS_PaymentTerm _PaymentTerm $projection.PaymentTerms = _PaymentTerm.PaymentTerms
[0..*] C_PurchaseOrderApprover _POApprover $projection.PurchaseOrder = _POApprover.PurchaseOrder
[1..1] C_PurchaseOrderStatus _POStatus $projection.PurchaseOrder = _POStatus.PurchaseOrder
[0..1] C_PPS_SupplierDetail _SupplierDetail $projection.Supplier = _SupplierDetail.Supplier
[0..*] C_PPS_PurOrdVersionHistory_2 _PurOrdVersionHistory $projection.ActivePurchasingDocument = _PurOrdVersionHistory.ActivePurchasingDocument
[0..*] C_PPS_PurOrdItmDocTot _ItemDocumentTotal $projection.ActivePurchasingDocument = _ItemDocumentTotal.PurchaseOrder
[0..*] C_PPS_PurgDocBudgetOverviewC _PurgDocBudgetOverview $projection.PurchaseOrder = _PurgDocBudgetOverview.ReferenceDocument
[1..1] C_PPS_PricingArrangementTypeVH _PricingArrangementType $projection.PPSPricingArrangementType = _PricingArrangementType.PPSPricingArrangementType
[0..*] C_LegalTransactionIntegFacet _LegalTransaction _LegalTransaction.LglCntntMLinkdObj = $projection.PurchaseOrder and _LegalTransaction.LglCntntMIntegrationLink = 'PPO'
[0..*] C_LegalDocumentIntegFacet _LegalDocuments _LegalDocuments.LglCntntMLinkdObj = $projection.PurchaseOrder and _LegalDocuments.LglCntntMIntegrationLink = 'PPO'
[0..*] C_PPS_PurOrdLegalTransaction _LegalTransactions _LegalTransactions.LglCntntMLinkdObj = $projection.PurchaseOrder and _LegalTransactions.LglCntntMIntegrationLink = 'PPO'
[0..*] C_PPS_PurOrdItemPartnerRef _PurOrdItmPrtnRef $projection.PurchaseOrder = _PurOrdItmPrtnRef.PurchaseOrder
[0..*] C_PPS_PurOrdItemPrtnRefDraft _PurOrdItmPrtnRefDraft $projection.PurchaseOrder = _PurOrdItmPrtnRefDraft.PurchaseOrder and $projection.PurchaseOrderUUID = _PurOrdItmPrtnRefDraft.PurchaseOrderUUID
[0..*] C_PPS_PurOrdHdrNvtnPartnerTP_2 _PurOrdHdrNvtnPartner $projection.ActivePurchasingDocument = _PurOrdHdrNvtnPartner.PurchasingDocument
[0..*] C_PPS_PurOrdItmNvtnPartnerRef _PurOrdItmNvtnPrtnRef $projection.ActivePurchasingDocument = _PurOrdItmNvtnPrtnRef.PurchasingDocument
[0..*] C_PPS_PurOrdDocumentTotal_2 _PurOrdDocumentTotal _PurOrdDocumentTotal.PurchaseOrder = $projection.PurchaseOrder
[0..*] C_PPS_PurOrdDocTotalOptional_2 _PurOrdDocTotalOptional _PurOrdDocTotalOptional.PurchaseOrder = $projection.PurchaseOrder
[0..*] C_PPS_PurOrderVersCompareHdr _VersCompare _VersCompare.PPSPurchaseOrderVersionOne = $projection.PurchaseOrder and _VersCompare.PPSPurchaseOrderVersionTwo = $projection.PurchaseOrder

Annotations (12)

NameValueLevelField
VDM.viewType #CONSUMPTION view
EndUserText.label Purchase Order view
AccessControl.personalData.blocking #REQUIRED view
AccessControl.authorizationCheck #MANDATORY view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.sapObjectNodeType.name PPS_PurchaseOrder view
ObjectModel.representativeKey PurchaseOrder view
Metadata.allowExtensions true view
Feature SW:PPS_NG_MVP2025 view
Search.searchable true view

Fields (77)

KeyFieldSource TableSource FieldDescription
KEY PurchaseOrder PurchaseOrder Purchasing Document
ActivePurchasingDocument Active Purchase Doc
PurchaseOrderType PO Type
PurchaseOrderTypeName _PurchaseOrderTypeText PurchasingDocumentTypeName Description
CreatedByUser CreatedByUser User Name
CreatedByUserFullName _CreatedByUser UserDescription Full Name
CreationDate CreationDate Time Stamp
PurchaseOrderDate PurchaseOrderDate PO Date
LastChangeDateTime LastChangeDateTime Timestamp
Language Language Report Text Language
PPSPurgDocApprovalStatusText _WorkflowDetail PPSPurgDocApprovalStatusText
PPSPurOrderApprovalDate _WorkflowDetail PPSPurgDocApprovalDate
PPSPurgDocApprovalStatus _WorkflowDetail PPSPurgDocApprovalStatus
PurchaseOrderDeletionCode PurchaseOrderDeletionCode Deletion Code
IsDeleted TRUE
PurchasingCompletenessStatus PurchasingCompletenessStatus Incomplete
PurchasingProcessingStatus Proc. State
CompanyCode CompanyCode Receiver Company Code
CompanyCodeName _CompanyCode CompanyCodeName Company Name
PurchasingOrganization Purchasing Organization
PurchasingOrganizationName _PurchasingOrganization PurchasingOrganizationName Purch. Org. Name
PurchasingGroupName _PurchasingGroup PurchasingGroupName Purchasing Grp. Name
PurchasingGroup PurchasingGroup Purchasing Group
Supplier Supplier Supplier
SupplierName _Supplier SupplierName Supplier Name
PPSSupplierCurrency
SupplyingPlant SupplyingPlant Supplying Plant
InvoicingParty InvoicingParty Supplier
Customer Customer Sold-to Party
PurchaseContract PurchaseContract Purchasing Doc.
SupplierQuotationExternalID SupplierQuotationExternalID Quotation
QuotationSubmissionDate QuotationSubmissionDate Quotation Date
ItemNumberIntervalForSubItems ItemNumberIntervalForSubItems Subitem Interv.
PaymentTerms PaymentTerms Pyt Terms
PaymentTermsName
DownPaymentType Down Payment
DownPaymentPercentageOfTotAmt DownPaymentPercentageOfTotAmt Down Payment %
DownPaymentAmount DownPaymentAmount Downpayment
PPSDocumentCurrency PPSDocumentCurrency
DownPaymentDueDate Due Date for DP
DownPaymentTypeName _DownPaymentIndicatorText DownPaymentTypeName Text DP Category
RetentionType RetentionType
PPSHdrRetentionTypeText
PurgDocHdrInvcRtntnPct PurgDocHdrInvcRtntnPct
IncotermsClassification IncotermsClassification Incoterms
IncotermsClassificationNamelocalized
IncotermsTransferLocation IncotermsTransferLocation Incoterms 2
IncotermsVersion IncotermsVersion Inco. Version
IncotermsLocation1 IncotermsLocation1 Inco. Location1
PricingDocument Document Condition
PricingProcedure PricingProcedure Procedure
DocumentCurrency DocumentCurrency Document Currency
ExchangeRate ExchangeRate Exchange rate
ExchangeRateIsFixed ExchangeRateIsFixed Fixed Exch.Rate
PurgReleaseTimeTotalAmount PurgReleaseTimeTotalAmount
PPSPurchaseOrderDescription Document Desc
PPSPurgDocClassfctnCode Doc Confidential
PPSPurgDocClassfctnTxt _Classification PPSPurgDocClassfctnTxt
PPSPurOrdIsInPrep PPSPurOrdIsInPrep Boolean Variable (X = True, - = False, Space = Unknown)
PurchasingDocVersionReasonCode Reason
PurchasingDocVersionReasonText _VersionReasonValHelp PurchasingDocVersionReasonText Reason Description
PPSRevisionComment PPSRevisionComment Reason Text
PPSPurchaseOrderKey PPSPurchaseOrderKey
PPSDocumentIsNovated PPSDocumentIsNovated
PurgDocChangeRequestStatus Change Request Stat.
PurgDocIsChgVers Checkbox
PPSIsDirectPurchaseOrder PPSIsDirectPurchaseOrder
PurchasingDocumentVersion PurchasingDocumentVersion Version
PurchasingDocumentStatus _PurchaseOrderStatus PurchasingDocumentStatus Short Description
char1
int4 Number of Items
virtualNumberOfItemsIsHiddenboolean
virtualUICT_VersionIsNotEnabledboolean
virtualUICT_HideExchangeRateboolean
virtualUICT_HideFixedExchangeRateboolean
virtualPurgDocHasActnRstrcnboole_d
virtualUICT_HideOpenTextboolean

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_PPS_PurchaseOrderTP_2.
-- 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.

CREATE VIEW C_PPS_PurchaseOrderTP_2 AS
SELECT
  PurchaseOrder,
  cast ( ActivePurchasingDocument as pps_e_purchase_order preserving type ) AS ActivePurchasingDocument,
  cast ( PurchaseOrderType as pps_e_bsart preserving type ) AS PurchaseOrderType,
  _PurchaseOrderTypeText.PurchasingDocumentTypeName AS PurchaseOrderTypeName,
  CreatedByUser,
  _CreatedByUser.UserDescription AS CreatedByUserFullName,
  CreationDate,
  PurchaseOrderDate,
  LastChangeDateTime,
  Language,
  _WorkflowDetail.PPSPurgDocApprovalStatusText AS PPSPurgDocApprovalStatusText,
  _WorkflowDetail.PPSPurgDocApprovalDate AS PPSPurOrderApprovalDate,
  _WorkflowDetail.PPSPurgDocApprovalStatus AS PPSPurgDocApprovalStatus,
  PurchaseOrderDeletionCode,
  cast( IsDeleted as pps_e_deletion_ind preserving type ) AS IsDeleted,
  PurchasingCompletenessStatus,
  cast( PurchasingProcessingStatus as pps_e_purch_doc_proc_stat preserving type ) AS PurchasingProcessingStatus,
  CompanyCode,
  _CompanyCode.CompanyCodeName AS CompanyCodeName,
  cast( PurchasingOrganization as pps_e_purch_organization preserving type ) AS PurchasingOrganization,
  _PurchasingOrganization.PurchasingOrganizationName AS PurchasingOrganizationName,
  _PurchasingGroup.PurchasingGroupName AS PurchasingGroupName,
  PurchasingGroup,
  Supplier,
  _Supplier.SupplierName AS SupplierName,
  cast( _SupplierCurrency.PurchaseOrderCurrency as pps_e_po_source_currency preserving type ) AS PPSSupplierCurrency,
  SupplyingPlant,
  InvoicingParty,
  Customer,
  PurchaseContract,
  SupplierQuotationExternalID,
  QuotationSubmissionDate,
  ItemNumberIntervalForSubItems,
  PaymentTerms,
  _PaymentTerms._Text[ 1: Language = $session.system_language ].PaymentTermsName AS PaymentTermsName,
  cast( DownPaymentType as pps_e_po_downpaymenttype preserving type ) AS DownPaymentType,
  DownPaymentPercentageOfTotAmt,
  DownPaymentAmount,
  PPSDocumentCurrency,
  cast( DownPaymentDueDate as pps_e_po_downpaymentduedate preserving type ) AS DownPaymentDueDate,
  _DownPaymentIndicatorText.DownPaymentTypeName AS DownPaymentTypeName,
  RetentionType,
  _RetentionTypeVH[1:RetentionType = RetentionType]._RetentionText[1:Language = $session.system_language].PPSHdrRetentionTypeText AS PPSHdrRetentionTypeText,
  PurgDocHdrInvcRtntnPct,
  IncotermsClassification,
  _IncotermsClassification._Text.IncotermsClassificationName : localized AS IncotermsClassificationNamelocalized,
  IncotermsTransferLocation,
  IncotermsVersion,
  IncotermsLocation1,
  cast( PricingDocument as pps_e_document_cond_no preserving type ) AS PricingDocument,
  PricingProcedure,
  DocumentCurrency,
  ExchangeRate,
  ExchangeRateIsFixed,
  PurgReleaseTimeTotalAmount,
  cast ( PPSPurchaseOrderDescription as pps_e_po_description preserving type ) AS PPSPurchaseOrderDescription,
  cast ( PPSPurgDocClassfctnCode as pps_e_classification preserving type ) AS PPSPurgDocClassfctnCode,
  _Classification.PPSPurgDocClassfctnTxt AS PPSPurgDocClassfctnTxt,
  PPSPurOrdIsInPrep,
  cast( PurchasingDocVersionReasonCode as pps_e_reason_code preserving type ) AS PurchasingDocVersionReasonCode,
  _VersionReasonValHelp.PurchasingDocVersionReasonText AS PurchasingDocVersionReasonText,
  PPSRevisionComment,
  PPSPurchaseOrderKey,
  PPSDocumentIsNovated,
  cast(PurgDocChangeRequestStatus as pps_e_cr_status preserving type ) AS PurgDocChangeRequestStatus,
  cast( PurgDocIsChgVers as pps_e_po_chng_req preserving type ) AS PurgDocIsChgVers,
  PPSIsDirectPurchaseOrder,
  PurchasingDocumentVersion,
  _PurchaseOrderStatus.PurchasingDocumentStatus AS PurchasingDocumentStatus,
  virtual PurchaseOrderLegalDocument : abap.char( 1 ) AS char1,
  virtual NumberOfPurchaseOrderItems : abap.int4 AS int4,
  virtual NumberOfItemsIsHidden : boolean AS virtualNumberOfItemsIsHiddenboolean,
  virtual UICT_VersionIsNotEnabled : boolean AS virtualUICT_VersionIsNotEnabledboolean,
  virtual UICT_HideExchangeRate : boolean AS virtualUICT_HideExchangeRateboolean,
  virtual UICT_HideFixedExchangeRate : boolean AS virtualUICT_HideFixedExchangeRateboolean,
  virtual PurgDocHasActnRstrcn : boole_d AS virtualPurgDocHasActnRstrcnboole_d,
  virtual UICT_HideOpenText : boolean AS virtualUICT_HideOpenTextboolean
FROM R_PPS_PurchaseOrderTP
LEFT OUTER JOIN I_UserContactCard AS _UserContactCard ON _UserContactCard.ContactCardType = 'User' AND _UserContactCard.ContactCardID = CreatedByUser AND _UserContactCard.ContactCardRole = 'Creator'  -- association [0..1]
LEFT OUTER JOIN C_PPS_PaymentTerm AS _PaymentTerm ON PaymentTerms = _PaymentTerm.PaymentTerms  -- association [0..1]
LEFT OUTER JOIN C_PurchaseOrderApprover AS _POApprover ON PurchaseOrder = _POApprover.PurchaseOrder  -- association [0..*]
LEFT OUTER JOIN C_PurchaseOrderStatus AS _POStatus ON PurchaseOrder = _POStatus.PurchaseOrder  -- association [1..1]
LEFT OUTER JOIN C_PPS_SupplierDetail AS _SupplierDetail ON Supplier = _SupplierDetail.Supplier  -- association [0..1]
LEFT OUTER JOIN C_PPS_PurOrdVersionHistory_2 AS _PurOrdVersionHistory ON ActivePurchasingDocument = _PurOrdVersionHistory.ActivePurchasingDocument  -- association [0..*]
LEFT OUTER JOIN C_PPS_PurOrdItmDocTot AS _ItemDocumentTotal ON ActivePurchasingDocument = _ItemDocumentTotal.PurchaseOrder  -- association [0..*]
LEFT OUTER JOIN C_PPS_PurgDocBudgetOverviewC AS _PurgDocBudgetOverview ON PurchaseOrder = _PurgDocBudgetOverview.ReferenceDocument  -- association [0..*]
LEFT OUTER JOIN C_PPS_PricingArrangementTypeVH AS _PricingArrangementType ON PPSPricingArrangementType = _PricingArrangementType.PPSPricingArrangementType  -- association [1..1]
LEFT OUTER JOIN C_LegalTransactionIntegFacet AS _LegalTransaction ON _LegalTransaction.LglCntntMLinkdObj = PurchaseOrder AND _LegalTransaction.LglCntntMIntegrationLink = 'PPO'  -- association [0..*]
LEFT OUTER JOIN C_LegalDocumentIntegFacet AS _LegalDocuments ON _LegalDocuments.LglCntntMLinkdObj = PurchaseOrder AND _LegalDocuments.LglCntntMIntegrationLink = 'PPO'  -- association [0..*]
LEFT OUTER JOIN C_PPS_PurOrdLegalTransaction AS _LegalTransactions ON _LegalTransactions.LglCntntMLinkdObj = PurchaseOrder AND _LegalTransactions.LglCntntMIntegrationLink = 'PPO'  -- association [0..*]
LEFT OUTER JOIN C_PPS_PurOrdItemPartnerRef AS _PurOrdItmPrtnRef ON PurchaseOrder = _PurOrdItmPrtnRef.PurchaseOrder  -- association [0..*]
LEFT OUTER JOIN C_PPS_PurOrdItemPrtnRefDraft AS _PurOrdItmPrtnRefDraft ON PurchaseOrder = _PurOrdItmPrtnRefDraft.PurchaseOrder AND PurchaseOrderUUID = _PurOrdItmPrtnRefDraft.PurchaseOrderUUID  -- association [0..*]
LEFT OUTER JOIN C_PPS_PurOrdHdrNvtnPartnerTP_2 AS _PurOrdHdrNvtnPartner ON ActivePurchasingDocument = _PurOrdHdrNvtnPartner.PurchasingDocument  -- association [0..*]
LEFT OUTER JOIN C_PPS_PurOrdItmNvtnPartnerRef AS _PurOrdItmNvtnPrtnRef ON ActivePurchasingDocument = _PurOrdItmNvtnPrtnRef.PurchasingDocument  -- association [0..*]
LEFT OUTER JOIN C_PPS_PurOrdDocumentTotal_2 AS _PurOrdDocumentTotal ON _PurOrdDocumentTotal.PurchaseOrder = PurchaseOrder  -- association [0..*]
LEFT OUTER JOIN C_PPS_PurOrdDocTotalOptional_2 AS _PurOrdDocTotalOptional ON _PurOrdDocTotalOptional.PurchaseOrder = PurchaseOrder  -- association [0..*]
LEFT OUTER JOIN C_PPS_PurOrderVersCompareHdr AS _VersCompare ON _VersCompare.PPSPurchaseOrderVersionOne = PurchaseOrder AND _VersCompare.PPSPurchaseOrderVersionTwo = PurchaseOrder  -- association [0..*]
;