I_CentralPurchaseOrder

DDL: I_CENTRALPURCHASEORDER SQL: IMMCPURORDER Type: view BASIC

Central Purchase Order Header

I_CentralPurchaseOrder is a Basic CDS View that provides data about "Central Purchase Order Header" in SAP S/4HANA. It reads from 1 data source (mmpur_ext_ekko) and exposes 105 fields with key fields PurchaseOrder, ExtSourceSystem. It has 3 associations to related views.

Data Sources (1)

SourceAliasJoin Type
mmpur_ext_ekko ekko from

Associations (3)

CardinalityTargetAliasCondition
[0..*] I_CentralPurchaseOrderItem _PurchaseOrderItem $projection.PurchaseOrder = _PurchaseOrderItem.PurchaseOrder
[0..1] I_Currency _DocumentCurrency $projection.DocumentCurrency = _DocumentCurrency.Currency
[0..1] I_Language _Language $projection.Language = _Language.Language

Annotations (10)

NameValueLevelField
ClientHandling.algorithm #SESSION_VARIABLE view
EndUserText.label Central Purchase Order Header view
AccessControl.authorizationCheck #CHECK view
VDM.viewType #BASIC view
AbapCatalog.sqlViewName IMMCPURORDER view
ObjectModel.usageType.serviceQuality #A view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
AccessControl.personalData.blocking #REQUIRED view
VDM.lifecycle.contract.type #SAP_INTERNAL_API view

Fields (105)

