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. Part of development package ODATA_MM_PUR_PO_API.
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 | ||
| CompanyCode | CompanyCode | |||
| PurchaseOrderType | PurchaseOrderType | |||
| PurchasingDocumentDeletionCode | PurchaseOrderDeletionCode | |||
| PurchasingProcessingStatus | PurchasingProcessingStatus | |||
| CreatedByUser | CreatedByUser | |||
| CreationDate | CreationDate | |||
| LastChangeDateTime | LastChangeDateTime | |||
| Supplier | Supplier | |||
| PurchaseOrderSubtype | PurchaseOrderSubtype | |||
| Language | Language | |||
| PaymentTerms | PaymentTerms | |||
| CashDiscount1Days | CashDiscount1Days | |||
| CashDiscount2Days | CashDiscount2Days | |||
| NetPaymentDays | NetPaymentDays | |||
| CashDiscount1Percent | CashDiscount1Percent | |||
| CashDiscount2Percent | CashDiscount2Percent | |||
| PurchasingOrganization | PurchasingOrganization | |||
| PurchasingDocumentOrigin | PurchasingDocumentOrigin | |||
| PurchasingGroup | PurchasingGroup | |||
| PurchaseOrderDate | PurchaseOrderDate | |||
| DocumentCurrency | DocumentCurrency | |||
| ExchangeRate | ||||
| ExchangeRateIsFixed | ExchangeRateIsFixed | |||
| ValidityStartDate | ValidityStartDate | |||
| ValidityEndDate | ValidityEndDate | |||
| SupplierQuotationExternalID | SupplierQuotationExternalID | |||
| PurchasingCollectiveNumber | PurchasingCollectiveNumber | |||
| SupplierRespSalesPersonName | SupplierRespSalesPersonName | |||
| SupplierPhoneNumber | SupplierPhoneNumber | |||
| SupplyingSupplier | SupplyingSupplier | |||
| SupplyingPlant | SupplyingPlant | |||
| IncotermsClassification | IncotermsClassification | |||
| CorrespncExternalReference | CorrespncExternalReference | |||
| CorrespncInternalReference | CorrespncInternalReference | |||
| InvoicingParty | InvoicingParty | |||
| ReleaseIsNotCompleted | ReleaseIsNotCompleted | |||
| PurchasingCompletenessStatus | PurchasingCompletenessStatus | |||
| IncotermsVersion | IncotermsVersion | |||
| IncotermsLocation1 | IncotermsLocation1 | |||
| IncotermsLocation2 | IncotermsLocation2 | |||
| ManualSupplierAddressID | ManualSupplierAddressID | |||
| IsEndOfPurposeBlocked | IsEndOfPurposeBlocked | |||
| AddressCityName | ||||
| AddressFaxNumber | ||||
| AddressHouseNumber | ||||
| AddressName | ||||
| AddressPostalCode | ||||
| AddressStreetName | ||||
| AddressPhoneNumber | ||||
| AddressRegion | ||||
| AddressCountry | ||||
| AddressCorrespondenceLanguage | ||||
| PurgAggrgdProdCmplncSuplrSts | PurgAggrgdProdCmplncSuplrSts | |||
| PurgAggrgdProdMarketabilitySts | PurgAggrgdProdMarketabilitySts | |||
| PurgAggrgdSftyDataSheetStatus | PurgAggrgdSftyDataSheetStatus | |||
| PurgProdCmplncTotDngrsGoodsSts | PurgProdCmplncTotDngrsGoodsSts | |||
| _PurchaseOrderItem | _PurchaseOrderItem | |||
| _PurchaseOrderNote | _PurchaseOrderNote |
@VDM.lifecycle.contract.type: #PUBLIC_REMOTE_API
@AbapCatalog.preserveKey: true
@AbapCatalog.sqlViewName: 'APURCHASEORDER'
@VDM.viewType : #COMPOSITE
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@AccessControl.personalData.blocking: #BLOCKED_DATA_EXCLUDED
@EndUserText.label: 'Purchase Order'
@ObjectModel: {
usageType.serviceQuality: #C,
usageType.sizeCategory: #L,
usageType.dataClass: #TRANSACTIONAL,
sapObjectNodeType.name: 'PurchaseOrder'
}
@Metadata.ignorePropagatedAnnotations:true
@OData.entitySet.name : 'A_PurchaseOrder'
//@VDM.usage.type:[#TRANSACTIONAL_PROCESSING_SERVICE]
//@ObjectModel.entityChangeStateId: 'LastChangeDateTime'
define root view A_PurchaseOrder
as select from R_PurchaseOrder as Root
composition [1..*] of A_PurchaseOrderItem as _PurchaseOrderItem
composition [0..*] of A_PurchaseOrderNote as _PurchaseOrderNote
association [1..1] to I_PurchaseOrderSupplierAddress as _SupplierAddress on $projection.PurchaseOrder = _SupplierAddress.PurchaseOrder
--Extension Association
association [1..1] to E_PurchasingDocument as _PurchaseOrderExtension on $projection.PurchaseOrder = _PurchaseOrderExtension.PurchasingDocument
{
// @ObjectModel: { readOnly: true }
key PurchaseOrder,
// @ObjectModel: { readOnly: true }
CompanyCode,
// @ObjectModel: { readOnly: true }
PurchaseOrderType,
// @ObjectModel: { readOnly: true }
PurchaseOrderDeletionCode as
PurchasingDocumentDeletionCode,
// @ObjectModel: { readOnly: true } -- not createable, but updateable
PurchasingProcessingStatus,
// @ObjectModel: { readOnly: true }
CreatedByUser,
// @ObjectModel: { readOnly: true }
CreationDate,
// @ObjectModel.readOnly: true
//@Semantics.systemDateTime.lastChangedAt: true
LastChangeDateTime,
// @ObjectModel: { readOnly: 'EXTERNAL_CALCULATION' }
Supplier,
// @ObjectModel.readOnly: true
PurchaseOrderSubtype,
// @ObjectModel: { readOnly: true }
Language,
// @ObjectModel: { readOnly: 'EXTERNAL_CALCULATION'}
@ObjectModel.sapObjectNodeTypeReference: 'PaymentTerms'
PaymentTerms,
// @ObjectModel: { readOnly: 'EXTERNAL_CALCULATION'}
CashDiscount1Days,
// @ObjectModel: { readOnly: 'EXTERNAL_CALCULATION'}
CashDiscount2Days,
// @ObjectModel: { readOnly: 'EXTERNAL_CALCULATION'}
NetPaymentDays,
// @ObjectModel: { readOnly: 'EXTERNAL_CALCULATION'}
CashDiscount1Percent,
// @ObjectModel: { readOnly: 'EXTERNAL_CALCULATION'}
CashDiscount2Percent,
// @ObjectModel: { readOnly: 'EXTERNAL_CALCULATION' }
PurchasingOrganization,
// @ObjectModel.readOnly: true
PurchasingDocumentOrigin,
// @ObjectModel: { readOnly: 'EXTERNAL_CALCULATION' }
@ObjectModel.sapObjectNodeTypeReference: 'PurchasingGroup'
PurchasingGroup,
// @ObjectModel: { readOnly: true }
PurchaseOrderDate,
@Semantics.currencyCode
@ObjectModel.sapObjectNodeTypeReference: 'Currency'
// @ObjectModel: { readOnly: 'EXTERNAL_CALCULATION' }
DocumentCurrency,
cast(ExchangeRate as abap.char(12)) as ExchangeRate,
ExchangeRateIsFixed,
ValidityStartDate,
ValidityEndDate,
SupplierQuotationExternalID,
// Once added Uncomment this
// QuotationSubmissionDate,
PurchasingCollectiveNumber,
SupplierRespSalesPersonName,
SupplierPhoneNumber,
SupplyingSupplier,
// Once added Uncomment this
// PurchaseContract,
SupplyingPlant,
@ObjectModel.sapObjectNodeTypeReference: 'IncotermsClassification'
// @ObjectModel: { readOnly: 'EXTERNAL_CALCULATION'}
IncotermsClassification,
//References
CorrespncExternalReference, //Your reference
CorrespncInternalReference, //Our reference
InvoicingParty,
// Once added Uncomment this
// ReleaseCode,
ReleaseIsNotCompleted,
PurchasingCompletenessStatus,
@ObjectModel.sapObjectNodeTypeReference: 'IncotermsVersion'
IncotermsVersion,
IncotermsLocation1,
IncotermsLocation2,
//Address Data
ManualSupplierAddressID,
//Data Privacy and Protection
// @ObjectModel.readOnly: true
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,
// Fields pending for approval in GFC (once approved and added in the underlying view, this can be uncommented
//ReasonForCancellation,
//GoodsReceiptReasonCode,
//RetentionIndicator,
//RetentionPercentage,
//DownPaymentIndicator,
//DownPaymentPercentage,
//DownPaymentDueDate,
//ItemNumberInterval,
//@ObjectModel: { readOnly: true }
//ItemNumberIntervalForSubitems,
//IncompletenessCategory,
//GoodsHandoverLocation,
//
// fields from product compliance
PurgAggrgdProdCmplncSuplrSts,
PurgAggrgdProdMarketabilitySts,
PurgAggrgdSftyDataSheetStatus,
PurgProdCmplncTotDngrsGoodsSts,
// @ObjectModel.association.type: [#TO_COMPOSITION_CHILD]
_PurchaseOrderItem,
// @ObjectModel.association.type: [#TO_COMPOSITION_CHILD]
_PurchaseOrderNote
}
where
PurchaseOrderDeletionCode = ''
Learn More
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Annotations — A Complete Guide
- 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