I_PurReqnQuickView
Purchase Requisition Details
I_PurReqnQuickView is a Composite CDS View that provides data about "Purchase Requisition Details" in SAP S/4HANA. It reads from 7 data sources and exposes 68 fields with key fields PurchaseRequisition, PurchaseRequisitionItem. It has 8 associations to related views.
Data Sources (7)
| Source | Alias | Join Type |
|---|---|---|
| I_ProductUnitsOfMeasure | _Unit | left_outer |
| P_DDPurchaseRequisition | P_DDPurchaseRequisition | from |
| I_PurchasingInfoRecord | pir | left_outer |
| I_PurReqnAccountAssignment | praccta | left_outer |
| I_ProductSupplyPlanning | prmat | left_outer |
| I_PurgInfoRecdOrgPlantData | prpirpd | left_outer |
| I_WBSElementByInternalKey | WBSElement | left_outer |
Parameters (1)
| Name | Type | Default |
|---|---|---|
| P_MRPElementCategory | delkz |
Associations (8)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_PurgDocumentItemCategory | _PurgDocumentItemCategory | $projection.MaterialProcurementCategory = _PurgDocumentItemCategory.PurchasingDocumentItemCategory |
| [0..1] | I_WBSElement | _WBSElement | $projection.WBSElement = _WBSElement.WBSElement |
| [0..1] | I_UnitOfMeasure | _PurchaseRequisitionUnit | $projection.PurchaseRequisitionUnit = _PurchaseRequisitionUnit.UnitOfMeasure |
| [0..1] | I_Supplier | _Supplier1 | $projection.Supplier = _Supplier1.Supplier |
| [0..1] | I_RoundingPrfText | _RoundingProfile | $projection.MaterialRoundingProfile = _RoundingProfile.MaterialRoundingProfile and $projection.MRPPlant = _RoundingProfile.Plant |
| [0..1] | I_PurchasingDocumentTypeText | _DocTypeTxt | $projection.PurchaseRequisitionType = _DocTypeTxt.PurchasingDocumentType and $projection.PurchasingDocumentCategory = _DocTypeTxt.PurchasingDocumentCategory |
| [0..1] | P_DDMRPController | _MRPController | $projection.SupplyingPlant = _MRPController.Plant and $projection.MRPController = _MRPController.MRPController |
| [0..1] | I_Plant | _SupplyingPlant | $projection.SupplyingPlant = _SupplyingPlant.Plant |
Annotations (10)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | IPURREQQV | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| EndUserText.label | Purchase Requisition Details | view | |
| VDM.viewType | #COMPOSITE | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| ObjectModel.usageType.serviceQuality | #X | view | |
| ObjectModel.usageType.sizeCategory | #XXL | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| AccessControl.personalData.blocking | #BLOCKED_DATA_EXCLUDED | view |
Fields (68)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | PurchaseRequisition | preqitm | PurchaseRequisition | |
| KEY | PurchaseRequisitionItem | preqitm | PurchaseRequisitionItem | |
| Material | preqitm | Material | ||
| MaterialName | MaterialName | |||
| MRPPlant | MRPPlant | |||
| MaterialProcurementCategory | MaterialProcurementCategory | |||
| MaterialProcurementCatName | ||||
| SupplyingPlant | preqitm | SupplyingPlant | ||
| SupplyingPlantName | _SupplyingPlant | PlantName | ||
| MRPController | preqitm | MRPController | ||
| MRPControllerName | _MRPController | MRPControllerName | ||
| InternalContactPersonName | _MRPController | InternalContactName | ||
| MRPControllerPhoneNumber | _MRPController | PhoneNumber | ||
| ContactPersonEmailAddress | _MRPController | EmailAddress | ||
| PurchasingDocumentCategory | preqitm | PurchasingDocumentCategory | ||
| PurchaseRequisitionType | preqitm | PurchaseRequisitionType | ||
| PurchasingDocumentTypeName | ||||
| PurchaseRequisitionIsFixed | preqitm | PurchaseRequisitionIsFixed | ||
| PurchasingInfoRecord | preqitm | PurchasingInfoRecord | ||
| PurchasingOrganization | preqitm | PurchasingOrganization | ||
| SupplierMaterialNumber | preqitm | SupplierMaterialNumber | ||
| MaterialPlannedDeliveryDurn | preqitm | MaterialPlannedDeliveryDurn | ||
| MaterialGoodsReceiptDuration | preqitm | MaterialGoodsReceiptDuration | ||
| ReleaseDate | ReleaseDate | |||
| DeliveryDate | preqitm | DeliveryDate | ||
| PurchaseOutlineAgreement | PurchaseOutlineAgreement | |||
| PurchaseOutlineAgreementItem | PurchaseOutlineAgreementItem | |||
| SalesDocument | I_PurReqnAccountAssignment | SalesOrder | ||
| SalesDocumentItem | I_PurReqnAccountAssignment | SalesOrderItem | ||
| SalesDocumentType | ||||
| SalesOrderItemMaterial | ||||
| SalesOrderItemMaterialName | ||||
| Customer | ||||
| WBSElementInternalID | I_PurReqnAccountAssignment | WBSElementInternalID | ||
| WBSElement | I_WBSElementByInternalKey | WBSElement | ||
| WBSDescription | I_WBSElementByInternalKey | WBSDescription | ||
| WBSElementDescription | ||||
| ProjectInternalID | I_WBSElementByInternalKey | ProjectInternalID | ||
| WBSElementObject | I_WBSElementByInternalKey | WBSElementObject | ||
| Project | ||||
| ProjectDescription | ||||
| StandardPurchaseOrderQuantity | I_PurgInfoRecdOrgPlantData | StandardPurchaseOrderQuantity | ||
| MaximumOrderQuantity | I_PurgInfoRecdOrgPlantData | MaximumOrderQuantity | ||
| MinimumPurchaseOrderQuantity | I_PurgInfoRecdOrgPlantData | MinimumPurchaseOrderQuantity | ||
| MaterialStagingTime | I_PurgInfoRecdOrgPlantData | MaterialStagingTime | ||
| PurchaseOrderRoundingProfile | I_PurgInfoRecdOrgPlantData | MaterialRoundingProfile | ||
| MaterialFixedLotSizeQuantity | I_ProductSupplyPlanning | FixedLotSizeQuantity | ||
| MaterialMinLotSizeQuantity | I_ProductSupplyPlanning | MinimumLotSizeQuantity | ||
| MaterialMaxLotSizeQuantity | I_ProductSupplyPlanning | MaximumLotSizeQuantity | ||
| LotSizeRoundingQuantity | I_ProductSupplyPlanning | LotSizeRoundingQuantity | ||
| MaterialRoundingProfile | I_ProductSupplyPlanning | RoundingProfile | ||
| MaterialRoundingProfileName | ||||
| TotalQuantity | TotalQuantity | |||
| OrderedQuantity | preqitm | OrderedQuantity | ||
| OpenQuantity | OpenQuantity | |||
| PurchaseRequisitionUnit | PurchaseRequisitionUnit | |||
| Supplier | preqitm | Supplier | ||
| SupplierName | _Supplier1 | SupplierName | ||
| SupplierFullName | _Supplier1 | SupplierFullName | ||
| SupplierPhoneNumber | _Supplier1 | PhoneNumber1 | ||
| EmailAddress | ||||
| SupplierIsFixed | preqitm | SupplierIsFixed | ||
| PurchasingGroup | preqitm | PurchasingGroup | ||
| PurchasingGroupName | preqitm | PurchasingGroupName | ||
| PurchasingGroupPhoneNumber | preqitm | PurchasingGroupPhoneNumber | ||
| PurchasingGroupEmailAddress | preqitm | PurchasingGroupEmailAddress | ||
| OrderUnitendasPurgDocOrderQuantityUnit | ||||
| MRPElementCategory |
@AbapCatalog.sqlViewName: 'IPURREQQV'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Purchase Requisition Details'
@VDM.viewType: #COMPOSITE
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType: {serviceQuality: #X, sizeCategory: #XXL, dataClass: #MIXED}
@AccessControl.personalData.blocking: #BLOCKED_DATA_EXCLUDED
define view I_PurReqnQuickView
with parameters
P_MRPElementCategory : delkz
as select from P_DDPurchaseRequisition( P_MRPElementCategory:$parameters.P_MRPElementCategory) as preqitm
left outer join I_PurReqnAccountAssignment as praccta on praccta.PurchaseRequisition = preqitm.PurchaseRequisition //EBKN
and praccta.PurchaseRequisitionItem = preqitm.PurchaseRequisitionItem
and praccta.PurchaseReqnAcctAssgmtNumber = '01'
left outer join I_PurchasingInfoRecord as pir on preqitm.PurchasingInfoRecord = pir.PurchasingInfoRecord
left outer join I_PurgInfoRecdOrgPlantData as prpirpd on prpirpd.PurchasingInfoRecord = preqitm.PurchasingInfoRecord //EINE
and prpirpd.PurchasingOrganization = preqitm.PurchasingOrganization
and prpirpd.Plant = preqitm.Plant
left outer join I_ProductSupplyPlanning as prmat on prmat.Product = preqitm.Material //MARC
and prmat.Plant = preqitm.Plant
left outer join I_WBSElementByInternalKey as WBSElement on WBSElement.WBSElementInternalID = praccta.WBSElementInternalID //PRPS
left outer join I_ProductUnitsOfMeasure as _Unit on preqitm.Material = _Unit.Product //MARM
and preqitm.OrderUnit = _Unit.AlternativeUnit
// Associations for texts (not directly provided by inherited associations)
association [0..1] to I_PurgDocumentItemCategory as _PurgDocumentItemCategory on $projection.MaterialProcurementCategory = _PurgDocumentItemCategory.PurchasingDocumentItemCategory
association [0..1] to I_WBSElement as _WBSElement on $projection.WBSElement = _WBSElement.WBSElement
association [0..1] to I_UnitOfMeasure as _PurchaseRequisitionUnit on $projection.PurchaseRequisitionUnit = _PurchaseRequisitionUnit.UnitOfMeasure
// association [0..1] to I_MRPController as _MRPController on $projection.SupplyingPlant = _MRPController.Plant //T024 & ADR3
// and $projection.MRPController = _MRPController.MRPController
// association [0..1] to I_MRPControllerEmail as _MRPControllerEmail on $projection.SupplyingPlant = _MRPControllerEmail.Plant //ADR6
// and $projection.MRPController = _MRPControllerEmail.MRPController
association [0..1] to I_Supplier as _Supplier1 on $projection.Supplier = _Supplier1.Supplier //LFA1
association [0..1] to I_RoundingPrfText as _RoundingProfile on $projection.MaterialRoundingProfile = _RoundingProfile.MaterialRoundingProfile //RDTX
and $projection.MRPPlant = _RoundingProfile.Plant
association [0..1] to I_PurchasingDocumentTypeText as _DocTypeTxt on $projection.PurchaseRequisitionType = _DocTypeTxt.PurchasingDocumentType //T161T
and $projection.PurchasingDocumentCategory = _DocTypeTxt.PurchasingDocumentCategory
association [0..1] to P_DDMRPController as _MRPController on $projection.SupplyingPlant = _MRPController.Plant
and $projection.MRPController = _MRPController.MRPController
association [0..1] to I_Plant as _SupplyingPlant on $projection.SupplyingPlant = _SupplyingPlant.Plant
{
// Key
key preqitm.PurchaseRequisition,
key preqitm.PurchaseRequisitionItem,
// Material Data
preqitm.Material,
MaterialName,
MRPPlant,
// Procurement Details
MaterialProcurementCategory,
_PurgDocumentItemCategory._Text[1: Language = $session.system_language].PurgDocItemCategoryName as MaterialProcurementCatName,
// Used in STO
preqitm.SupplyingPlant,
_SupplyingPlant.PlantName as SupplyingPlantName,
preqitm.MRPController,
_MRPController.MRPControllerName,
_MRPController.InternalContactName as InternalContactPersonName,
_MRPController.PhoneNumber as MRPControllerPhoneNumber,
_MRPController.EmailAddress as ContactPersonEmailAddress,
preqitm.PurchasingDocumentCategory,
preqitm.PurchaseRequisitionType,
_DocTypeTxt[ 1: Language = $session.system_language ].PurchasingDocumentTypeName,
// Purchasing Related Data
preqitm.PurchaseRequisitionIsFixed,
preqitm.PurchasingInfoRecord,
preqitm.PurchasingOrganization,
preqitm.SupplierMaterialNumber,
preqitm.MaterialPlannedDeliveryDurn,
preqitm.MaterialGoodsReceiptDuration,
ReleaseDate,
preqitm.DeliveryDate,
PurchaseOutlineAgreement,
PurchaseOutlineAgreementItem,
// Sales Document Data
praccta.SalesOrder as SalesDocument,
praccta.SalesOrderItem as SalesDocumentItem,
praccta._SalesOrder.SalesOrderType as SalesDocumentType,
praccta._SalesOrderItem.Material as SalesOrderItemMaterial,
praccta._SalesOrderItem._Material._Text[1: Language = $session.system_language ].MaterialName as SalesOrderItemMaterialName,
praccta._SalesOrder.SoldToParty as Customer,
praccta.WBSElementInternalID,
// WBS and Project Data
WBSElement.WBSElement,
WBSElement.WBSDescription,
_WBSElement._WBSElementLangBsdDesc[1: Language = $session.system_language ].WBSElementLangBsdDescription as WBSElementDescription,
WBSElement.ProjectInternalID,
WBSElement.WBSElementObject,
WBSElement._Project.Project,
WBSElement._Project.ProjectDescription,
// EINE data
prpirpd.StandardPurchaseOrderQuantity,
prpirpd.MaximumOrderQuantity,
prpirpd.MinimumPurchaseOrderQuantity,
prpirpd.MaterialStagingTime,
prpirpd.MaterialRoundingProfile as PurchaseOrderRoundingProfile,
// MARC data
prmat.FixedLotSizeQuantity as MaterialFixedLotSizeQuantity,
prmat.MinimumLotSizeQuantity as MaterialMinLotSizeQuantity,
prmat.MaximumLotSizeQuantity as MaterialMaxLotSizeQuantity,
prmat.LotSizeRoundingQuantity,
prmat.RoundingProfile as MaterialRoundingProfile,
_RoundingProfile[1: Language = $session.system_language ].MaterialRoundingProfileName,
// Quantities and UoM
@Semantics.quantity.unitOfMeasure: 'PurchaseRequisitionUnit'
@DefaultAggregation: #NONE
TotalQuantity,
@Semantics.quantity.unitOfMeasure: 'PurchaseRequisitionUnit'
@DefaultAggregation: #NONE
preqitm.OrderedQuantity,
@Semantics.quantity.unitOfMeasure: 'PurchaseRequisitionUnit'
@DefaultAggregation: #NONE
OpenQuantity,
@Semantics.unitOfMeasure: true
PurchaseRequisitionUnit,
// Supplier Data
preqitm.Supplier,
_Supplier1.SupplierName,
_Supplier1.SupplierFullName,
_Supplier1.PhoneNumber1 as SupplierPhoneNumber,
_Supplier1._StandardAddress._DefaultEmailAddress.EmailAddress,
preqitm.SupplierIsFixed,
// Purchasing Group
preqitm.PurchasingGroup,
preqitm.PurchasingGroupName,
preqitm.PurchasingGroupPhoneNumber,
preqitm.PurchasingGroupEmailAddress,
//pir.PurgDocOrderQuantityUnit,
//pir.OrderItemQtyToBaseQtyNmrtr,
// pir.OrderItemQtyToBaseQtyDnmntr,
case
when preqitm.OrderUnit is null or preqitm.OrderUnit = '' or preqitm.OrderUnit = ' '
then pir.PurgDocOrderQuantityUnit
else preqitm.OrderUnit
end as PurgDocOrderQuantityUnit,
case
when preqitm.OrderUnit is null or preqitm.OrderUnit = '' or preqitm.OrderUnit = ' '
then case preqitm.PurchasingInfoRecord
when ''
then 0
else pir.OrderItemQtyToBaseQtyNmrtr
end
else _Unit.QuantityNumerator
end as OrderItemQtyToBaseQtyNmrtr,
case
when preqitm.OrderUnit is null or preqitm.OrderUnit = '' or preqitm.OrderUnit = ' '
then case preqitm.PurchasingInfoRecord
when ''
then 0
else pir.OrderItemQtyToBaseQtyDnmntr
end
else _Unit.QuantityDenominator
end as OrderItemQtyToBaseQtyDnmntr,
// case $parameters.P_MRPElementCategory
// when 'BA'
// then case
// when preqitm.MaterialProcurementCategory = '7'
// then '022' // STO(Inbound)
// else case
// when preqitm.Supplier is not null and preqitm.Supplier <> ' ' and preqitm.Supplier <> ''
// then '021' // PurReq Sourced
// else case
// when preqitm.FixedSupplier is not null and preqitm.FixedSupplier <> ' ' and preqitm.FixedSupplier <> ''
// then '021' // PurReq Sourced
// else '024' // PurReq Unsourced
// end
// end
// end
// when 'U2'
// then '023' //STO(Outbound)
// else '000'
// end as QuickViewCategory,
$parameters.P_MRPElementCategory as MRPElementCategory
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_ADDRESS",
"I_ADDRESSEMAILADDRESS",
"I_MATERIAL",
"I_MATERIALTEXT",
"I_PLANT",
"I_PRODUCTSUPPLYPLANNING",
"I_PRODUCTUNITSOFMEASURE",
"I_PROJECTBYINTERNALKEY",
"I_PURCHASINGDOCUMENTTYPETEXT",
"I_PURCHASINGINFORECORD",
"I_PURGDOCUMENTITEMCATEGORY",
"I_PURGDOCUMENTITEMCATEGORYTEXT",
"I_PURGINFORECDORGPLANTDATA",
"I_PURREQNACCOUNTASSIGNMENT",
"I_ROUNDINGPRFTEXT",
"I_SALESORDER",
"I_SALESORDERITEM",
"I_SUPPLIER",
"I_WBSELEMENT",
"I_WBSELEMENTBYINTERNALKEY",
"I_WBSELEMENTTEXT",
"P_DDMRPCONTROLLER",
"P_DDPURCHASEREQUISITION"
],
"ASSOCIATED":
[
"I_PLANT",
"I_PURCHASINGDOCUMENTTYPETEXT",
"I_PURGDOCUMENTITEMCATEGORY",
"I_ROUNDINGPRFTEXT",
"I_SUPPLIER",
"I_UNITOFMEASURE",
"I_WBSELEMENT",
"P_DDMRPCONTROLLER"
],
"BASE":
[],
"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