KeyFieldSource TableSource FieldDescription
KEY PurchaseOrder mmpur_ext_ekko ebeln Source PurchDoc
KEY ExtSourceSystem mmpur_ext_ekko extsourcesystem Connected System ID
PurchasingDocumentCategory mmpur_ext_ekko bstyp Source doc.cat.
PurchaseOrderType mmpur_ext_ekko bsart Stnd purch.ord.
PurchaseOrderSubtype mmpur_ext_ekko bsakz Control
CompanyCode mmpur_ext_ekko bukrs Value
CompanyCodeCountry mmpur_ext_ekko country_code Int. Veh. Reg.
PurchasingDocumentDeletionCode mmpur_ext_ekko loekz Status
PurchasingDocumentIsAged mmpur_ext_ekko isaged Document aged
ItemNumberInterval mmpur_ext_ekko pincr Item Interval
ItemNumberIntervalForSubItems mmpur_ext_ekko upinc Subitem Interv.
PurchasingDocumentOrigin mmpur_ext_ekko statu Vehicle Status
ReleaseIsNotCompleted mmpur_ext_ekko frgrl Subj.to Release
ReleaseCode mmpur_ext_ekko frgke Release ind.
PurgReleaseSequenceStatus mmpur_ext_ekko frgzu Release State
TaxReturnCountry mmpur_ext_ekko lands Sender
CreationDate mmpur_ext_ekko aedat Obsolete
LastChangeDateTime mmpur_ext_ekko lastchangedatetime Timestamp
ProcmtHubLastExtractionTime mmpur_ext_ekko extractiondatetime Time Stamp
CreatedByUser mmpur_ext_ekko ernam User Name
CreatedByUserName mmpur_ext_ekko userdescription Full Name
Supplier
SupplierRespSalesPersonName mmpur_ext_ekko verkf Salesperson
SupplierPhoneNumber mmpur_ext_ekko telf1 Telephone no.
SupplierAddressID mmpur_ext_ekko adrnr Sold-To Address
ManualSupplierAddressID mmpur_ext_ekko adrnr Sold-To Address
PurchasingOrganization mmpur_ext_ekko ekorg Purchasing Org.
PurchasingGroup mmpur_ext_ekko ekgrp Sub. purchasing grp
PurchaseOrderDate
DocumentCurrency mmpur_ext_ekko waers Transaction Currency
ExchangeRate
AbsoluteExchangeRate
ExchRateIsIndirectQuotation
EffectiveExchangeRate
PurchasingDocumentOrderDate mmpur_ext_ekko bedat Start date
SupplyingSupplier mmpur_ext_ekko llief Goods Supplier
SupplyingPlant mmpur_ext_ekko reswk Supplying Plant
InvoicingParty mmpur_ext_ekko lifre Location Alias
Customer mmpur_ext_ekko kunnr Stock customer
PurchaseContract mmpur_ext_ekko konnr Agreement
Language mmpur_ext_ekko spras Off. Language
PurgReasonForDocCancellation mmpur_ext_ekko absgr Reas. for Canc.
PurchasingCompletenessStatus mmpur_ext_ekko memory Incomplete
PurchasingDocCompletionStatus mmpur_ext_ekko memorytype Incompl. Cat.
IncotermsClassification mmpur_ext_ekko inco1 Incoterms
IncotermsTransferLocation mmpur_ext_ekko inco2 Incoterms 2
PaymentTerms Terms of Payment
CashDiscount1Days
CashDiscount2Days
NetPaymentDays
CashDiscount1Percent mmpur_ext_ekko zbd1p Max. Cash Dis. (%)
CashDiscount2Percent mmpur_ext_ekko zbd2p Nrm. Cash Dis. (%)
PricingProcedure mmpur_ext_ekko kalsm Search Proced.
TargetAmount mmpur_ext_ekko ktwrt Target Value
DeliveryDocumentCondition mmpur_ext_ekko knumv Doc. Condition
ValidityStartDate mmpur_ext_ekko kdatb Validity Start
ValidityEndDate mmpur_ext_ekko kdate Validity End
ScheduleAgreementHasReleaseDoc mmpur_ext_ekko lphis Release Docu.
QuotationLatestSubmissionDate mmpur_ext_ekko angdt Valid From
BindingPeriodValidityEndDate mmpur_ext_ekko bnddt Valid To
QuotationSubmissionDate mmpur_ext_ekko ihran Quotation Date
SupplierQuotationExternalID mmpur_ext_ekko angnr Quotation
RequestForQuotation mmpur_ext_ekko ausnr Statement No.
ExchangeRateIsFixed mmpur_ext_ekko kufix Fixed Exch.Rate
IncotermsVersion mmpur_ext_ekko incov Inco. Version
IncotermsLocation1 mmpur_ext_ekko inco2_l Inco. Location1
IncotermsLocation2 mmpur_ext_ekko inco3_l Inco. Location2
PurchasingProcessingStatus mmpur_ext_ekko procstat Tour Status
PurgReleaseTimeTotalAmount mmpur_ext_ekko rlwrt Tot. val. rel.
DownPaymentType mmpur_ext_ekko dptyp Down Payment
DownPaymentPercentageOfTotAmt mmpur_ext_ekko dppct Down Payment %
DownPaymentAmount mmpur_ext_ekko dpamt Down Payment Amt
DownPaymentDueDate mmpur_ext_ekko dpdat Due Date for DP
PurchasingDocumentName
QuotationEarliestSubmsnDate mmpur_ext_ekko qtn_erlst_submsn_date Start Date
LatestRegistrationDate mmpur_ext_ekko bwbdt Application By
CorrespncExternalReference mmpur_ext_ekko ihrez Your Reference
CorrespncInternalReference mmpur_ext_ekko unsez Our Reference
FollowOnDocumentCategory mmpur_ext_ekko followon_doc_cat Follow-On Document Category
FollowOnDocumentType mmpur_ext_ekko followon_doc_type Follow-On Document Type
VATRegistration mmpur_ext_ekko stceg VAT Reg. No.
VATRegistrationCountry mmpur_ext_ekko stceg_l Tax Dest. Cty/R
IsIntrastatReportingRelevant mmpur_ext_ekko intra_rel Intrastat rel.
IsIntrastatReportingExcluded mmpur_ext_ekko intra_excl exclude Intra
IsEndOfPurposeBlocked mmpur_ext_ekko iseopblocked Business Usage Comp.
HasNote mmpur_ext_ekko isnoteavailable Boolean Variables (X=true, space=false)
HasAttachment mmpur_ext_ekko isattachmentavailable Boolean Variables (X=true, space=false)
NumberOfOverduePurOrders mmpur_ext_ekko numberofoverduepurorders NoofOverduePurOrder
NumberOfOverduePurOrdItm mmpur_ext_ekko numberofoverduepurorditm NoofOverduePOrderItm
PurchaseOrderStatus mmpur_ext_ekko purchaseorderstatus Doc. Status
PurchaseOrderStatusName mmpur_ext_ekko purchaseorderstatusname PurOrdStatusname
ApproverUser mmpur_ext_ekko approveruser Approver
ApproverName mmpur_ext_ekko approvername Approver Name
ScheduleLineDeliveryDate mmpur_ext_ekko schedulelinedeliverydate Delivery Date
PurOrdOutputCtrlType mmpur_ext_ekko purordoutputctrltype PurOrdStatusFlg
PurchaseOrderOutputStatus mmpur_ext_ekko purchaseorderoutputstatus PurOrdStatusFlg
PurchaseOrderOutputStatusName mmpur_ext_ekko purchaseorderoutputstatusname PurOrdStatusName
PurchaseOrderOutputDateTime mmpur_ext_ekko purchaseorderoutputdatetime Time Stamp
WeightedRelevance mmpur_ext_ekko weightedrelevance Weighted Relevance
PurchaseOrderOutputIndCode mmpur_ext_ekko purchaseorderoutputindcode Pur ord outp Ind
PurchaseOrderOutputIndDesc mmpur_ext_ekko purchaseorderoutputinddesc Outp Ind Name
PrmtHbRpldPOUniqueID
_PurchaseOrderItem _PurchaseOrderItem
_DocumentCurrency _DocumentCurrency
_Language _Language

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 I_CentralPurchaseOrder.
-- 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: IMMCPURORDER

