I_LstMiSDInvoice

DDL: I_LSTMISDINVOICE SQL: ILSTMISDINV Type: view COMPOSITE

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)

SourceAliasJoin Type
I_BillingDocument billingDocument from
P_LstMiRteVstToBillingDocument toVisit inner

Associations (2)

CardinalityTargetAliasCondition
[1..1] I_LstMiRoute _Route $projection.LastMileRouteUUID = _Route.LastMileRouteUUID
[1..*] I_LstMiSDOutbDelivToSDInvoice _OutboundDelivery $projection.Invoice = _OutboundDelivery.Invoice

Annotations (11)

NameValueLevelField
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)

KeyFieldSource TableSource FieldDescription
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..*]
;