I_PurchaseOrderAPI01

DDL: I_PURCHASEORDERAPI01 SQL: IMMPURORDAPI01 Type: view BASIC

Purchase Order

I_PurchaseOrderAPI01 (Basic)

Package: Explore, extend and adapt the SAP S/4HANA Cloud Private Edition with built-in and side-by-side extension capabilities.

Sourcing & Procurement

I_PurchaseOrderAPI01 is a Basic CDS View that provides data about "Purchase Order" in SAP S/4HANA. It reads from 1 data source (R_PurchaseOrder) and exposes 63 fields with key field PurchaseOrder. It has 2 associations to related views.

SAP Help Documentation

CategoryCDS Views for Purchase Orders
StatusSafety data sheet status (all items)
Purpose
This CDS view helps to retrieve the fields of a purchase order regarding the request or instruction from a purchasing organization to a supplier or a plant to supply a certain quantity of goods or services at or by a certain point in time. To help you decide which CDS view to use for your purposes, SAP has introduced the annotation ObjectModel.supportedCapabilities that indicates the most appropriate use cases for each CDS view. To find out what use cases are best supported by this CDS view, access the entry of the CDS view in the View Browser app and find the values for this annotation under the Annotation tab. For more information, see Supported Capabilities for CDS Views .

Prerequisites
Authorizations Users who want to use this CDS view must have the following authorization objects assigned: M_BEST_BSA (Purchasing document type in purchase order) M_BEST_EKO (Purchasing organization in purchase order) M_BEST_EKG (Purchasing group in purchase order)

