A_PurchaseOrder
Purchase Order
A_PurchaseOrder is a Composite CDS View that provides data about "Purchase Order" in SAP S/4HANA. It reads from 1 data source (R_PurchaseOrder) and exposes 59 fields with key field PurchaseOrder. It has 4 associations to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| R_PurchaseOrder | Root | from |
Associations (4)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..1] | I_PurchaseOrderSupplierAddress | _SupplierAddress | $projection.PurchaseOrder = _SupplierAddress.PurchaseOrder --Extension |
| [1..1] | E_PurchasingDocument | _PurchaseOrderExtension | $projection.PurchaseOrder = _PurchaseOrderExtension.PurchasingDocument |
| [1..*] | A_PurchaseOrderItem | _PurchaseOrderItem | |
| [0..*] | A_PurchaseOrderNote | _PurchaseOrderNote | |
Annotations (15)
| Name | Value | Level | Field |
|---|---|---|---|
| VDM.lifecycle.contract.type | #PUBLIC_REMOTE_API | view | |
| AbapCatalog.preserveKey | true | view | |
| AbapCatalog.sqlViewName | APURCHASEORDER | view | |
| VDM.viewType | #COMPOSITE | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| AccessControl.personalData.blocking | #BLOCKED_DATA_EXCLUDED | view | |
| EndUserText.label | Purchase Order | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| ObjectModel.sapObjectNodeType.name | PurchaseOrder | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| OData.entitySet.name | A_PurchaseOrder | view |
Fields (59)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | PurchaseOrder | PurchaseOrder | Purchasing Document | |
| CompanyCode | CompanyCode | Receiver Company Code | ||
| PurchaseOrderType | PurchaseOrderType | PO Type | ||
| PurchasingDocumentDeletionCode | PurchaseOrderDeletionCode | Deletion Code | ||
| PurchasingProcessingStatus | PurchasingProcessingStatus | Proc. State | ||
| CreatedByUser | CreatedByUser | User Name | ||
| CreationDate | CreationDate | Time Stamp | ||
| LastChangeDateTime | LastChangeDateTime | Timestamp | ||
| Supplier | Supplier | Supplier | ||
| PurchaseOrderSubtype | PurchaseOrderSubtype | Control | ||
| Language | Language | Report Text Language | ||
| PaymentTerms | PaymentTerms | Pyt Terms | ||
| CashDiscount1Days | CashDiscount1Days | Days from Baseline Date for Payment | ||
| CashDiscount2Days | CashDiscount2Days | Days from Baseline Date for Payment | ||
| NetPaymentDays | NetPaymentDays | Net Pmt Terms Period | ||
| CashDiscount1Percent | CashDiscount1Percent | Disc. Percent 1 | ||
| CashDiscount2Percent | CashDiscount2Percent | Disc. Percent 2 | ||
| PurchasingOrganization | PurchasingOrganization | Purchasing Organization | ||
| PurchasingDocumentOrigin | PurchasingDocumentOrigin | Status | ||
| PurchasingGroup | PurchasingGroup | Purchasing Group | ||
| PurchaseOrderDate | PurchaseOrderDate | PO Date | ||
| DocumentCurrency | DocumentCurrency | Document Currency | ||
| ExchangeRate | Exchange rate | |||
| ExchangeRateIsFixed | ExchangeRateIsFixed | Fixed Exch.Rate | ||
| ValidityStartDate | ValidityStartDate | Validity Start Date | ||
| ValidityEndDate | ValidityEndDate | ValidTo | ||
| SupplierQuotationExternalID | SupplierQuotationExternalID | Quotation | ||
| PurchasingCollectiveNumber | PurchasingCollectiveNumber | |||
| SupplierRespSalesPersonName | SupplierRespSalesPersonName | Salesperson | ||
| SupplierPhoneNumber | SupplierPhoneNumber | Telephone | ||
| SupplyingSupplier | SupplyingSupplier | Goods Supplier | ||
| SupplyingPlant | SupplyingPlant | Supplying Plant | ||
| IncotermsClassification | IncotermsClassification | Incoterms | ||
| CorrespncExternalReference | CorrespncExternalReference | Your Reference | ||
| CorrespncInternalReference | CorrespncInternalReference | Our Reference | ||
| InvoicingParty | InvoicingParty | Supplier | ||
| ReleaseIsNotCompleted | ReleaseIsNotCompleted | Subj.to Release | ||
| PurchasingCompletenessStatus | PurchasingCompletenessStatus | Incomplete | ||
| IncotermsVersion | IncotermsVersion | Inco. Version | ||
| IncotermsLocation1 | IncotermsLocation1 | Inco. Location1 | ||
| IncotermsLocation2 | IncotermsLocation2 | Inco. Location2 | ||
| ManualSupplierAddressID | ManualSupplierAddressID | Address Number | ||
| IsEndOfPurposeBlocked | IsEndOfPurposeBlocked | Busin. Purp. Cmpltd. | ||
| AddressCityName | ||||
| AddressFaxNumber | ||||
| AddressHouseNumber | ||||
| AddressName | ||||
| AddressPostalCode | ||||
| AddressStreetName | ||||
| AddressPhoneNumber | ||||
| AddressRegion | ||||
| AddressCountry | ||||
| AddressCorrespondenceLanguage | ||||
| PurgAggrgdProdCmplncSuplrSts | PurgAggrgdProdCmplncSuplrSts | Supplier Check Sts | ||
| PurgAggrgdProdMarketabilitySts | PurgAggrgdProdMarketabilitySts | Prod. Marktablty Sts | ||
| PurgAggrgdSftyDataSheetStatus | PurgAggrgdSftyDataSheetStatus | Sfty Data Sheet Sts | ||
| PurgProdCmplncTotDngrsGoodsSts | PurgProdCmplncTotDngrsGoodsSts | Dangerous Goods Sts | ||
| _PurchaseOrderItem | _PurchaseOrderItem | |||
| _PurchaseOrderNote | _PurchaseOrderNote |
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 A_PurchaseOrder.
-- 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: APURCHASEORDER
CREATE VIEW A_PurchaseOrder AS
SELECT
PurchaseOrder,
CompanyCode,
PurchaseOrderType,
PurchaseOrderDeletionCode AS PurchasingDocumentDeletionCode,
PurchasingProcessingStatus,
CreatedByUser,
CreationDate,
LastChangeDateTime,
Supplier,
PurchaseOrderSubtype,
Language,
PaymentTerms,
CashDiscount1Days,
CashDiscount2Days,
NetPaymentDays,
CashDiscount1Percent,
CashDiscount2Percent,
PurchasingOrganization,
PurchasingDocumentOrigin,
PurchasingGroup,
PurchaseOrderDate,
DocumentCurrency,
cast(ExchangeRate as abap.char(12)) AS ExchangeRate,
ExchangeRateIsFixed,
ValidityStartDate,
ValidityEndDate,
SupplierQuotationExternalID,
PurchasingCollectiveNumber,
SupplierRespSalesPersonName,
SupplierPhoneNumber,
SupplyingSupplier,
SupplyingPlant,
IncotermsClassification,
CorrespncExternalReference,
CorrespncInternalReference,
InvoicingParty,
ReleaseIsNotCompleted,
PurchasingCompletenessStatus,
IncotermsVersion,
IncotermsLocation1,
IncotermsLocation2,
ManualSupplierAddressID,
IsEndOfPurposeBlocked,
_SupplierAddress._Address_2.CityName AS AddressCityName,
_SupplierAddress._Address_2._CurrentDfltFaxNumber.InternationalFaxNumber AS AddressFaxNumber,
_SupplierAddress._Address_2.HouseNumber AS AddressHouseNumber,
_SupplierAddress._Address_2.OrganizationName1 AS AddressName,
_SupplierAddress._Address_2.PostalCode AS AddressPostalCode,
_SupplierAddress._Address_2.StreetName AS AddressStreetName,
_SupplierAddress._Address_2._CurrentDfltLandlinePhoneNmbr.InternationalPhoneNumber AS AddressPhoneNumber,
_SupplierAddress._Address_2.Region AS AddressRegion,
_SupplierAddress._Address_2.Country AS AddressCountry,
_SupplierAddress._Address_2.CorrespondenceLanguage AS AddressCorrespondenceLanguage,
PurgAggrgdProdCmplncSuplrSts,
PurgAggrgdProdMarketabilitySts,
PurgAggrgdSftyDataSheetStatus,
PurgProdCmplncTotDngrsGoodsSts
FROM R_PurchaseOrder AS Root
LEFT OUTER JOIN I_PurchaseOrderSupplierAddress AS _SupplierAddress ON PurchaseOrder = _SupplierAddress.PurchaseOrder -- association [1..1]
LEFT OUTER JOIN E_PurchasingDocument AS _PurchaseOrderExtension ON PurchaseOrder = _PurchaseOrderExtension.PurchasingDocument -- association [1..1]
LEFT OUTER JOIN A_PurchaseOrderItem AS _PurchaseOrderItem ON /* condition not available in parsed metadata */ -- association [1..*]
LEFT OUTER JOIN A_PurchaseOrderNote AS _PurchaseOrderNote ON /* condition not available in parsed metadata */ -- association [0..*]
;
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