C_MRPOutboundDeliveryCard is a Consumption CDS View that provides data about "Quick view for MRP Outbound Delivery" in SAP S/4HANA. It has 3 associations to related views. It is exposed through 5 OData services (ASQL_F0246A, ASQL_F0263A, ASQL_F7681, ...). Part of development package ODATA_PP_MRP.
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 C_MRPOutboundDeliveryCard.-- 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.CREATE VIEW C_MRPOutboundDeliveryCard ASSELECT
I_MRPOutboundDelivery.Delivery AS OutboundDelivery,
I_MRPOutboundDelivery.DeliveryItem AS OutboundDeliveryItem,
I_MRPOutboundDelivery.DeliveryType AS DeliveryType,
I_MRPOutboundDelivery.MRPPlant AS MRPPlant,
I_MRPOutboundDelivery.MRPPlantName AS MRPPlantName,
I_MRPOutboundDelivery.BaseUnit AS BaseUnit,
I_MRPOutboundDelivery.SalesUnit AS SalesUnit,
I_MRPOutboundDelivery.DeliveredQuantityInSalesUnit AS DeliveredQuantityInSalesUnit,
I_MRPOutboundDelivery.Customer AS Customer,
I_MRPOutboundDelivery.CustomerName AS CustomerName,
cast('' as ad_namtext) AS ContactPersonName,
cast('' as ad_tlnmbr1) AS ContactPersonPhoneNumber,
cast('' as ad_smtpadr) AS InternalContactEmailAddress,
I_MRPOutboundDelivery.DocumentDate AS DocumentDate,
I_MRPOutboundDelivery.ProductAvailabilityDate AS ProductAvailabilityDate,
I_MRPOutboundDelivery.RequestedLoadingDate AS RequestedLoadingDate,
I_MRPOutboundDelivery.RequestedDeliveryDate AS RequestedDeliveryDate,
I_MRPOutboundDelivery.DeliveredQuantityInBaseUnit AS DeliveredQuantityInBaseUnit,
I_MRPOutboundDelivery.ReferenceDocument AS ReferenceDocument,
I_MRPOutboundDelivery.DeliveryPriority AS DeliveryPriority,
I_MRPOutboundDelivery.DeliveryPriorityDesc AS DeliveryPriorityDesc,
I_MRPOutboundDelivery.DeliveryBlockReason AS DeliveryBlockReason,
I_MRPOutboundDelivery.DeliveryBlockReasonText AS DeliveryBlockReasonText,
cast(0 as mng01) AS OpenDeliveryQuantity,
I_MRPOutboundDelivery.OrderQuantity AS OrderQuantityInBaseUnit,
I_MRPOutboundDelivery.ReferenceDocumentItem AS ReferenceDocumentItem,
_SalesDocumentItem.SalesDocumentItemText AS SalesDocumentItemText,
I_MRPOutboundDelivery.ReferenceSDDocumentCategory AS ReferenceSDDocumentCategory,
I_MRPOutboundDelivery.ReferenceSDDocument AS ReferenceSDDocument,
cast ( concat( ltrim ( I_MRPOutboundDelivery.Delivery, '0' ), concat( '-', ltrim ( I_MRPOutboundDelivery.DeliveryItem, '0' ) ) ) as abap.char( 18 ) ) as SourceOrderName AS char18asSourceOrderName,
MaterialByCustomer,
WBSElementExternalID,
WBSDescription,
ResponsiblePerson,
ResponsiblePersonName,
ProjectExternalID,
ProjectDescription,
I_MRPOutboundDelivery.Material AS Material,
I_MRPOutboundDelivery.MaterialName AS MaterialName,
cast ( 'VJ' as delkz preserving type ) AS MRPElementCategory,
cast( concat( _MRPElementCategoryText.MRPElementCategoryShortName, concat( '-', concat( ltrim ( I_MRPOutboundDelivery.Delivery, '0' ), concat( '-', ltrim ( I_MRPOutboundDelivery.DeliveryItem, '0' ) ) ) ) ) as char30 ) as MRPAffectedOrder AS DeliveryItem0aschar30asMRPAffectedOrder,
cast ( casewhen Customer is initial then 'X' else '' endas boolean preserving type ) AS UICT_Customer,
cast ( '' as boolean preserving type ) AS UICT_ContactPersonName,
cast ( '' as boolean preserving type ) AS UICT_ContactPersonPhoneNumber,
cast ( '' as boolean preserving type ) AS UICT_IntContactEmailAddress,
cast ( casewhen DocumentDate is initial then 'X' else '' endas boolean preserving type ) AS UICT_DocumentDate,
cast ( casewhen ProductAvailabilityDate is initial then 'X' else '' endas boolean preserving type ) AS UICT_ProductAvailabilityDate,
cast ( casewhen RequestedLoadingDate is initial then 'X' else '' endas boolean preserving type ) AS UICT_RequestedLoadingDate,
cast ( casewhen RequestedDeliveryDate is initial then 'X' else '' endas boolean preserving type ) AS UICT_RequestedDeliveryDate,
cast ( casewhen DeliveredQuantityInBaseUnit is initial then 'X' else '' endas boolean preserving type ) AS UICT_DeliveredQuantInBaseUnit,
cast ( casewhen ReferenceDocument is initial then 'X' else '' endas boolean preserving type ) AS UICT_ReferenceDocument,
cast ( casewhen DeliveryPriority is initial then 'X' else '' endas boolean preserving type ) AS UICT_DeliveryPriority,
cast ( casewhen deliveryblockreason is initial then 'X' else '' endas boolean preserving type ) AS UICT_DeliveryBlockReason,
cast ( '' as boolean preserving type ) AS UICT_OpenDeliveryQuantity,
cast ( casewhen OrderQuantityInBaseUnit is initial then 'X' else '' endas boolean preserving type ) AS UICT_OrderQuantityInBaseUnit,
cast ( casewhen MaterialByCustomer is initial then 'X' else '' endas boolean preserving type ) AS UICT_MaterialByCustomer,
cast ( casewhen WBSElementExternalID is initial then 'X' else '' endas boolean preserving type ) AS UICT_WBSElementExternalID,
cast ( casewhen WBSDescription is initial then 'X' else '' endas boolean preserving type ) AS UICT_WBSDescription,
cast ( casewhen ResponsiblePerson = '00000000' then 'X' else '' endas boolean preserving type ) AS UICT_ResponsiblePerson,
cast ( casewhen ResponsiblePersonName is initial then 'X' else '' endas boolean preserving type ) AS UICT_ResponsiblePersonName,
cast ( casewhen ProjectExternalID is initial then 'X' else '' endas boolean preserving type ) AS UICT_ProjectExternalID,
cast ( casewhen ProjectDescription is initial then 'X' else '' endas boolean preserving type ) AS UICT_ProjectDescription,
cast ( casewhen Material is initial then 'X' else '' endas boolean preserving type ) AS UICT_Material,
cast ( casewhen MaterialName is initial then 'X' else '' endas boolean preserving type ) AS UICT_MaterialName
LEFTOUTERJOIN C_OutboundDeliveryFs AS _OutboundDelivery ON OutboundDelivery = _OutboundDelivery.OutboundDelivery -- association [1..1]LEFTOUTERJOIN I_MRPElementCategoryText AS _MRPElementCategoryText ON _MRPElementCategoryText.MRPElementCategory = 'VJ' AND _MRPElementCategoryText.Language = $session.system_language -- association [0..1]LEFTOUTERJOIN I_SalesDocumentItem AS _SalesDocumentItem ON ReferenceDocument = _SalesDocumentItem.SalesDocument AND ReferenceDocumentItem = _SalesDocumentItem.SalesDocumentItem -- association [0..1]
;