I_LstMiSDInvoice
Last Mile Distribution SD Invoice
I_LstMiSDInvoice is a Composite CDS View that provides data about "Last Mile Distribution SD Invoice" in SAP S/4HANA. It reads from 2 data sources (I_BillingDocument, P_LstMiRteVstToBillingDocument) and exposes 17 fields with key field Invoice. It has 2 associations to related views.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| I_BillingDocument | billingDocument | from |
| P_LstMiRteVstToBillingDocument | toVisit | inner |
Associations (2)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..1] | I_LstMiRoute | _Route | $projection.LastMileRouteUUID = _Route.LastMileRouteUUID |
| [1..*] | I_LstMiSDOutbDelivToSDInvoice | _OutboundDelivery | $projection.Invoice = _OutboundDelivery.Invoice |
Annotations (11)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | ILSTMISDINV | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| AccessControl.personalData.blocking | #NOT_REQUIRED | view | |
| VDM.viewType | #COMPOSITE | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| EndUserText.label | Last Mile Distribution SD Invoice | view |
Fields (17)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | Invoice | P_LstMiRteVstToBillingDocument | BillingDocument | SD Document |
| LastMileRouteVisitUUID | P_LstMiRteVstToBillingDocument | LastMileRouteVisitUUID | ||
| LastMileRouteUUID | P_LstMiRteVstToBillingDocument | LastMileRouteUUID | ||
| TotalGrossAmount | ||||
| TransactionCurrency | TransactionCurrency | Transaction Currency | ||
| CustomerPaymentTerms | CustomerPaymentTerms | Pyt Terms | ||
| AccountingDocument | AccountingDocument | Journal Entry | ||
| FiscalYear | FiscalYear | G/L Fiscal Year | ||
| CompanyCode | CompanyCode | Receiver Company Code | ||
| OverallSDProcessStatus | OverallSDProcessStatus | |||
| OverallBillingStatus | OverallBillingStatus | |||
| SDDocumentCategory | I_BillingDocument | SDDocumentCategory | Document Cat. | |
| AccountingDocumentCategory | _AccountingDocument | AccountingDocumentCategory | Journal Entry Category | |
| _Route | _Route | |||
| _TransactionCurrency | _TransactionCurrency | |||
| _CustomerPaymentTerms | _CustomerPaymentTerms | |||
| _OutboundDelivery | _OutboundDelivery |
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_LstMiSDInvoice.
-- 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: ILSTMISDINV
CREATE VIEW I_LstMiSDInvoice AS
SELECT
toVisit.BillingDocument AS Invoice,
toVisit.LastMileRouteVisitUUID AS LastMileRouteVisitUUID,
toVisit.LastMileRouteUUID AS LastMileRouteUUID,
cast( ( TotalNetAmount + TotalTaxAmount ) as lmd_sd_invoice_total_gross_amt ) AS TotalGrossAmount,
TransactionCurrency,
CustomerPaymentTerms,
AccountingDocument,
FiscalYear,
CompanyCode,
OverallSDProcessStatus,
OverallBillingStatus,
billingDocument.SDDocumentCategory AS SDDocumentCategory,
_AccountingDocument.AccountingDocumentCategory AS AccountingDocumentCategory
FROM I_BillingDocument AS billingDocument
INNER JOIN P_LstMiRteVstToBillingDocument AS toVisit ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_LstMiRoute AS _Route ON LastMileRouteUUID = _Route.LastMileRouteUUID -- association [1..1]
LEFT OUTER JOIN I_LstMiSDOutbDelivToSDInvoice AS _OutboundDelivery ON Invoice = _OutboundDelivery.Invoice -- association [1..*]
;
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