Structure
Important Fields Important fields in this view include the following: Field Name Description PurchaseOrder Purchase order number PurchaseOrderType Purchasing document type PurchaseOrderSubtype Control indicator for purchasing document type PurchasingDocumentOrigin Status of purchasing document CreatedByUser User of person who created a purchasing document CreationDate Creation date of purchasing document PurchaseOrderDate Purchase order date Language Language key CorrespncExternalReference Your reference CorrespncInternalReference Our reference PurchasingDocumentDeletionCode Purchase order deletion code ReleaseIsNotCompleted Release not yet completely effected PurchasingCompletenessStatus Purchase order not yet complete Purchasing ProcessingStatus Purchasing document processing state PurgReleaseSequenceStatus Release status ReleaseCode Release indicator: purchasing document CompanyCode Company code PurchasingOrganization Purchasing organization PurchasingGroup Purchasing group Supplier Supplier ManualSupplierAddressID Address number SupplierRespSalesPersonName Responsible salesperson at supplier's office SupplierPhoneNumber Supplier's phone number SupplyingSupplier Goods supplier SupplyingPlant Supplying (issuing) plant in stock transport order InvoicingParty Different invoicig party Customer Customer number SupplierQuotationExternalID Quotation number PaymentTerms Terms of payment key CashDiscount1Days Cash discount days 1 CashDiscount2Days Cash discount days 2 NetPaymentDays Net payment terms period CashDiscount1Percent Cash discount percentage 1 CashDiscount2Percent Cash Discount percentage 2 DownPaymentType Down payment indicator DownPaymentPercentageOfTotAmt Down payment percentage DownPaymentAmount Down payment amount in document currency DownPaymentDueDate Due date for down payment IncotermsClassification Incoterms (Part 1) IncotermsTransferLocation Incoterms (Part 2) IncotermsVersion Incoterms version IncotermsLocation1 Incoterms location 1 IncotermsLocation2 Incoterms location 2 IsIntrastatReportingRelevant Relevant for intrastat reporting IsIntrastatReportingExcluded Exclude from intrastat reporting PricingDocument Number of the document condition PricingProcedure Procedure (pricing, output control, account det., costing, and so on) DocumentCurrency Currency key (currency of document) ValidityStartDate Start of validity period ValidityEndDate End of validity period ExchangeRate Exchange rate ExchangeRateIsFixed Indicator for fixed exchange rate LastChangeDateTime Change time stamp TaxReturnCountry Country/region for tax report VATRegistration VAT registration number VATRegistrationCountry Country / region of sales tax ID number PurgReasonForDocCancellation Reason for cancellation PurgReleaseTimeTotalAmount Total value at time of release PurgAggrgdProdCmplncSuplrSts Product compliance supplier check status (all items) PurgAggrgdProdMarketabilitySts Product marketability status (all items) PurgAggrgdSftyDataSheetStatus Safety data sheet status (all item

View on SAP Help Portal →

SAP API Hub

StateC1
Line of BusinessSourcing & Procurement
Application ComponentMM-PUR-PO
CapabilitiesData Source for Defining CDS Entities, Data Source in SQL Select, Association Target for Defining CDS Entities
PackageSourcing & Procurement for SAP S/4HANA Cloud Private Edition
Description <p>This CDS view helps to retrieve the fields of a purchase order regarding the request or instruction from a purchasing organization to a supplier or a plant to supply a certain quantity of goods or services at or by a certain point in time.</p> <p>To help you decide which CDS view to use for your purposes, SAP has introduced the annotation ObjectModel.supportedCapabilities that indicates the most appropriate use cases for each CDS view. To find out what use cases are best supported by this CDS view, access the entry of the CDS view in the View Browser app and find the values for this annotation under the Annotation tab. For more information, see Supported Capabilities for CDS Views.</p>

Documentation

Data Sources (1)

SourceAliasJoin Type
R_PurchaseOrder R_PurchaseOrder from

Associations (2)

CardinalityTargetAliasCondition
[0..*] I_PurchaseOrderItemAPI01 _PurchaseOrderItem $projection.PurchaseOrder = _PurchaseOrderItem.PurchaseOrder --Extension
[1..1] E_PurchasingDocument _PurchaseOrderExtension $projection.PurchaseOrder = _PurchaseOrderExtension.PurchasingDocument

Annotations (13)

NameValueLevelField
ClientHandling.algorithm #SESSION_VARIABLE view
AbapCatalog.sqlViewName IMMPURORDAPI01 view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
VDM.viewType #BASIC view
EndUserText.label Purchase Order view
ObjectModel.usageType.serviceQuality #A view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.representativeKey PurchaseOrder view
AccessControl.personalData.blocking #BLOCKED_DATA_EXCLUDED view
Metadata.ignorePropagatedAnnotations true view
VDM.lifecycle.contract.type #PUBLIC_LOCAL_API view

Fields (63)

KeyFieldSource TableSource FieldDescription
KEY PurchaseOrder PurchaseOrder Purchase Order Number
PurchaseOrderType PurchaseOrderType Purchasing Document Type
PurchaseOrderSubtype PurchaseOrderSubtype Control indicator for purchasing document type
PurchasingDocumentOrigin PurchasingDocumentOrigin Status of Purchasing Document
CreatedByUser CreatedByUser User of person who created a purchasing document
CreationDate CreationDate Creation Date of Purchasing Document
PurchaseOrderDate PurchaseOrderDate Purchase Order Date
Language Language Report Text Language
CorrespncExternalReference CorrespncExternalReference Your Reference
CorrespncInternalReference CorrespncInternalReference Our Reference
PurchasingDocumentDeletionCode PurchaseOrderDeletionCode Purchase Order Deletion Code
ReleaseIsNotCompleted ReleaseIsNotCompleted Release Not Yet Completely Effected
PurchasingCompletenessStatus PurchasingCompletenessStatus Purchase order not yet complete
PurchasingProcessingStatus PurchasingProcessingStatus Purchasing Document Processing State
PurgReleaseSequenceStatus PurgReleaseSequenceStatus Release State
ReleaseCode ReleaseCode Release Indicator: Purchasing Document
CompanyCode CompanyCode Receiver Company Code
PurchasingOrganization PurchasingOrganization Purchasing Organization
PurchasingGroup PurchasingGroup Purchasing Group
Supplier Supplier Supplier
ManualSupplierAddressID ManualSupplierAddressID Address Number
SupplierRespSalesPersonName SupplierRespSalesPersonName Responsible Salesperson at Supplier's Office
SupplierPhoneNumber SupplierPhoneNumber Supplier's Phone Number
SupplyingSupplier SupplyingSupplier Goods Supplier
SupplyingPlant SupplyingPlant Supplying (issuing) plant in case of stock transport order
InvoicingParty InvoicingParty Different Invoicing Party
Customer Customer Customer Number
SupplierQuotationExternalID SupplierQuotationExternalID Quotation Number
PaymentTerms PaymentTerms Terms of Payment Key
CashDiscount1Days CashDiscount1Days Days from Baseline Date for Payment
CashDiscount2Days CashDiscount2Days Days from Baseline Date for Payment
NetPaymentDays NetPaymentDays Net Payment Terms Period
CashDiscount1Percent CashDiscount1Percent Cash Discount Percentage 1
CashDiscount2Percent CashDiscount2Percent Cash Discount Percentage 2
DownPaymentType DownPaymentType Down Payment Indicator
DownPaymentPercentageOfTotAmt DownPaymentPercentageOfTotAmt Down Payment Percentage
DownPaymentAmount DownPaymentAmount Down Payment Amount in Document Currency
DownPaymentDueDate DownPaymentDueDate Due Date for Down Payment
IncotermsClassification IncotermsClassification Incoterms (Part 1)
IncotermsTransferLocation IncotermsTransferLocation Incoterms (Part 2)
IncotermsVersion IncotermsVersion Incoterms Version
IncotermsLocation1 IncotermsLocation1 Incoterms Location 1
IncotermsLocation2 IncotermsLocation2 Incoterms Location 2
IsIntrastatReportingRelevant IsIntrastatReportingRelevant Relevant for Intrastat Reporting
IsIntrastatReportingExcluded IsIntrastatReportingExcluded Exclude from Intrastat Reporting
PricingDocument PricingDocument Number of the Document Condition
PricingProcedure PricingProcedure Procedure (Pricing, Output Control, Acct. Det., Costing,...)
DocumentCurrency DocumentCurrency Document Currency
ValidityStartDate ValidityStartDate Start of Validity Period
ValidityEndDate ValidityEndDate End of Validity Period
ExchangeRate ExchangeRate Exchange rate
ExchangeRateIsFixed ExchangeRateIsFixed Indicator for Fixed Exchange Rate
LastChangeDateTime LastChangeDateTime Change Time Stamp
TaxReturnCountry TaxReturnCountry Country/Region for Tax Report
VATRegistration VATRegistration VAT Registration Number
VATRegistrationCountry VATRegistrationCountry Country/Region of Sales Tax ID Number
PurgReasonForDocCancellation PurgReasonForDocCancellation Reason for Cancellation
PurgReleaseTimeTotalAmount PurgReleaseTimeTotalAmount Total value at time of release
PurgAggrgdProdCmplncSuplrSts PurgAggrgdProdCmplncSuplrSts Product Compliance Supplier Check Status (All Items)
PurgAggrgdProdMarketabilitySts PurgAggrgdProdMarketabilitySts Product Marketability Status (All Items)
PurgAggrgdSftyDataSheetStatus PurgAggrgdSftyDataSheetStatus Safety Data Sheet Status (All Items)
PurgProdCmplncTotDngrsGoodsSts PurgProdCmplncTotDngrsGoodsSts Dangerous Goods Status (All Items)
_PurchaseOrderItem _PurchaseOrderItem

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_PurchaseOrderAPI01.
-- 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: IMMPURORDAPI01

CREATE VIEW I_PurchaseOrderAPI01 AS
SELECT
  PurchaseOrder,
  PurchaseOrderType,
  PurchaseOrderSubtype,
  PurchasingDocumentOrigin,
  CreatedByUser,
  CreationDate,
  PurchaseOrderDate,
  Language,
  CorrespncExternalReference,
  CorrespncInternalReference,
  PurchaseOrderDeletionCode AS PurchasingDocumentDeletionCode,
  ReleaseIsNotCompleted,
  PurchasingCompletenessStatus,
  PurchasingProcessingStatus,
  PurgReleaseSequenceStatus,
  ReleaseCode,
  CompanyCode,
  PurchasingOrganization,
  PurchasingGroup,
  Supplier,
  ManualSupplierAddressID,
  SupplierRespSalesPersonName,
  SupplierPhoneNumber,
  SupplyingSupplier,
  SupplyingPlant,
  InvoicingParty,
  Customer,
  SupplierQuotationExternalID,
  PaymentTerms,
  CashDiscount1Days,
  CashDiscount2Days,
  NetPaymentDays,
  CashDiscount1Percent,
  CashDiscount2Percent,
  DownPaymentType,
  DownPaymentPercentageOfTotAmt,
  DownPaymentAmount,
  DownPaymentDueDate,
  IncotermsClassification,
  IncotermsTransferLocation,
  IncotermsVersion,
  IncotermsLocation1,
  IncotermsLocation2,
  IsIntrastatReportingRelevant,
  IsIntrastatReportingExcluded,
  PricingDocument,
  PricingProcedure,
  DocumentCurrency,
  ValidityStartDate,
  ValidityEndDate,
  ExchangeRate,
  ExchangeRateIsFixed,
  LastChangeDateTime,
  TaxReturnCountry,
  VATRegistration,
  VATRegistrationCountry,
  PurgReasonForDocCancellation,
  PurgReleaseTimeTotalAmount,
  PurgAggrgdProdCmplncSuplrSts,
  PurgAggrgdProdMarketabilitySts,
  PurgAggrgdSftyDataSheetStatus,
  PurgProdCmplncTotDngrsGoodsSts
FROM R_PurchaseOrder
LEFT OUTER JOIN I_PurchaseOrderItemAPI01 AS _PurchaseOrderItem ON PurchaseOrder = _PurchaseOrderItem.PurchaseOrder  -- association [0..*]
LEFT OUTER JOIN E_PurchasingDocument AS _PurchaseOrderExtension ON PurchaseOrder = _PurchaseOrderExtension.PurchasingDocument  -- association [1..1]
;