P_DDPurchaseOrder
Purchase Order Basic Details
P_DDPurchaseOrder is a Composite CDS View that provides data about "Purchase Order Basic Details" in SAP S/4HANA. It reads from 3 data sources (I_PurgDocScheduleLine, I_PurchasingDocument, I_PurchasingDocumentItem) and exposes 37 fields with key fields PurchasingDocument, PurchasingDocumentItem, ScheduleLine. It has 2 associations to related views. Part of development package ODATA_PP_DD_ORD_DET.
Data Sources (3)
| Source | Alias | Join Type |
|---|---|---|
| I_PurgDocScheduleLine | eket | left_outer |
| I_PurchasingDocument | ekko | from |
| I_PurchasingDocumentItem | ekpo | inner |
Parameters (1)
| Name | Type | Default |
|---|---|---|
| P_MRPElementCategory | delkz |
Associations (2)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_PurchasingGroup | _PurchasingGroup | $projection.PurchasingGroup = _PurchasingGroup.PurchasingGroup |
| [0..1] | I_PurchasingDocumentTypeText | _DocTypeTxt | $projection.PurchasingDocumentType = _DocTypeTxt.PurchasingDocumentType and $projection.PurchasingDocumentCategory = _DocTypeTxt.PurchasingDocumentCategory |
Annotations (9)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PDDPURORD | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| VDM.private | true | view | |
| VDM.viewType | #COMPOSITE | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| ObjectModel.usageType.serviceQuality | #X | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| ObjectModel.usageType.dataClass | #MASTER | view |
Fields (37)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | PurchasingDocument | I_PurchasingDocument | PurchasingDocument | |
| KEY | PurchasingDocumentItem | I_PurchasingDocumentItem | PurchasingDocumentItem | |
| KEY | ScheduleLine | I_PurgDocScheduleLine | ScheduleLine | |
| Material | I_PurchasingDocumentItem | Material | ||
| MaterialName | ||||
| PurchasingDocumentCategory | I_PurchasingDocument | PurchasingDocumentCategory | ||
| PurchasingDocumentType | I_PurchasingDocument | PurchasingDocumentType | ||
| PurchasingDocumentTypeName | ||||
| PurchasingDocumentItemCategory | I_PurchasingDocumentItem | PurchasingDocumentItemCategory | ||
| Supplier | I_PurchasingDocument | Supplier | ||
| SupplierMaterialNumber | I_PurchasingDocumentItem | SupplierMaterialNumber | ||
| InventorySpecialStockType | I_PurchasingDocumentItem | InventorySpecialStockType | ||
| PlantendasMRPPlant | ||||
| SupplyingPlantendasSupplyingPlant | ||||
| PurchasingInfoRecord | I_PurchasingDocumentItem | PurchasingInfoRecord | ||
| PurchasingOrganization | I_PurchasingDocument | PurchasingOrganization | ||
| PurchasingGroup | I_PurchasingDocument | PurchasingGroup | ||
| PurchasingGroupName | _PurchasingGroup | PurchasingGroupName | ||
| PurchasingGroupEmailAddress | _PurchasingGroup | EmailAddress | ||
| PlannedDeliveryDurationInDays | I_PurchasingDocumentItem | PlannedDeliveryDurationInDays | ||
| GoodsReceiptDurationInDays | I_PurchasingDocumentItem | GoodsReceiptDurationInDays | ||
| DeliveryDate | I_PurgDocScheduleLine | ScheduleLineDeliveryDate | ||
| ProductAvailabilityDate | I_PurgDocScheduleLine | ProductAvailabilityDate | ||
| ScheduleLineOrderDate | I_PurgDocScheduleLine | ScheduleLineOrderDate | ||
| PartialDeliveryIsAllowed | I_PurchasingDocumentItem | PartialDeliveryIsAllowed | ||
| PurchaseContract | I_PurchasingDocumentItem | PurchaseContract | ||
| PurchaseContractItem | I_PurchasingDocumentItem | PurchaseContractItem | ||
| OrderQuantityUnit | I_PurchasingDocumentItem | OrderQuantityUnit | ||
| OrderQuantity | I_PurchasingDocumentItem | OrderQuantity | ||
| ScheduleLineOrderQuantity | I_PurgDocScheduleLine | ScheduleLineOrderQuantity | ||
| RoughGoodsReceiptQty | I_PurgDocScheduleLine | RoughGoodsReceiptQty | ||
| ScheduleLineOpenQuantity | I_PurgDocScheduleLine | ScheduleLineOpenQuantity | ||
| ScheduleLineIssuedQuantity | I_PurgDocScheduleLine | ScheduleLineIssuedQuantity | ||
| StockTransferDeliveredQuantity | I_PurgDocScheduleLine | StockTransferDeliveredQuantity | ||
| ScheduleLineCommittedQuantity | I_PurgDocScheduleLine | ScheduleLineCommittedQuantity | ||
| OrderPriceUnitToOrderUnitNmrtr | I_PurchasingDocumentItem | OrderPriceUnitToOrderUnitNmrtr | ||
| OrdPriceUnitToOrderUnitDnmntr | I_PurchasingDocumentItem | OrdPriceUnitToOrderUnitDnmntr |
@AbapCatalog.sqlViewName: 'PDDPURORD'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
//@EndUserText.label: 'Purchase Order Basic Details'
@VDM.private: true
@VDM.viewType: #COMPOSITE
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType: {serviceQuality: #X, sizeCategory: #XL, dataClass: #MASTER}
define view P_DDPurchaseOrder
with parameters
P_MRPElementCategory : delkz
as select from I_PurchasingDocument as ekko
inner join I_PurchasingDocumentItem as ekpo on ekko.PurchasingDocument = ekpo.PurchasingDocument
left outer join I_PurgDocScheduleLine as eket on ekpo.PurchasingDocument = eket.PurchasingDocument
and ekpo.PurchasingDocumentItem = eket.PurchasingDocumentItem
association [0..1] to I_PurchasingGroup as _PurchasingGroup on $projection.PurchasingGroup = _PurchasingGroup.PurchasingGroup
association [0..1] to I_PurchasingDocumentTypeText as _DocTypeTxt on $projection.PurchasingDocumentType = _DocTypeTxt.PurchasingDocumentType //T161T
and $projection.PurchasingDocumentCategory = _DocTypeTxt.PurchasingDocumentCategory
{
key ekko.PurchasingDocument,
key ekpo.PurchasingDocumentItem,
key eket.ScheduleLine,
ekpo.Material,
_Material._Text[1:Language = $session.system_language].MaterialName,
ekko.PurchasingDocumentCategory,
ekko.PurchasingDocumentType,
_DocTypeTxt[1:Language = $session.system_language].PurchasingDocumentTypeName,
ekpo.PurchasingDocumentItemCategory,
ekko.Supplier,
ekpo.SupplierMaterialNumber,
ekpo.InventorySpecialStockType,
case $parameters.P_MRPElementCategory
when 'BE'
then ekpo.Plant
when 'U1'
then ekko.SupplyingPlant
when 'LE'
then ekpo.Plant
end as MRPPlant,
case $parameters.P_MRPElementCategory
when 'BE'
then ekko.SupplyingPlant
when 'U2'
then ekpo.Plant
when 'LE'
then ekko.SupplyingPlant
end as SupplyingPlant,
ekpo.PurchasingInfoRecord,
ekko.PurchasingOrganization,
ekko.PurchasingGroup,
_PurchasingGroup.PurchasingGroupName,
case _PurchasingGroup.PhoneNumberExtension
when '' then _PurchasingGroup.PurchasingGroupPhoneNumber
else concat(_PurchasingGroup.PhoneNumber, concat('-', _PurchasingGroup.PhoneNumberExtension))
end as PurchasingGroupPhoneNumber,
_PurchasingGroup.EmailAddress as PurchasingGroupEmailAddress,
ekpo.PlannedDeliveryDurationInDays,
ekpo.GoodsReceiptDurationInDays,
eket.ScheduleLineDeliveryDate as DeliveryDate,
eket.ProductAvailabilityDate,
eket.ScheduleLineOrderDate,
ekpo.PartialDeliveryIsAllowed,
ekpo.PurchaseContract,
ekpo.PurchaseContractItem,
ekpo.OrderQuantityUnit,
ekpo.OrderQuantity,
eket.ScheduleLineOrderQuantity,
eket.RoughGoodsReceiptQty,
eket.ScheduleLineOpenQuantity,
eket.ScheduleLineIssuedQuantity,
eket.StockTransferDeliveredQuantity,
eket.ScheduleLineCommittedQuantity,
ekpo.OrderPriceUnitToOrderUnitNmrtr,
ekpo.OrdPriceUnitToOrderUnitDnmntr
}
where
(
ekpo.IsEndOfPurposeBlocked is null
or ekpo.IsEndOfPurposeBlocked = ''
or ekpo.IsEndOfPurposeBlocked = ' '
)
and(
ekko.IsEndOfPurposeBlocked is null
or ekko.IsEndOfPurposeBlocked = ''
or ekko.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