I_PurchaseOrder
Purchase Order
I_PurchaseOrder is a Basic CDS View that provides data about "Purchase Order" in SAP S/4HANA. It reads from 1 data source (R_PurchasingDocument) and exposes 81 fields with key field PurchaseOrder. It has 3 associations to related views. Part of development package VDM_MM_PUR_PO.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| R_PurchasingDocument | R_PurchasingDocument | from |
Associations (3)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_PurchasingDocumentType | _PurchaseOrderType | _PurchaseOrderType.PurchasingDocumentCategory = 'F' and _PurchaseOrderType.PurchasingDocumentType = $projection.PurchaseOrderType |
| [0..*] | I_PurchaseOrderItem | _PurchaseOrderItem | $projection.PurchaseOrder = _PurchaseOrderItem.PurchaseOrder |
| [1..1] | I_PurchaseOrderCalcFields | _PurchaseOrderCalcFields | $projection.PurchaseOrder = _PurchaseOrderCalcFields.PurchaseOrder |
Annotations (15)
| Name | Value | Level | Field |
|---|---|---|---|
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| AbapCatalog.preserveKey | true | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| EndUserText.label | Purchase Order | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| VDM.viewType | #BASIC | view | |
| AbapCatalog.sqlViewName | IMMPURCHASEORDER | view | |
| ObjectModel.usageType.serviceQuality | #A | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| ObjectModel.compositionRoot | true | view | |
| ObjectModel.semanticKey | PurchaseOrder | view | |
| ObjectModel.representativeKey | PurchaseOrder | view | |
| AccessControl.personalData.blocking | #BLOCKED_DATA_EXCLUDED | view | |
| Metadata.ignorePropagatedAnnotations | true | view |
Fields (81)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | PurchaseOrder | |||
| PurchaseOrderType | ||||
| PurchaseOrderSubtype | PurchasingDocumentSubtype | |||
| PurchasingDocumentOrigin | PurchasingDocumentOrigin | |||
| PurchasingDocumentIsAged | PurchasingDocumentIsAged | |||
| CreatedByUser | CreatedByUser | |||
| CreationDate | CreationDate | |||
| PurchaseOrderDate | ||||
| Language | Language | |||
| PurchasingDocumentDeletionCode | PurchasingDocumentDeletionCode | |||
| ReleaseIsNotCompleted | ReleaseIsNotCompleted | |||
| PurchasingCompletenessStatus | PurchasingCompletenessStatus | |||
| PurchasingProcessingStatus | PurchasingProcessingStatus | |||
| PurgReleaseSequenceStatus | PurgReleaseSequenceStatus | |||
| ReleaseCode | ReleaseCode | |||
| PurchasingReleaseStrategy | PurchasingReleaseStrategy | |||
| CompanyCode | CompanyCode | |||
| PurchasingOrganization | PurchasingOrganization | |||
| PurchasingGroup | PurchasingGroup | |||
| Supplier | Supplier | |||
| ManualSupplierAddressID | ManualSupplierAddressID | |||
| SupplierAddressID | SupplierAddressID | |||
| SupplierRespSalesPersonName | SupplierRespSalesPersonName | |||
| SupplierPhoneNumber | SupplierPhoneNumber | |||
| SupplyingSupplier | SupplyingSupplier | |||
| SupplyingPlant | SupplyingPlant | |||
| InvoicingParty | InvoicingParty | |||
| Customer | Customer | |||
| CorrespncExternalReference | CorrespncExternalReference | |||
| CorrespncInternalReference | CorrespncInternalReference | |||
| PurchaseContract | PurchaseContract | |||
| RequestForQuotation | RequestForQuotation | |||
| SupplierQuotationExternalID | SupplierQuotationExternalID | |||
| PaymentTerms | PaymentTerms | |||
| CashDiscount1Days | CashDiscount1Days | |||
| CashDiscount2Days | CashDiscount2Days | |||
| NetPaymentDays | NetPaymentDays | |||
| CashDiscount1Percent | CashDiscount1Percent | |||
| CashDiscount2Percent | CashDiscount2Percent | |||
| DownPaymentType | DownPaymentType | |||
| DownPaymentPercentageOfTotAmt | DownPaymentPercentageOfTotAmt | |||
| DownPaymentAmount | DownPaymentAmount | |||
| DownPaymentDueDate | DownPaymentDueDate | |||
| IncotermsClassification | IncotermsClassification | |||
| IncotermsTransferLocation | IncotermsTransferLocation | |||
| IncotermsVersion | IncotermsVersion | |||
| IncotermsLocation1 | IncotermsLocation1 | |||
| IncotermsLocation2 | IncotermsLocation2 | |||
| IsIntrastatReportingRelevant | IsIntrastatReportingRelevant | |||
| IsIntrastatReportingExcluded | IsIntrastatReportingExcluded | |||
| PurchasingDocumentCondition | PricingDocument | |||
| PricingProcedure | PricingProcedure | |||
| DocumentCurrency | DocumentCurrency | |||
| ValidityStartDate | ValidityStartDate | |||
| ValidityEndDate | ValidityEndDate | |||
| ExchangeRate | ExchangeRate | |||
| ExchangeRateIsFixed | ExchangeRateIsFixed | |||
| LastChangeDateTime | LastChangeDateTime | |||
| IsEndOfPurposeBlocked | IsEndOfPurposeBlocked | |||
| TaxReturnCountry | TaxReturnCountry | |||
| VATRegistrationCountry | VATRegistrationCountry | |||
| PurgReasonForDocCancellation | PurgReasonForDocCancellation | |||
| PurgReleaseTimeTotalAmount | PurgReleaseTimeTotalAmount | |||
| _PurchaseOrderItem | _PurchaseOrderItem | |||
| _PurchaseOrderType | _PurchaseOrderType | |||
| _CompanyCode | _CompanyCode | |||
| _CreatedByUser | _CreatedByUser | |||
| _Supplier | _Supplier | |||
| _SupplyingSupplier | _SupplyingSupplier | |||
| _InvoicingParty | _InvoicingParty | |||
| _PurchasingOrganization | _PurchasingOrganization | |||
| _PurchasingGroup | _PurchasingGroup | |||
| _DocumentCurrency | _DocumentCurrency | |||
| _IncotermsClassification | _IncotermsClassification | |||
| _IncotermsVersion | _IncotermsVersion | |||
| _SupplyingPlant | _SupplyingPlant | |||
| _PaymentTerms | _PaymentTerms | |||
| _SupplierAddress | _SupplierAddress | |||
| _SupplierAddress_2 | _SupplierAddress_2 | |||
| _Language | _Language | |||
| _PurchaseOrderCalcFields | _PurchaseOrderCalcFields |
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog.preserveKey: true
@AbapCatalog.compiler.compareFilter: true
@EndUserText.label: 'Purchase Order'
@AccessControl.authorizationCheck:#CHECK
@VDM.viewType : #BASIC
@AbapCatalog.sqlViewName: 'IMMPURCHASEORDER'
@ObjectModel.usageType.serviceQuality: #A
@ObjectModel.usageType.sizeCategory: #L
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@ObjectModel: {
compositionRoot:true,
semanticKey: 'PurchaseOrder',
representativeKey: 'PurchaseOrder'
}
@AccessControl.personalData.blocking: #BLOCKED_DATA_EXCLUDED
@AccessControl.privilegedAssociations: [ '_SupplierAddress' ]
@Metadata.ignorePropagatedAnnotations:true
define view I_PurchaseOrder
as select from R_PurchasingDocument
association [0..1] to I_PurchasingDocumentType as _PurchaseOrderType on _PurchaseOrderType.PurchasingDocumentCategory = 'F'
and _PurchaseOrderType.PurchasingDocumentType = $projection.PurchaseOrderType
association [0..*] to I_PurchaseOrderItem as _PurchaseOrderItem on $projection.PurchaseOrder = _PurchaseOrderItem.PurchaseOrder
association [1..1] to I_PurchaseOrderCalcFields as _PurchaseOrderCalcFields on $projection.PurchaseOrder = _PurchaseOrderCalcFields.PurchaseOrder
{
//Key
key cast (PurchasingDocument as vdm_purchaseorder preserving type) as PurchaseOrder,
//Category
@ObjectModel.foreignKey.association: '_PurchaseOrderType'
cast (PurchasingDocumentType as mm_purchaseordertype preserving type ) as PurchaseOrderType,
PurchasingDocumentSubtype as PurchaseOrderSubtype,
PurchasingDocumentOrigin,
PurchasingDocumentIsAged,
//Admin
CreatedByUser,
// @Semantics.businessDate.createdAt
CreationDate,
cast (PurchasingDocumentOrderDate as bedat preserving type) as PurchaseOrderDate,
@Semantics.language: true
@ObjectModel.foreignKey.association: '_Language'
Language,
//Status
PurchasingDocumentDeletionCode,
ReleaseIsNotCompleted,
PurchasingCompletenessStatus,
PurchasingProcessingStatus,
PurgReleaseSequenceStatus,
ReleaseCode,
PurchasingReleaseStrategy,
//Organization
@ObjectModel.foreignKey.association: '_CompanyCode'
CompanyCode,
@ObjectModel.foreignKey.association: '_PurchasingOrganization'
PurchasingOrganization,
@ObjectModel.foreignKey.association: '_PurchasingGroup'
PurchasingGroup,
//Supplier
@ObjectModel.foreignKey.association: '_Supplier'
Supplier,
ManualSupplierAddressID,
SupplierAddressID,
SupplierRespSalesPersonName,
SupplierPhoneNumber,
@ObjectModel.foreignKey.association: '_SupplyingSupplier'
SupplyingSupplier,
@ObjectModel.foreignKey.association: '_SupplyingPlant'
SupplyingPlant,
@ObjectModel.foreignKey.association: '_InvoicingParty'
InvoicingParty,
Customer,
//References
CorrespncExternalReference, //Your reference
CorrespncInternalReference, //Our reference
// Contract
PurchaseContract,
// Request For Quotation
RequestForQuotation,
//Quotation
SupplierQuotationExternalID,
//PaymentTerms
@ObjectModel.foreignKey.association: '_PaymentTerms'
PaymentTerms,
CashDiscount1Days,
CashDiscount2Days,
NetPaymentDays,
CashDiscount1Percent,
CashDiscount2Percent,
//DownPayment
DownPaymentType,
DownPaymentPercentageOfTotAmt,
@Semantics.amount.currencyCode: 'DocumentCurrency'
DownPaymentAmount,
DownPaymentDueDate,
//Incoterms
@ObjectModel.foreignKey.association: '_IncotermsClassification'
IncotermsClassification,
IncotermsTransferLocation,
@ObjectModel.foreignKey.association: '_IncotermsVersion'
IncotermsVersion,
IncotermsLocation1,
IncotermsLocation2,
//Intratat
IsIntrastatReportingRelevant,
IsIntrastatReportingExcluded,
//Pricing
PricingDocument as PurchasingDocumentCondition,
PricingProcedure,
@Semantics.currencyCode
@ObjectModel.foreignKey.association: '_DocumentCurrency'
DocumentCurrency,
ValidityStartDate,
ValidityEndDate,
@Consumption.hidden: true
ExchangeRate,
ExchangeRateIsFixed,
LastChangeDateTime,
@Semantics.booleanIndicator: true
IsEndOfPurposeBlocked,
TaxReturnCountry,
VATRegistrationCountry,
PurgReasonForDocCancellation,
@Semantics.amount.currencyCode: 'DocumentCurrency'
PurgReleaseTimeTotalAmount,
//_CompanyCode.FiscalYearVariant as FiscalYearVariant,
// Associations
@ObjectModel.association.type: [#TO_COMPOSITION_CHILD]
_PurchaseOrderItem,
_PurchaseOrderType,
_CompanyCode,
_CreatedByUser,
_Supplier,
_SupplyingSupplier,
_InvoicingParty,
_PurchasingOrganization,
_PurchasingGroup,
_DocumentCurrency,
_IncotermsClassification,
_IncotermsVersion,
_SupplyingPlant,
_PaymentTerms,
@VDM.lifecycle.status: #DEPRECATED
@VDM.lifecycle.successor: '_SupplierAddress_2'
_SupplierAddress,
_SupplierAddress_2,
_Language,
_PurchaseOrderCalcFields
//Missing Associations
//_AllContacts
// Partner
//Conditions
//PricingProcedure
}
where
R_PurchasingDocument.PurchasingDocumentCategory = 'F'
and R_PurchasingDocument.PurchasingDocumentIsAged = ''
and IsEndOfPurposeBlocked = ''
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