I_LstMiRouteDocumentItem
Last Mile Distribution Route Doc Item
I_LstMiRouteDocumentItem is a Basic CDS View that provides data about "Last Mile Distribution Route Doc Item" in SAP S/4HANA. It reads from 1 data source (lmd_com_doc_itms) and exposes 41 fields with key field LastMileRouteDocumentItemUUID. It has 6 associations to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| lmd_com_doc_itms | lmd_com_doc_itms | from |
Associations (6)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..1] | I_LstMiRouteDocument | _Document | $projection.LstMiRouteDocumentHeaderUUID = _Document.LstMiRouteDocumentHeaderUUID and $projection.LastMileRouteUUID = _Document.LastMileRouteUUID |
| [1..1] | I_LstMiRoute | _Route | $projection.LastMileRouteUUID = _Route.LastMileRouteUUID |
| [0..1] | I_LstMiRouteStop | _Stop | $projection.LastMileRouteStopUUID = _Stop.LastMileRouteStopUUID and $projection.LastMileRouteUUID = _Stop.LastMileRouteUUID |
| [1..1] | I_LstMiRteDocItemProductVH | _ProductVH | $projection.ProductID = _ProductVH.ProductID and $projection.LastMileRouteUUID = _ProductVH.LastMileRouteUUID |
| [1..1] | I_SalesDocumentExtdItem | _SalesDocumentItem | $projection.ReferenceSDDocument = _SalesDocumentItem.SalesDocument and $projection.ReferenceSDDocumentItem = _SalesDocumentItem.SalesDocumentItem |
| [0..*] | I_LstMiRteDocItemCondition | _DocumentItemCondition | $projection.LastMileRouteDocumentItemUUID = _DocumentItemCondition.LastMileRouteDocumentItemUUID |
Annotations (11)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | ILSTMIDOCITM | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| VDM.viewType | #BASIC | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| EndUserText.label | Last Mile Distribution Route Doc Item | view | |
| AccessControl.personalData.blocking | #REQUIRED | view |
Fields (41)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | LastMileRouteDocumentItemUUID | document_item_uuid | Document Item UUID | |
| LastMileRouteUUID | route_uuid | Route UUID | ||
| LastMileRouteStopUUID | stop_uuid | Stop UUID | ||
| LstMiRouteDocumentHeaderUUID | document_header_uuid | Document Header UUID | ||
| LastMileRouteDocumentType | lmd_document_type | Document Type | ||
| SDDocument | document_id | Snapshot ID | ||
| SDDocumentItem | item_number | Position | ||
| HigherLevelItem | hl_item_number | Item ID | ||
| ProductID | product_id | Simulated Product ID | ||
| LastMileRoutePlannedQuantity | quantity | Value | ||
| LastMileRouteActualQuantity | actual_quantity | Quantity | ||
| UnitOfMsrOfDelivUnit | uom | UoM: Conv. to | ||
| Batch | batch | Lot No. | ||
| Plant | plant | Valuation Area | ||
| LastMileRouteProductIsReturn | is_return_item | Return | ||
| LastMileRouteProductIsFreeGood | is_free_goods_item | Free Goods Item | ||
| LastMileRouteItemReasonCode | reason_code | Return/Change Reason | ||
| LastMileRouteRefDocumentType | ref_lmd_doc_type | Document Type | ||
| ReferenceSDDocument | ref_doc_id | Document No. | ||
| ReferenceSDDocumentItem | ref_doc_id_item | Item ID | ||
| CustomerReferenceNumber | Customer Reference Number | |||
| LastMileRouteUnloadingLocation | unloading_point | Unloading Point | ||
| LastMileRouteIsMnllyAddedRecd | is_manually_added | Manually Added | ||
| LastMileRouteItemIsTiedEmpty | is_tied_empty | Tied Empty | ||
| LastMileRouteItemIsUntiedEmpty | is_untied_empty | Untied Empty | ||
| LstMiRouteDocumentItemCurrency | currency | Valuation Crcy | ||
| LstMiRouteDocumentItemAmount | total_gross_amount | amount | ||
| LstMiRtePriceCondition1Value | Condition Value 1 | |||
| LstMiRtePriceCondition2Value | Condition Value 2 | |||
| LstMiRtePriceCondition3Value | Condition Value 3 | |||
| LstMiRtePriceCondition4Value | Condition Value 4 | |||
| LastMileRteInventoryGroupCode | inventory_group | Inventory Group | ||
| LstMiRteInvtryGrpDiffCode | inventory_group_diff | Difference Inventory Group | ||
| OmniChannelSalesPromotion | bob_promotion_id | OmniChnl PromoID | ||
| LstMiRteOmniChannelFreeGoodsID | bob_free_goods_id | FGID OmniChnl | ||
| _Document | _Document | |||
| _SalesDocumentItem | _SalesDocumentItem | |||
| _DocumentItemCondition | _DocumentItemCondition | |||
| _Route | _Route | |||
| _Stop | _Stop | |||
| _ProductVH | _ProductVH |
Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.
-- Derived SQL interpretation of CDS view I_LstMiRouteDocumentItem.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.
-- SQL view name: ILSTMIDOCITM
CREATE VIEW I_LstMiRouteDocumentItem AS
SELECT
document_item_uuid AS LastMileRouteDocumentItemUUID,
route_uuid AS LastMileRouteUUID,
stop_uuid AS LastMileRouteStopUUID,
document_header_uuid AS LstMiRouteDocumentHeaderUUID,
lmd_document_type AS LastMileRouteDocumentType,
document_id AS SDDocument,
item_number AS SDDocumentItem,
hl_item_number AS HigherLevelItem,
product_id AS ProductID,
quantity AS LastMileRoutePlannedQuantity,
actual_quantity AS LastMileRouteActualQuantity,
uom AS UnitOfMsrOfDelivUnit,
Batch,
Plant,
is_return_item AS LastMileRouteProductIsReturn,
is_free_goods_item AS LastMileRouteProductIsFreeGood,
reason_code AS LastMileRouteItemReasonCode,
ref_lmd_doc_type AS LastMileRouteRefDocumentType,
ref_doc_id AS ReferenceSDDocument,
ref_doc_id_item AS ReferenceSDDocumentItem,
cast( customer_reference_number as /plmb/ecr_cust_change_no ) AS CustomerReferenceNumber,
unloading_point AS LastMileRouteUnloadingLocation,
is_manually_added AS LastMileRouteIsMnllyAddedRecd,
is_tied_empty AS LastMileRouteItemIsTiedEmpty,
is_untied_empty AS LastMileRouteItemIsUntiedEmpty,
currency AS LstMiRouteDocumentItemCurrency,
total_gross_amount AS LstMiRouteDocumentItemAmount,
cast( condition_value_1 as abap.dec(23,2) ) AS LstMiRtePriceCondition1Value,
cast( condition_value_2 as abap.dec(23,2) ) AS LstMiRtePriceCondition2Value,
cast( condition_value_3 as abap.dec(23,2) ) AS LstMiRtePriceCondition3Value,
cast( condition_value_4 as abap.dec(23,2) ) AS LstMiRtePriceCondition4Value,
inventory_group AS LastMileRteInventoryGroupCode,
inventory_group_diff AS LstMiRteInvtryGrpDiffCode,
bob_promotion_id AS OmniChannelSalesPromotion,
bob_free_goods_id AS LstMiRteOmniChannelFreeGoodsID
FROM lmd_com_doc_itms
LEFT OUTER JOIN I_LstMiRouteDocument AS _Document ON LstMiRouteDocumentHeaderUUID = _Document.LstMiRouteDocumentHeaderUUID AND LastMileRouteUUID = _Document.LastMileRouteUUID -- association [1..1]
LEFT OUTER JOIN I_LstMiRoute AS _Route ON LastMileRouteUUID = _Route.LastMileRouteUUID -- association [1..1]
LEFT OUTER JOIN I_LstMiRouteStop AS _Stop ON LastMileRouteStopUUID = _Stop.LastMileRouteStopUUID AND LastMileRouteUUID = _Stop.LastMileRouteUUID -- association [0..1]
LEFT OUTER JOIN I_LstMiRteDocItemProductVH AS _ProductVH ON ProductID = _ProductVH.ProductID AND LastMileRouteUUID = _ProductVH.LastMileRouteUUID -- association [1..1]
LEFT OUTER JOIN I_SalesDocumentExtdItem AS _SalesDocumentItem ON ReferenceSDDocument = _SalesDocumentItem.SalesDocument AND ReferenceSDDocumentItem = _SalesDocumentItem.SalesDocumentItem -- association [1..1]
LEFT OUTER JOIN I_LstMiRteDocItemCondition AS _DocumentItemCondition ON LastMileRouteDocumentItemUUID = _DocumentItemCondition.LastMileRouteDocumentItemUUID -- association [0..*]
;
Learn More
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- 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
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- S/4HANA CDS View Deprecation: What You Need to Know
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA