I_PurchaseOrderEnhanced
Purchase Order enhanced
I_PurchaseOrderEnhanced is a Composite CDS View that provides data about "Purchase Order enhanced" in SAP S/4HANA. It reads from 1 data source (R_PurchaseOrder) and exposes 69 fields with key field PurchaseOrder. It has 10 associations to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| R_PurchaseOrder | R_PurchaseOrder | from |
Associations (10)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_Address | _SupplierAddress | $projection.SupplierAddressID = _SupplierAddress.AddressID |
| [0..1] | I_PurchaseOrderNetAmount | _PurchaseOrderNetAmount | $projection.PurchaseOrder = _PurchaseOrderNetAmount.PurchaseOrder |
| [0..1] | I_PurchaseOrderStatus | _PurchaseOrderStatus | $projection.PurchaseOrder = _PurchaseOrderStatus.PurchaseOrder |
| [0..*] | I_PurchaseorderItemEnhanced | _PurchaseOrderItem | $projection.PurchaseOrder = _PurchaseOrderItem.PurchaseOrder |
| [0..*] | I_PurchaseorderItemEnhanced | _PurchaseOrderLimitItem | $projection.PurchaseOrder = _PurchaseOrderLimitItem.PurchaseOrder |
| [0..1] | I_PurchasingDocumentStatus | _Status | $projection.purchasingdocumentstatus = _Status.PurchasingDocumentStatus |
| [0..1] | lfa1 | _lfa1 | _lfa1.lifnr = $projection.Supplier |
| [0..1] | I_OvrdPurOrdItemsCount | _OvrdPurOrdItemsCount | $projection.PurchaseOrder = _OvrdPurOrdItemsCount.PurchaseOrder |
| [0..1] | E_PurchasingDocument | _HeaderExtension | $projection.PurchaseOrder = _HeaderExtension.PurchasingDocument |
| [0..1] | R_PurOrdHasItemHierarchy | _PurOrdHasItemHierarchy | $projection.PurchaseOrder = _PurOrdHasItemHierarchy.PurchaseOrder |
Annotations (16)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.preserveKey | true | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.sqlViewName | IMMPURORDENH | view | |
| EndUserText.label | Purchase Order enhanced | view | |
| VDM.viewType | #COMPOSITE | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| ObjectModel.modelCategory | #BUSINESS_OBJECT | view | |
| ObjectModel.compositionRoot | true | view | |
| ObjectModel.semanticKey | PurchaseOrder | view | |
| ObjectModel.representativeKey | PurchaseOrder | view | |
| ObjectModel.usageType.serviceQuality | #B | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| AccessControl.personalData.blocking | #BLOCKED_DATA_EXCLUDED | view | |
| VDM.lifecycle.contract.type | #SAP_INTERNAL_API | view |
Fields (69)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | PurchaseOrder | PurchaseOrder | ||
| PurchaseOrderType | PurchaseOrderType | |||
| PurchaseOrderSubtype | PurchaseOrderSubtype | |||
| PurchasingDocumentIsAged | PurchasingDocumentIsAged | |||
| PurchasingDocumentOrigin | PurchasingDocumentOrigin | |||
| CreatedByUser | CreatedByUser | |||
| CreationDate | CreationDate | |||
| PurchaseOrderDate | PurchaseOrderDate | |||
| ValidityStartDate | ValidityStartDate | |||
| ValidityEndDate | ValidityEndDate | |||
| Language | Language | |||
| PurchasingDocumentDeletionCode | PurchaseOrderDeletionCode | |||
| ReleaseIsNotCompleted | ReleaseIsNotCompleted | |||
| PurchasingCompletenessStatus | PurchasingCompletenessStatus | |||
| CompanyCode | CompanyCode | |||
| PurchasingOrganization | PurchasingOrganization | |||
| PurchasingGroup | PurchasingGroup | |||
| Supplier | Supplier | |||
| SupplierRespSalesPersonName | SupplierRespSalesPersonName | |||
| SupplierPhoneNumber | SupplierPhoneNumber | |||
| ManualSupplierAddressID | ManualSupplierAddressID | |||
| SupplierName | _lfa1 | name1 | ||
| SupplyingSupplier | SupplyingSupplier | |||
| SupplyingPlant | SupplyingPlant | |||
| InvoicingParty | InvoicingParty | |||
| PaymentTerms | PaymentTerms | |||
| CashDiscount1Days | CashDiscount1Days | |||
| CashDiscount2Days | CashDiscount2Days | |||
| NetPaymentDays | NetPaymentDays | |||
| CashDiscount1Percent | CashDiscount1Percent | |||
| CashDiscount2Percent | CashDiscount2Percent | |||
| IncotermsClassification | IncotermsClassification | |||
| IncotermsTransferLocation | IncotermsTransferLocation | |||
| IncotermsVersion | IncotermsVersion | |||
| IncotermsLocation1 | IncotermsLocation1 | |||
| IncotermsLocation2 | IncotermsLocation2 | |||
| CorrespncExternalReference | CorrespncExternalReference | |||
| CorrespncInternalReference | CorrespncInternalReference | |||
| IsIntrastatReportingRelevant | IsIntrastatReportingRelevant | |||
| IsIntrastatReportingExcluded | IsIntrastatReportingExcluded | |||
| PurchasingDocumentCondition | PricingDocument | |||
| PricingProcedure | PricingProcedure | |||
| DocumentCurrency | DocumentCurrency | |||
| ExchangeRate | ExchangeRate | |||
| IsEndOfPurposeBlocked | IsEndOfPurposeBlocked | |||
| PurgDocDefaultShippingType | PurgDocDefaultShippingType | |||
| PurchaseOrderNetAmount | ||||
| PurchasingDocumentStatus | ||||
| NumberOfOverduePurOrdItm | _OvrdPurOrdItemsCount | NumberOfOverduePurOrdItm | ||
| PurchasingHasItemHierarchy | _PurOrdHasItemHierarchy | PurchasingHasItemHierarchy | ||
| _PurchaseOrderItem | _PurchaseOrderItem | |||
| _PurchaseOrderLimitItem | _PurchaseOrderLimitItem | |||
| _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 | R_PurchaseOrder | _SupplierAddress | ||
| _Status | _Status | |||
| _Language | _Language |
@AbapCatalog.preserveKey: true
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.sqlViewName: 'IMMPURORDENH'
@EndUserText.label: 'Purchase Order enhanced'
@VDM.viewType : #COMPOSITE
@AccessControl.authorizationCheck: #CHECK
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel: {
modelCategory: #BUSINESS_OBJECT,
compositionRoot:true,
semanticKey: 'PurchaseOrder',
representativeKey: 'PurchaseOrder'
}
@ObjectModel.usageType.serviceQuality: #B
@ObjectModel.usageType.sizeCategory: #L
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@AccessControl.personalData.blocking: #BLOCKED_DATA_EXCLUDED
@AccessControl.privilegedAssociations: [ '_SupplierAddress', '_SupplierAddress_2' ]
@VDM.lifecycle.contract.type: #SAP_INTERNAL_API
define view I_PurchaseOrderEnhanced
as select from R_PurchaseOrder
association [0..1] to I_Address as _SupplierAddress on $projection.SupplierAddressID = _SupplierAddress.AddressID
association [0..1] to I_PurchaseOrderNetAmount as _PurchaseOrderNetAmount on $projection.PurchaseOrder = _PurchaseOrderNetAmount.PurchaseOrder
association [0..1] to I_PurchaseOrderStatus as _PurchaseOrderStatus on $projection.PurchaseOrder = _PurchaseOrderStatus.PurchaseOrder
association [0..*] to I_PurchaseorderItemEnhanced as _PurchaseOrderItem on $projection.PurchaseOrder = _PurchaseOrderItem.PurchaseOrder
//S/4 LIMIT
association [0..*] to I_PurchaseorderItemEnhanced as _PurchaseOrderLimitItem on $projection.PurchaseOrder = _PurchaseOrderLimitItem.PurchaseOrder
association [0..1] to I_PurchasingDocumentStatus as _Status on $projection.purchasingdocumentstatus = _Status.PurchasingDocumentStatus
association [0..1] to lfa1 as _lfa1 on _lfa1.lifnr = $projection.Supplier
//association [0..*] to P_OvrdPurOrdItems as _OvrdPurOrdItems on $projection.PurchaseOrder = _OvrdPurOrdItems.PurchaseOrder
association [0..1] to I_OvrdPurOrdItemsCount as _OvrdPurOrdItemsCount on $projection.PurchaseOrder = _OvrdPurOrdItemsCount.PurchaseOrder
association [0..1] to E_PurchasingDocument as _HeaderExtension on $projection.PurchaseOrder = _HeaderExtension.PurchasingDocument
association [0..1] to R_PurOrdHasItemHierarchy as _PurOrdHasItemHierarchy on $projection.PurchaseOrder = _PurOrdHasItemHierarchy.PurchaseOrder
{
//Key
key PurchaseOrder,
//Category
@ObjectModel.foreignKey.association: '_PurchaseOrderType'
PurchaseOrderType,
PurchaseOrderSubtype,
PurchasingDocumentIsAged,
PurchasingDocumentOrigin,
//Admin
CreatedByUser,
@Semantics.businessDate.createdAt
CreationDate,
PurchaseOrderDate,
ValidityStartDate,
ValidityEndDate,
@Semantics.language: true
@ObjectModel.foreignKey.association: '_Language'
Language,
//Status
PurchaseOrderDeletionCode as PurchasingDocumentDeletionCode,
ReleaseIsNotCompleted,
PurchasingCompletenessStatus,
//Organization
@ObjectModel.foreignKey.association: '_CompanyCode'
CompanyCode,
@ObjectModel.foreignKey.association: '_PurchasingOrganization'
PurchasingOrganization,
@ObjectModel.foreignKey.association: '_PurchasingGroup'
PurchasingGroup,
//Supplier
@ObjectModel.foreignKey.association: '_Supplier'
Supplier,
SupplierRespSalesPersonName,
SupplierPhoneNumber,
ManualSupplierAddressID,
case ManualSupplierAddressID
when '' then _lfa1.adrnr
else ManualSupplierAddressID
end as SupplierAddressID,
_lfa1.name1 as SupplierName,
@ObjectModel.foreignKey.association: '_SupplyingSupplier'
SupplyingSupplier,
@ObjectModel.foreignKey.association: '_SupplyingPlant'
SupplyingPlant,
@ObjectModel.foreignKey.association: '_InvoicingParty'
InvoicingParty,
//PaymentTerms
@ObjectModel.foreignKey.association: '_PaymentTerms'
PaymentTerms,
CashDiscount1Days,
CashDiscount2Days,
NetPaymentDays,
CashDiscount1Percent,
CashDiscount2Percent,
//Incoterms
@ObjectModel.foreignKey.association: '_IncotermsClassification'
IncotermsClassification,
IncotermsTransferLocation,
@ObjectModel.foreignKey.association: '_IncotermsVersion'
IncotermsVersion,
IncotermsLocation1,
IncotermsLocation2,
//References
CorrespncExternalReference, //Your reference
CorrespncInternalReference, //Our reference
//Intrastat
IsIntrastatReportingRelevant,
IsIntrastatReportingExcluded,
//Pricing
PricingDocument as PurchasingDocumentCondition,
PricingProcedure,
@Semantics.currencyCode
@ObjectModel.foreignKey.association: '_DocumentCurrency'
DocumentCurrency,
ExchangeRate,
//Data Privacy and Protection
IsEndOfPurposeBlocked,
PurgDocDefaultShippingType,
//Additional Calculated fields
@Semantics.amount.currencyCode: 'DocumentCurrency'
@DefaultAggregation: #SUM
coalesce(_PurchaseOrderNetAmount.PurchaseOrderNetAmount, cast(0 as bwert)) as PurchaseOrderNetAmount, -- to ensure the corrupt documents are properly calculated
@ObjectModel.foreignKey.association: '_Status'
_PurchaseOrderStatus.PurchasingDocumentStatus,
_OvrdPurOrdItemsCount.NumberOfOverduePurOrdItm,
// Associations
//field from complex hierarchies
@ObjectModel: { readOnly: 'EXTERNAL_CALCULATION'}
_PurOrdHasItemHierarchy.PurchasingHasItemHierarchy,
@ObjectModel.association.type: [#TO_COMPOSITION_CHILD]
_PurchaseOrderItem,
@ObjectModel.association.type: [#TO_COMPOSITION_CHILD]
_PurchaseOrderLimitItem,
_PurchaseOrderType,
_CompanyCode,
_CreatedByUser,
_Supplier,
_SupplyingSupplier,
_InvoicingParty,
_PurchasingOrganization,
_PurchasingGroup,
_DocumentCurrency,
_IncotermsClassification,
_IncotermsVersion,
_SupplyingPlant,
_PaymentTerms,
@VDM.lifecycle.status: #DEPRECATED
@VDM.lifecycle.successor: '_SupplierAddress_2'
_SupplierAddress,
R_PurchaseOrder._SupplierAddress as _SupplierAddress_2,
_Status,
_Language
//_OvrdPurOrdItems
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_OVRDPURORDITEMSCOUNT",
"I_PURCHASEORDERNETAMOUNT",
"I_PURCHASEORDERSTATUS",
"R_PURCHASEORDER",
"R_PURORDHASITEMHIERARCHY",
"LFA1"
],
"ASSOCIATED":
[
"E_PURCHASINGDOCUMENT",
"I_ADDRESS",
"I_COMPANYCODE",
"I_CURRENCY",
"I_INCOTERMSCLASSIFICATION",
"I_INCOTERMSVERSION",
"I_LANGUAGE",
"I_OVRDPURORDITEMSCOUNT",
"I_PAYMENTTERMS",
"I_PLANT",
"I_PURCHASEORDERITEMENHANCED",
"I_PURCHASEORDERNETAMOUNT",
"I_PURCHASEORDERSTATUS",
"I_PURCHASEORDERTYPE",
"I_PURCHASINGDOCUMENTSTATUS",
"I_PURCHASINGGROUP",
"I_PURCHASINGORGANIZATION",
"I_SUPPLIER",
"I_USER",
"R_PURCHASEORDERSUPPLIERADDRESS",
"R_PURORDHASITEMHIERARCHY",
"LFA1"
],
"BASE":
[
"R_PURCHASEORDER"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
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