I_FldLogsPurchasingItem
Field Logistics Purchasing Items
I_FldLogsPurchasingItem is a Composite CDS View that provides data about "Field Logistics Purchasing Items" in SAP S/4HANA. It reads from 2 data sources (I_FldLogsPlants, I_PurchasingDocumentItem) and exposes 53 fields with key fields PurchasingDocument, PurchasingDocumentItem, DeliveryDocument, DeliveryDocumentItem. It has 12 associations to related views.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| I_FldLogsPlants | _FldLogsAllPlants | inner |
| I_PurchasingDocumentItem | _PurchasingDocumentItem | from |
Associations (12)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_FldLogsPurOrdOpenQty | _POOpenQty | $projection.PurchasingDocument = _POOpenQty.PurchasingDocument and $projection.PurchasingDocumentItem = _POOpenQty.PurchasingDocumentItem |
| [0..*] | I_FldLogsValuationType | _ValuationType | _PurchasingDocumentItem.Material = _ValuationType.Material and _PurchasingDocumentItem.Plant = _ValuationType.Plant |
| [0..1] | I_FldLogsMaterialDetails | _MaterialDetails | _PurchasingDocumentItem.Material = _MaterialDetails.Material |
| [1..1] | I_FldLogsMaterialPlantDetails | _ProductPlant | _PurchasingDocumentItem.Material = _ProductPlant.Material and _PurchasingDocumentItem.Plant = _ProductPlant.Plant |
| [0..1] | I_FldLogsAggregateBlockedQty | _OpenBlockedItems | $projection.PurchasingDocument = _OpenBlockedItems.PurchaseOrder and $projection.PurchasingDocumentItem = _OpenBlockedItems.PurchaseOrderItem |
| [0..1] | I_FldLogsAggregateReceivedQty | _ReceivedItems | $projection.PurchasingDocument = _ReceivedItems.PurchaseOrder and $projection.PurchasingDocumentItem = _ReceivedItems.PurchaseOrderItem |
| [0..1] | I_FldLogsInbDelivWhseTsk | _FldLogsInbDelivWhseTsk | _DeliveryItem.DistrStatusByDecentralizedWrhs is not initial and $projection.DeliveryDocumentItem = _FldLogsInbDelivWhseTsk.DeliveryDocumentItem and _DeliveryItem.DeliveryDocument = _FldLogsInbDelivWhseTsk.DeliveryDocument |
| [0..1] | I_FldLogsAggregateDelivQty | _DeliveryAggrgQty | _DeliveryItem.DeliveryDocument is not initial and _DeliveryItem.DeliveryDocument = _DeliveryAggrgQty.DeliveryDocument and $projection.DeliveryDocumentItem = _DeliveryAggrgQty.DeliveryDocumentItem |
| [0..1] | I_FldLogsOpenPackQty | _OpenPackQty | _DeliveryItem.DeliveryDocument is not initial and _DeliveryItem.DeliveryDocument = _OpenPackQty.DeliveryDocument and $projection.DeliveryDocumentItem = _OpenPackQty.DeliveryDocumentItem |
| [0..1] | I_Supplier | _Supplier | $projection.supplier = _Supplier.Supplier |
| [0..1] | I_Customer | _SoldToParty | _DeliveryItem.SoldToParty = _SoldToParty.Customer |
| [0..1] | I_Customer | _ShipToParty | _DeliveryItem.ShipToParty = _ShipToParty.Customer |
Annotations (8)
| Name | Value | Level | Field |
|---|---|---|---|
| AccessControl.authorizationCheck | #MANDATORY | view | |
| EndUserText.label | Field Logistics Purchasing Items | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| VDM.viewType | #COMPOSITE | view | |
| VDM.lifecycle.contract.type | #SAP_INTERNAL_API | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view |
Fields (53)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | PurchasingDocument | I_PurchasingDocumentItem | PurchasingDocument | |
| KEY | PurchasingDocumentItem | I_PurchasingDocumentItem | PurchasingDocumentItem | |
| KEY | DeliveryDocument | |||
| KEY | DeliveryDocumentItem | |||
| PurchaseRequisition | I_PurchasingDocumentItem | PurchaseRequisition | ||
| PurchaseRequisitionItem | I_PurchasingDocumentItem | PurchaseRequisitionItem | ||
| FldLogsPurOrdItem | ||||
| FldLogsDelivDocItem | ||||
| IsCompletelyDelivered | I_PurchasingDocumentItem | IsCompletelyDelivered | ||
| Material | I_PurchasingDocumentItem | Material | ||
| Plant | I_PurchasingDocumentItem | Plant | ||
| TargetStockType | I_PurchasingDocumentItem | StockType | ||
| DeliveryDate | ||||
| FldLogsDelivQty | ||||
| DeliveryQuantityUnit | _DeliveryItem | DeliveryQuantityUnit | ||
| OpenQtyInPurchaseOrderUnit | _POOpenQty | OpenQtyInPurchaseOrderUnit | ||
| FldLogsBlockedQty | ||||
| FldLogsTotalReceivedQty | ||||
| FldLogsPOTotalQty | I_PurchasingDocumentItem | OrderQuantity | ||
| OrderQuantityUnit | I_PurchasingDocumentItem | OrderQuantityUnit | ||
| StorageLocationendasStorageLocation | ||||
| Batch | ||||
| DocumentCurrency | I_PurchasingDocumentItem | DocumentCurrency | ||
| NetPriceAmount | I_PurchasingDocumentItem | NetPriceAmount | ||
| PurchasingDocumentSubtype | ||||
| Supplier | ||||
| MaterialGroup | I_PurchasingDocumentItem | MaterialGroup | ||
| _MaterialDetails | _MaterialDetails | |||
| _POOpenQty | _POOpenQty | |||
| _ValuationType | _ValuationType | |||
| _ProductPlant | _ProductPlant | |||
| _PurchasingDocument | I_PurchasingDocumentItem | _PurchasingDocument | ||
| _Plant | I_PurchasingDocumentItem | _Plant | ||
| _Supplier | _Supplier | |||
| InboundDelivery | _DeliveryItem | DeliveryDocument | ||
| GoodsMovementStatus | _DeliveryItem | GoodsMovementStatus | ||
| ActualDeliveryQuantity | _DeliveryItem | ActualDeliveryQuantity | ||
| InventoryValuationType | ||||
| FldLogsStatus | _DeliveryItem | FldLogsStatus | ||
| DistrStatusByDecentralizedWrhs | _DeliveryItem | DistrStatusByDecentralizedWrhs | ||
| DeliveryDocumentBySupplier | _DeliveryItem | DeliveryDocumentBySupplier | ||
| LoadingPoint | _DeliveryItem | LoadingPoint | ||
| UnloadingPointName | _DeliveryItem | UnloadingPointName | ||
| PickingStatus | _DeliveryItem | PickingStatus | ||
| IsToBeAcceptedAtOrigin | ||||
| PurchasingDocumentItemCategory | I_PurchasingDocumentItem | PurchasingDocumentItemCategory | ||
| IsEndOfPurposeBlocked | ||||
| IsBusinessPurposeCompleted | _ShipToParty | IsBusinessPurposeCompleted | ||
| IsBusPrpsCmpltdCustomer | _SoldToParty | IsBusinessPurposeCompleted | ||
| SuplrCoIsBusPrpsCmpltd | ||||
| _FldLogsInbDelivWhseTsk | _FldLogsInbDelivWhseTsk | |||
| _OpenPackQty | _OpenPackQty | |||
| _DeliveryAggrgQty | _DeliveryAggrgQty |
@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #MANDATORY
@EndUserText.label: 'Field Logistics Purchasing Items'
@Metadata.ignorePropagatedAnnotations: true
@VDM.viewType: #COMPOSITE
@VDM.lifecycle.contract.type: #SAP_INTERNAL_API
@ObjectModel.usageType:{
serviceQuality: #C,
sizeCategory: #L,
dataClass: #TRANSACTIONAL
}
define view entity I_FldLogsPurchasingItem
as select from I_PurchasingDocumentItem as _PurchasingDocumentItem
// Replace with new CDS -2
inner join I_FldLogsPlants as _FldLogsAllPlants on _PurchasingDocumentItem.Plant = _FldLogsAllPlants.Plant
// Temporary join - replace with new return flag check -1
left outer to one join I_FldLogsPlantBasic as _RemotePlant on _PurchasingDocumentItem.Plant = _RemotePlant.Plant
left outer to one join I_FldLogsDeliveryDocItem as _DeliveryItem on _PurchasingDocumentItem.PurchasingDocument = _DeliveryItem.ReferenceSDDocument
and _PurchasingDocumentItem.PurchasingDocumentItem = _DeliveryItem.PurchasingDocumentItem
association [0..1] to I_FldLogsPurOrdOpenQty as _POOpenQty on $projection.PurchasingDocument = _POOpenQty.PurchasingDocument
and $projection.PurchasingDocumentItem = _POOpenQty.PurchasingDocumentItem
// 2 step GR for future release
// association [0..1] to I_FldLogsPurchasingDocItem as _POOrigin on _PurchasingDocumentItem.PurchasingDocument = _POOrigin.PurchasingDocument
// and _PurchasingDocumentItem.PurchasingDocumentItem = _POOrigin.PurchasingDocumentItem
association [0..*] to I_FldLogsValuationType as _ValuationType on _PurchasingDocumentItem.Material = _ValuationType.Material
and _PurchasingDocumentItem.Plant = _ValuationType.Plant
association [0..1] to I_FldLogsMaterialDetails as _MaterialDetails on _PurchasingDocumentItem.Material = _MaterialDetails.Material
association [1..1] to I_FldLogsMaterialPlantDetails as _ProductPlant on _PurchasingDocumentItem.Material = _ProductPlant.Material
and _PurchasingDocumentItem.Plant = _ProductPlant.Plant
// 2 step GR for future release
association [0..1] to I_FldLogsAggregateBlockedQty as _OpenBlockedItems on $projection.PurchasingDocument = _OpenBlockedItems.PurchaseOrder
and $projection.PurchasingDocumentItem = _OpenBlockedItems.PurchaseOrderItem
association [0..1] to I_FldLogsAggregateReceivedQty as _ReceivedItems on $projection.PurchasingDocument = _ReceivedItems.PurchaseOrder
and $projection.PurchasingDocumentItem = _ReceivedItems.PurchaseOrderItem
association [0..1] to I_FldLogsInbDelivWhseTsk as _FldLogsInbDelivWhseTsk on _DeliveryItem.DistrStatusByDecentralizedWrhs is not initial
and $projection.DeliveryDocumentItem = _FldLogsInbDelivWhseTsk.DeliveryDocumentItem
and _DeliveryItem.DeliveryDocument = _FldLogsInbDelivWhseTsk.DeliveryDocument
association [0..1] to I_FldLogsAggregateDelivQty as _DeliveryAggrgQty on _DeliveryItem.DeliveryDocument is not initial
and _DeliveryItem.DeliveryDocument = _DeliveryAggrgQty.DeliveryDocument
and $projection.DeliveryDocumentItem = _DeliveryAggrgQty.DeliveryDocumentItem
association [0..1] to I_FldLogsOpenPackQty as _OpenPackQty on _DeliveryItem.DeliveryDocument is not initial
and _DeliveryItem.DeliveryDocument = _OpenPackQty.DeliveryDocument
and $projection.DeliveryDocumentItem = _OpenPackQty.DeliveryDocumentItem
association [0..1] to I_Supplier as _Supplier on $projection.supplier = _Supplier.Supplier
association [0..1] to I_Customer as _SoldToParty on _DeliveryItem.SoldToParty = _SoldToParty.Customer
association [0..1] to I_Customer as _ShipToParty on _DeliveryItem.ShipToParty = _ShipToParty.Customer
{
key _PurchasingDocumentItem.PurchasingDocument as PurchasingDocument,
key _PurchasingDocumentItem.PurchasingDocumentItem as PurchasingDocumentItem,
key coalesce( _DeliveryItem.DeliveryDocument, ' ') as DeliveryDocument,
key coalesce( _DeliveryItem.DeliveryDocumentItem, '000000' ) as DeliveryDocumentItem,
_PurchasingDocumentItem.PurchaseRequisition as PurchaseRequisition,
_PurchasingDocumentItem.PurchaseRequisitionItem as PurchaseRequisitionItem,
concat(concat(_PurchasingDocumentItem.PurchasingDocument, '/'), _PurchasingDocumentItem.PurchasingDocumentItem) as FldLogsPurOrdItem,
concat(concat(_DeliveryItem.DeliveryDocument, '/'), _DeliveryItem.DeliveryDocumentItem) as FldLogsDelivDocItem,
_PurchasingDocumentItem.IsCompletelyDelivered as IsCompletelyDelivered,
_PurchasingDocumentItem.Material as Material,
_PurchasingDocumentItem.Plant as Plant,
_PurchasingDocumentItem.StockType as TargetStockType,
coalesce( _DeliveryItem.DeliveryDate,_POOpenQty.DeliveryDate ) as DeliveryDate,
@Semantics.quantity.unitOfMeasure: 'OrderQuantityUnit'
cast( coalesce( _DeliveryItem.ActualDeliveryQuantity,0) as lfimg ) as FldLogsDelivQty,
_DeliveryItem.DeliveryQuantityUnit,
@Semantics.quantity.unitOfMeasure: 'OrderQuantityUnit'
_POOpenQty.OpenQtyInPurchaseOrderUnit,
// 2 step GR for future release
@Semantics.quantity.unitOfMeasure: 'OrderQuantityUnit'
cast( coalesce( _OpenBlockedItems.FldLogsBlockedQty, 0 ) as lfimg ) as FldLogsBlockedQty,
@Semantics.quantity.unitOfMeasure: 'OrderQuantityUnit'
cast( coalesce( _ReceivedItems.FldLogsTotalReceivedQty, 0 ) as lfimg ) as FldLogsTotalReceivedQty,
@Semantics.quantity.unitOfMeasure: 'OrderQuantityUnit'
_PurchasingDocumentItem.OrderQuantity as FldLogsPOTotalQty,
_PurchasingDocumentItem.OrderQuantityUnit as OrderQuantityUnit,
//2370018858 Remote STO Storage location
case when _PurchasingDocumentItem._PurchasingDocument.PurchasingDocumentSubtype = 'T'
then _PurchasingDocumentItem.StorageLocation
else
coalesce(_DeliveryItem.StorageLocation,_PurchasingDocumentItem.StorageLocation ) end as StorageLocation,
coalesce(_DeliveryItem.Batch,_POOpenQty.Batch) as Batch,
_PurchasingDocumentItem.DocumentCurrency as DocumentCurrency,
@Semantics.amount.currencyCode: 'DocumentCurrency'
_PurchasingDocumentItem.NetPriceAmount as NetPriceAmount,
_PurchasingDocumentItem._PurchasingDocument.PurchasingDocumentSubtype,
_PurchasingDocumentItem._PurchasingDocument.Supplier,
case when _PurchasingDocumentItem.StockType = 'X'
then cast('X' as boolean )
else cast( '' as boolean) end as QltyMgmtInProcmtIsActive,
_PurchasingDocumentItem.MaterialGroup,
_MaterialDetails,
_POOpenQty,
_ValuationType,
_ProductPlant,
_PurchasingDocumentItem._PurchasingDocument,
_PurchasingDocumentItem._Plant,
_Supplier,
_DeliveryItem.DeliveryDocument as InboundDelivery,
_DeliveryItem.GoodsMovementStatus,
case when _DeliveryItem.GoodsMovementType is not initial
then _DeliveryItem.GoodsMovementType
else
case when _OpenBlockedItems.GoodsMovementType = '103'
then cast('105' as bwart)
when _OpenBlockedItems.GoodsMovementType = '107'
then cast('109' as bwart)
else cast('101' as bwart)
end end as GoodsMovementType,
@Semantics.quantity.unitOfMeasure: 'OrderQuantityUnit'
_DeliveryItem.ActualDeliveryQuantity,
coalesce(_DeliveryItem.InventoryValuationType, _PurchasingDocumentItem.ValuationType) as InventoryValuationType,
_DeliveryItem.FldLogsStatus,
_DeliveryItem.DistrStatusByDecentralizedWrhs,
_DeliveryItem.DeliveryDocumentBySupplier,
_DeliveryItem.LoadingPoint,
_DeliveryItem.UnloadingPointName,
_DeliveryItem.PickingStatus,
cast('' as boolean) as IsToBeAcceptedAtOrigin,
_PurchasingDocumentItem.PurchasingDocumentItemCategory,
@Semantics.booleanIndicator: true
_PurchasingDocumentItem._PurchasingDocument.IsEndOfPurposeBlocked,
@Semantics.booleanIndicator: true
_ShipToParty.IsBusinessPurposeCompleted,
@Semantics.booleanIndicator: true
_SoldToParty.IsBusinessPurposeCompleted as IsBusPrpsCmpltdCustomer,
@Semantics.booleanIndicator: true
_DeliveryItem._Supplier.IsBusinessPurposeCompleted as SuplrCoIsBusPrpsCmpltd,
_FldLogsInbDelivWhseTsk,
_OpenPackQty,
_DeliveryAggrgQty
}
where
(
_PurchasingDocumentItem.PurchasingDocumentCategory = 'F' // To support receipt of Purchase orders and Stock Transport orders
or _PurchasingDocumentItem.PurchasingDocumentCategory = 'L' // L is added to support sub contracting PO's
)
and(
_PurchasingDocumentItem.PurchasingDocumentItemCategory = '0' // To support only POs and STOs for stock items
or _PurchasingDocumentItem.PurchasingDocumentItemCategory = '7'
or _PurchasingDocumentItem.PurchasingDocumentItemCategory = '3' // 3 is added to support sub contracting PO's
)
and(
_PurchasingDocumentItem.ProductType = '1'
or _PurchasingDocumentItem.ProductType is initial
) //Stock Items
and(
_PurchasingDocumentItem._PurchasingDocument.PurchasingDocumentSubtype = 'T'
//Required to process the items having Account Assignment - Q Project Stock
or _PurchasingDocumentItem.AccountAssignmentCategory = 'Q'
or _PurchasingDocumentItem.AccountAssignmentCategory is initial
)
and _PurchasingDocumentItem.IsReturnsItem is initial
and _PurchasingDocumentItem.PurchasingDocumentDeletionCode is initial
// filter for remote plant return STO will not be needed once return item flag is checkcan ed in return STO
and(
(
_PurchasingDocumentItem._PurchasingDocument.SupplyingPlant is not initial
and _RemotePlant.Plant = _PurchasingDocumentItem.Plant
)
or _PurchasingDocumentItem._PurchasingDocument.SupplyingPlant is initial
)
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_CUSTOMER",
"I_FLDLOGSAGGREGATEBLOCKEDQTY",
"I_FLDLOGSAGGREGATERECEIVEDQTY",
"I_FLDLOGSDELIVERYDOCITEM",
"I_FLDLOGSPLANTBASIC",
"I_FLDLOGSPLANTS",
"I_FLDLOGSPURORDOPENQTY",
"I_PURCHASINGDOCUMENT",
"I_PURCHASINGDOCUMENTITEM",
"I_SUPPLIER"
],
"ASSOCIATED":
[
"I_FLDLOGSAGGREGATEDELIVQTY",
"I_FLDLOGSINBDELIVWHSETSK",
"I_FLDLOGSMATERIALDETAILS",
"I_FLDLOGSMATERIALPLANTDETAILS",
"I_FLDLOGSOPENPACKQTY",
"I_FLDLOGSPURORDOPENQTY",
"I_FLDLOGSVALUATIONTYPE",
"I_PLANT",
"I_PURCHASINGDOCUMENT",
"I_SUPPLIER"
],
"BASE":
[
"I_PURCHASINGDOCUMENTITEM"
],
"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