CREATE VIEW I_CentralPurchaseOrder AS
SELECT
  ekko.ebeln AS PurchaseOrder,
  ekko.extsourcesystem AS ExtSourceSystem,
  ekko.bstyp AS PurchasingDocumentCategory,
  ekko.bsart AS PurchaseOrderType,
  ekko.bsakz AS PurchaseOrderSubtype,
  ekko.bukrs AS CompanyCode,
  ekko.country_code AS CompanyCodeCountry,
  ekko.loekz AS PurchasingDocumentDeletionCode,
  ekko.isaged AS PurchasingDocumentIsAged,
  ekko.pincr AS ItemNumberInterval,
  ekko.upinc AS ItemNumberIntervalForSubItems,
  ekko.statu AS PurchasingDocumentOrigin,
  ekko.frgrl AS ReleaseIsNotCompleted,
  ekko.frgke AS ReleaseCode,
  ekko.frgzu AS PurgReleaseSequenceStatus,
  ekko.lands AS TaxReturnCountry,
  ekko.aedat AS CreationDate,
  ekko.lastchangedatetime AS LastChangeDateTime,
  ekko.extractiondatetime AS ProcmtHubLastExtractionTime,
  ekko.ernam AS CreatedByUser,
  ekko.userdescription AS CreatedByUserName,
  cast ( ekko.lifnr as md_supplier preserving type) AS Supplier,
  ekko.verkf AS SupplierRespSalesPersonName,
  ekko.telf1 AS SupplierPhoneNumber,
  ekko.adrnr AS SupplierAddressID,
  ekko.adrnr AS ManualSupplierAddressID,
  ekko.ekorg AS PurchasingOrganization,
  ekko.ekgrp AS PurchasingGroup,
  cast (ekko.bedat as bedat preserving type) AS PurchaseOrderDate,
  ekko.waers AS DocumentCurrency,
  cast( ekko.wkurs as fis_exchange_rate ) AS ExchangeRate,
  cast(abs(ekko.wkurs) as fis_absolute_exchangerate preserving type ) AS AbsoluteExchangeRate,
  cast(case when ekko.wkurs < 0 then 'X' else ' ' end as fis_indirect_quotation preserving type ) AS ExchRateIsIndirectQuotation,
  cast(case when ekko.wkurs < 0 then division(1, abs(ekko.wkurs), 5 ) else ekko.wkurs end as fis_effective_exchangerate ) AS EffectiveExchangeRate,
  ekko.bedat AS PurchasingDocumentOrderDate,
  ekko.llief AS SupplyingSupplier,
  ekko.reswk AS SupplyingPlant,
  ekko.lifre AS InvoicingParty,
  ekko.kunnr AS Customer,
  ekko.konnr AS PurchaseContract,
  ekko.spras AS Language,
  ekko.absgr AS PurgReasonForDocCancellation,
  ekko.memory AS PurchasingCompletenessStatus,
  ekko.memorytype AS PurchasingDocCompletionStatus,
  ekko.inco1 AS IncotermsClassification,
  ekko.inco2 AS IncotermsTransferLocation,
  cast( zterm as farp_dzterm preserving type) AS PaymentTerms,
  cast (ekko.zbd1t as dzbd1t preserving type) AS CashDiscount1Days,
  cast (ekko.zbd2t as dzbd2t preserving type) AS CashDiscount2Days,
  cast (ekko.zbd3t as dzbd3t preserving type) AS NetPaymentDays,
  ekko.zbd1p AS CashDiscount1Percent,
  ekko.zbd2p AS CashDiscount2Percent,
  ekko.kalsm AS PricingProcedure,
  ekko.ktwrt AS TargetAmount,
  ekko.knumv AS DeliveryDocumentCondition,
  ekko.kdatb AS ValidityStartDate,
  ekko.kdate AS ValidityEndDate,
  ekko.lphis AS ScheduleAgreementHasReleaseDoc,
  ekko.angdt AS QuotationLatestSubmissionDate,
  ekko.bnddt AS BindingPeriodValidityEndDate,
  ekko.ihran AS QuotationSubmissionDate,
  ekko.angnr AS SupplierQuotationExternalID,
  ekko.ausnr AS RequestForQuotation,
  ekko.kufix AS ExchangeRateIsFixed,
  ekko.incov AS IncotermsVersion,
  ekko.inco2_l AS IncotermsLocation1,
  ekko.inco3_l AS IncotermsLocation2,
  ekko.procstat AS PurchasingProcessingStatus,
  ekko.rlwrt AS PurgReleaseTimeTotalAmount,
  ekko.dptyp AS DownPaymentType,
  ekko.dppct AS DownPaymentPercentageOfTotAmt,
  ekko.dpamt AS DownPaymentAmount,
  ekko.dpdat AS DownPaymentDueDate,
  cast ( ekko.description as vdm_purgdoc_name preserving type ) AS PurchasingDocumentName,
  ekko.qtn_erlst_submsn_date AS QuotationEarliestSubmsnDate,
  ekko.bwbdt AS LatestRegistrationDate,
  ekko.ihrez AS CorrespncExternalReference,
  ekko.unsez AS CorrespncInternalReference,
  ekko.followon_doc_cat AS FollowOnDocumentCategory,
  ekko.followon_doc_type AS FollowOnDocumentType,
  ekko.stceg AS VATRegistration,
  ekko.stceg_l AS VATRegistrationCountry,
  ekko.intra_rel AS IsIntrastatReportingRelevant,
  ekko.intra_excl AS IsIntrastatReportingExcluded,
  ekko.iseopblocked AS IsEndOfPurposeBlocked,
  ekko.isnoteavailable AS HasNote,
  ekko.isattachmentavailable AS HasAttachment,
  ekko.numberofoverduepurorders AS NumberOfOverduePurOrders,
  ekko.numberofoverduepurorditm AS NumberOfOverduePurOrdItm,
  ekko.purchaseorderstatus AS PurchaseOrderStatus,
  ekko.purchaseorderstatusname AS PurchaseOrderStatusName,
  ekko.approveruser AS ApproverUser,
  ekko.approvername AS ApproverName,
  ekko.schedulelinedeliverydate AS ScheduleLineDeliveryDate,
  ekko.purordoutputctrltype AS PurOrdOutputCtrlType,
  ekko.purchaseorderoutputstatus AS PurchaseOrderOutputStatus,
  ekko.purchaseorderoutputstatusname AS PurchaseOrderOutputStatusName,
  ekko.purchaseorderoutputdatetime AS PurchaseOrderOutputDateTime,
  ekko.weightedrelevance AS WeightedRelevance,
  ekko.purchaseorderoutputindcode AS PurchaseOrderOutputIndCode,
  ekko.purchaseorderoutputinddesc AS PurchaseOrderOutputIndDesc,
  cast( concat(ekko.ebeln , ekko.extsourcesystem ) as char20 ) AS PrmtHbRpldPOUniqueID
FROM mmpur_ext_ekko AS ekko
LEFT OUTER JOIN I_CentralPurchaseOrderItem AS _PurchaseOrderItem ON PurchaseOrder = _PurchaseOrderItem.PurchaseOrder  -- association [0..*]
LEFT OUTER JOIN I_Currency AS _DocumentCurrency ON DocumentCurrency = _DocumentCurrency.Currency  -- association [0..1]
LEFT OUTER JOIN I_Language AS _Language ON Language = _Language.Language  -- association [0..1]
;