P_LogcDocDeliveryItem
Log Doc - Delivery Item
P_LogcDocDeliveryItem is a Consumption CDS View that provides data about "Log Doc - Delivery Item" in SAP S/4HANA. It reads from 1 data source (I_DeliveryDocumentItem) and exposes 13 fields with key fields DeliveryDocument, DeliveryDocumentItem. It has 2 associations to related views. Part of development package EHDGM_CNS_MARKINGS_AND_LABELS.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_DeliveryDocumentItem | I_DeliveryDocumentItem | from |
Associations (2)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..*] | I_ProductText | _ProductText | $projection.Product = _ProductText.Product |
| [0..*] | I_UnitOfMeasureText | _QuantityUnitText | $projection.OrderQuantityUnit = _QuantityUnitText.UnitOfMeasure |
Annotations (4)
| Name | Value | Level | Field |
|---|---|---|---|
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| VDM.private | true | view | |
| VDM.viewType | #CONSUMPTION | view | |
| Metadata.ignorePropagatedAnnotations | true | view |
Fields (13)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | DeliveryDocument | DeliveryDocument | ||
| KEY | DeliveryDocumentItem | DeliveryDocumentItem | ||
| ProdCmplncLogsDocumentCategory | ||||
| Product | Product | |||
| OrderQuantity | ActualDeliveryQuantity | |||
| OrderQuantityUnit | DeliveryQuantityUnit | |||
| ClassifiedAsDangerousGood | ||||
| ClassifiedAsDangerousGoodName | ||||
| _ProductText | _ProductText | |||
| _QuantityUnitText | _QuantityUnitText | |||
| DepartureCountry | ||||
| DestinationCountry | ||||
| ShippingPoint | _DeliveryDocument | ShippingPoint |
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM: {
private: true,
viewType: #CONSUMPTION
}
@Metadata.ignorePropagatedAnnotations: true
define view entity P_LogcDocDeliveryItem
as select from I_DeliveryDocumentItem
association [0..*] to I_ProductText as _ProductText on $projection.Product = _ProductText.Product
// needed to redefine because of different cardinality between the union views
association [0..*] to I_UnitOfMeasureText as _QuantityUnitText on $projection.OrderQuantityUnit = _QuantityUnitText.UnitOfMeasure
{
key DeliveryDocument,
key DeliveryDocumentItem,
//SDDocumentCategory,
// USE THE SAME LOGIC AS IN P_LogcDocDelivery
cast ('LF' as ehfnd_log_doc_category) as ProdCmplncLogsDocumentCategory,
// cast (
// case
// when PurchasingDocumentCategory = 'J'
// then 'LF' // Outbound Delivery (EHFND_LOG_DOC_CATEGORY)
// end as ehfnd_log_doc_category) as ProdCmplncLogsDocumentCategory
@ObjectModel.text.association: '_ProductText'
Product,
// the actual quantity is the real quantity used for the delivery
@Semantics.quantity.unitOfMeasure: 'OrderQuantityUnit'
ActualDeliveryQuantity as OrderQuantity,
// OriginalDeliveryQuantity,
// @Semantics.unitOfMeasure: true
@ObjectModel.text.association: '_QuantityUnitText'
DeliveryQuantityUnit as OrderQuantityUnit,
cast ('' as classifiedasdangerousgood) as ClassifiedAsDangerousGood,
cast( '' as val_text) as ClassifiedAsDangerousGoodName,
// needed to mark the blocked logistic document items
cast (
case
when DangerousGoodsStatus = 'F' // DOM_DGSTA_LE - Blocked – Transport Forbidden
then 'X'
when DangerousGoodsStatus = 'G' // DOM_DGSTA_LE - Blocked – Decision Pending
then 'X'
end as boole_d) as IsBlocked,
// Associations
_ProductText,
_QuantityUnitText,
@ObjectModel.readOnly:true
@Consumption.hidden: true
_DeliveryDocument._ShippingPoint.ActiveDepartureCountry as DepartureCountry,
@ObjectModel.readOnly:true
@Consumption.hidden: true
_DeliveryDocument._ShipToParty.Country as DestinationCountry,
//Needed for Authorization check
@ObjectModel.readOnly:true
@Consumption.hidden: true
_DeliveryDocument.ShippingPoint as ShippingPoint
}
where
// use only items where the Chemical Complinace Relevant Flag is true
_Product.IsChemicalComplianceRelevant = 'Y'
and(
SDDocumentCategory = 'J'
)
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