@AbapCatalog.sqlViewName: 'IMFGORDCNFMATDOC'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #MANDATORY
@AccessControl.personalData.blocking: #NOT_REQUIRED
@Analytics.dataCategory: #DIMENSION
@ClientHandling.algorithm: #SESSION_VARIABLE
@Metadata.allowExtensions: true
@ObjectModel.modelingPattern: #NONE
@ObjectModel.supportedCapabilities: [#ANALYTICAL_DIMENSION, #CDS_MODELING_ASSOCIATION_TARGET, #CDS_MODELING_DATA_SOURCE, #SQL_DATA_SOURCE]
@ObjectModel.representativeKey: 'MaterialDocumentItem'
@ObjectModel.usageType: {serviceQuality: #C, sizeCategory: #XL, dataClass: #TRANSACTIONAL}
@VDM.lifecycle.contract.type: #PUBLIC_LOCAL_API
@VDM.viewType: #COMPOSITE
@EndUserText.label: 'Material Document Items of Mfg Order Confirmation'
define view I_MfgOrderConfMatlDocItem
as select from I_MfgOrderConfirmation as afru
inner join I_OrderConfMatlDocItemAssgmt as afwi on afwi.ConfirmationGroup = afru.MfgOrderConfirmationGroup
and afwi.ConfirmationCount = afru.MfgOrderConfirmation
inner join I_MaterialDocumentRecord as mseg on mseg.MaterialDocumentYear = afwi.MaterialDocumentYear
and mseg.MaterialDocument = afwi.MaterialDocument
and mseg.MaterialDocumentItem = afwi.MaterialDocumentItem
and mseg.MaterialDocumentRecordType = 'MDOC'
association [1..1] to I_ConfirmationCount as _ConfirmationCount on $projection.MfgOrderConfirmationGroup = _ConfirmationCount.ConfirmationGroup
and $projection.MfgOrderConfirmation = _ConfirmationCount.ConfirmationCount
association [1..1] to I_MaterialDocumentHeader_2 as _MaterialDocumentHeader on $projection.MaterialDocument = _MaterialDocumentHeader.MaterialDocument
and $projection.MaterialDocumentYear = _MaterialDocumentHeader.MaterialDocumentYear
association [0..1] to I_CalendarDate as _DocumentDate on $projection.DocumentDate = _DocumentDate.CalendarDate
association [0..1] to I_CalendarDate as _PostingDate on $projection.PostingDate = _PostingDate.CalendarDate
association [0..1] to I_CalendarDate as _ShelfLifeExpirationDate on $projection.ShelfLifeExpirationDate = _ShelfLifeExpirationDate.CalendarDate
association [0..1] to I_CalendarDate as _ManufactureDate on $projection.ManufactureDate = _ManufactureDate.CalendarDate
association [1..1] to I_ManufacturingOrder as _MfgOrder on $projection.ManufacturingOrder = _MfgOrder.ManufacturingOrder
association [0..1] to I_ManufacturingOrderItem as _MfgOrderItem on $projection.ManufacturingOrder = _MfgOrderItem.ManufacturingOrder
and $projection.ManufacturingOrderItem = _MfgOrderItem.ManufacturingOrderItem
association [0..1] to I_ManufacturingOrderSequence as _MfgOrderSequence on $projection.ManufacturingOrder = _MfgOrderSequence.ManufacturingOrder
and $projection.ManufacturingOrderSequence = _MfgOrderSequence.ManufacturingOrderSequence
association [1..1] to I_MfgOrderConfirmation as _MfgOrderConfirmation on $projection.MfgOrderConfirmationGroup = _MfgOrderConfirmation.MfgOrderConfirmationGroup
and $projection.MfgOrderConfirmation = _MfgOrderConfirmation.MfgOrderConfirmation
association [0..1] to I_ReservationDocumentHeader as _Reservation on $projection.Reservation = _Reservation.Reservation
association [0..1] to I_ReservationDocumentItem as _ReservationItem on $projection.Reservation = _ReservationItem.Reservation
and $projection.ReservationItem = _ReservationItem.ReservationItem
and $projection.ReservationRecordType = _ReservationItem.RecordType
association [0..1] to I_ReservationDocRecordType as _ReservationRecordType on $projection.ReservationRecordType = _ReservationRecordType.RecordType
association [1..1] to I_Plant as _Plant on $projection.Plant = _Plant.Plant
association [1..1] to I_Material as _Material on $projection.Material = _Material.Material
association [1..1] to I_UnitOfMeasure as _BaseUnit on $projection.BaseUnit = _BaseUnit.UnitOfMeasure
association [1..1] to I_UnitOfMeasure as _EntryUnit on $projection.EntryUnit = _EntryUnit.UnitOfMeasure
association [1..1] to I_GoodsMovementType as _GoodsMovementType on $projection.GoodsMovementType = _GoodsMovementType.GoodsMovementType
association [0..1] to I_PhysInvtryReasonCode as _GoodsMovementReason on $projection.GoodsMovementType = _GoodsMovementReason.GoodsMovementType
and $projection.GoodsMovementReasonCode = _GoodsMovementReason.ReasonForPhysInvtryDifference
association [0..1] to I_GoodsMovementRefDocType as _GoodsMovementRefDocType on $projection.GoodsMovementRefDocType = _GoodsMovementRefDocType.GoodsMovementRefDocType
association [0..1] to I_InventorySpecialStockType as _InventorySpecialStockType on $projection.InventorySpecialStockType = _InventorySpecialStockType.InventorySpecialStockType
association [0..1] to I_InventoryValuationType as _InventoryValuationType on $projection.InventoryValuationType = _InventoryValuationType.InventoryValuationType
association [0..1] to I_InvtrySpecialStockValnType as _InventorySpecialStockValnType on $projection.InventorySpecialStockValnType = _InventorySpecialStockValnType.InventorySpecialStockValnType
association [0..1] to I_ConsumptionPosting as _ConsumptionPosting on $projection.ConsumptionPosting = _ConsumptionPosting.ConsumptionPosting
association [0..1] to I_DebitCreditCode as _DebitCreditCode on $projection.DebitCreditCode = _DebitCreditCode.DebitCreditCode
association [0..1] to I_StockType_2 as _InventoryUsabilityCode on $projection.InventoryUsabilityCode = _InventoryUsabilityCode.StockType
association [0..1] to I_StorageLocation as _StorageLocation on $projection.Plant = _StorageLocation.Plant
and $projection.StorageLocation = _StorageLocation.StorageLocation
association [0..1] to I_Batch as _Batch on $projection.Plant = _Batch.Plant
and $projection.Material = _Batch.Material
and $projection.Batch = _Batch.Batch
association [0..1] to I_SalesOrder as _SalesOrder on $projection.SalesOrder = _SalesOrder.SalesOrder
association [0..1] to I_SalesOrderItem as _SalesOrderItem on $projection.SalesOrder = _SalesOrderItem.SalesOrder
and $projection.SalesOrderItem = _SalesOrderItem.SalesOrderItem
association [0..1] to I_WBSElementBasicData as _WBSElement on $projection.WBSElementInternalID = _WBSElement.WBSElementInternalID
association [0..1] to I_WBSElementBasicData as _WBSElementBasic on $projection.WBSElementInternalID_2 = _WBSElementBasic.WBSElementInternalID
association [0..1] to I_Supplier as _Supplier on $projection.Supplier = _Supplier.Supplier
association [0..1] to I_Customer as _Customer on $projection.Customer = _Customer.Customer
association [0..1] to I_SupplierCompanyByPlant as _SupplierCompanyByPlant on $projection.Plant = _SupplierCompanyByPlant.Plant
and $projection.Supplier = _SupplierCompanyByPlant.Supplier
association [0..1] to I_CustomerCompanyByPlant as _CustomerCompanyByPlant on $projection.Plant = _CustomerCompanyByPlant.Plant
and $projection.Customer = _CustomerCompanyByPlant.Customer
association [0..1] to I_EWM_WarehouseNumber_2 as _EWMWarehouse on $projection.EWMWarehouse = _EWMWarehouse.EWMWarehouse
association [0..1] to I_EWM_StorageBin_2 as _EWMStorageBin on $projection.EWMWarehouse = _EWMStorageBin.EWMWarehouse
and $projection.EWMStorageBin = _EWMStorageBin.EWMStorageBin
{
// Key
@ObjectModel.foreignKey.association: '_ConfirmationGroup'
key afru.MfgOrderConfirmationGroup,
@ObjectModel.foreignKey.association: '_ConfirmationCount'
key afru.MfgOrderConfirmation,
@ObjectModel.foreignKey.association: '_MaterialDocumentHeader'
key afwi.MaterialDocument,
@ObjectModel.foreignKey.association: '_MaterialDocumentYear'
key cast(afwi.MaterialDocumentYear as nsdm_mjahr preserving type) as MaterialDocumentYear,
@ObjectModel.text.element: ['MaterialDocumentItemText']
key cast(afwi.MaterialDocumentItem as nsdm_mblpo preserving type) as MaterialDocumentItem ,
// Admin
@Semantics.businessDate.at: true
mseg.PostingDate,
@Semantics.systemDate.createdAt: true
mseg.DocumentDate,
@Semantics.user.createdBy: true
cast(mseg.CreatedByUser as ernam preserving type) as CreatedByUser,
// Order and Operation Data
@ObjectModel.foreignKey.association: '_MfgOrder'
afru.ManufacturingOrder,
@ObjectModel.foreignKey.association: '_MfgOrderSequence'
afru.ManufacturingOrderSequence,
@VDM.lifecycle.status: #DEPRECATED
@VDM.lifecycle.successor: 'ManufacturingOrderOperation_2'
afru.ManufacturingOrderOperation, // with conv. exit NUMCV
@ObjectModel.foreignKey.association: '_MfgOrderOperation2'
afru.ManufacturingOrderOperation_2, // w/o conversion exit
@ObjectModel.foreignKey.association: '_MfgOrderItem'
mseg.OrderItem as ManufacturingOrderItem,
@ObjectModel.foreignKey.association: '_MfgOrderCategory'
afru.ManufacturingOrderCategory,
@ObjectModel.foreignKey.association: '_MfgOrderType'
afru.ManufacturingOrderType,
//Confirmation data
@ObjectModel.foreignKey.association: '_ConfirmationPlant'
afru.Plant as ConfirmationPlant,
@Semantics.text: true
afru.ConfirmationText,
@ObjectModel.foreignKey.association: '_FinalConfirmationType'
afru.FinalConfirmationType,
afru.IsFinalConfirmation,
afru.OpenReservationsIsCleared,
@ObjectModel.foreignKey.association: '_ReversedIndicator'
afru.IsReversed,
@ObjectModel.foreignKey.association: '_ReversalIndicator'
afru.IsReversal,
// Goods Movement data
@ObjectModel.foreignKey.association: '_Material'
cast(mseg.Material as co_matnr preserving type) as Material,
@ObjectModel.foreignKey.association: '_Plant'
mseg.Plant as Plant,
@ObjectModel.foreignKey.association: '_Reservation'
mseg.Reservation as Reservation,
@ObjectModel.foreignKey.association: '_ReservationItem'
mseg.ReservationItem as ReservationItem,
@ObjectModel.foreignKey.association: '_ReservationRecordType'
mseg.ReservationRecordType as ReservationRecordType,
@ObjectModel.foreignKey.association: '_StorageLocation'
cast(mseg.StorageLocation as pph_lgort preserving type) as StorageLocation,
@ObjectModel.foreignKey.association: '_Batch'
mseg.Batch as Batch,
@ObjectModel.foreignKey.association: '_InventoryValuationType'
cast(mseg.InventoryValuationType as pph_bwtar preserving type) as InventoryValuationType,
@ObjectModel.foreignKey.association: '_ConsumptionPosting'
cast(mseg.ConsumptionPosting as pph_kzvbr preserving type) as ConsumptionPosting,
-- @ObjectModel.foreignKey.association: '_DebitCreditCode'
cast(mseg.DebitCreditCode as pph_shkzg preserving type) as DebitCreditCode,
@ObjectModel.foreignKey.association: '_GoodsMovementType'
cast(mseg.GoodsMovementType as pph_bwart preserving type) as GoodsMovementType,
@ObjectModel.foreignKey.association: '_GoodsMovementReason'
mseg.GoodsMovementReasonCode as GoodsMovementReasonCode,
@ObjectModel.foreignKey.association: '_GoodsMovementRefDocType'
mseg.GoodsMovementRefDocType as GoodsMovementRefDocType,
@ObjectModel.foreignKey.association: '_InventoryUsabilityCode'
cast(mseg.InventoryUsabilityCode as inventoryusabilitycode preserving type) as InventoryUsabilityCode,
@ObjectModel.foreignKey.association: '_InventorySpecialStockType'
cast(mseg.InventorySpecialStockType as inventoryspecialstocktype preserving type) as InventorySpecialStockType,
@ObjectModel.foreignKey.association: '_InventorySpecialStockValnType'
cast(mseg.InventorySpecialStockValnType as pph_kzbws preserving type) as InventorySpecialStockValnType,
@ObjectModel.foreignKey.association: '_SalesOrder'
cast(mseg.SalesOrder as co_kdauf preserving type) as SalesOrder,
@ObjectModel.foreignKey.association: '_SalesOrderItem'
cast(mseg.SalesOrderItem as co_kdpos preserving type) as SalesOrderItem,
@VDM.lifecycle.status: #DEPRECATED
@VDM.lifecycle.successor: 'WBSElementInternalID_2'
@ObjectModel.foreignKey.association: '_WBSElement'
cast(mseg.WBSElementInternalID as pph_pspel preserving type) as WBSElementInternalID,
@ObjectModel.foreignKey.association: '_WBSElementBasic'
cast(mseg.WBSElementInternalID as ps_s4_pspnr preserving type) as WBSElementInternalID_2,
@ObjectModel.foreignKey.association: '_Supplier'
mseg.Supplier as Supplier,
@ObjectModel.foreignKey.association: '_Customer'
mseg.Customer as Customer,
@Semantics.text: true
cast(mseg.GoodsRecipientName as pph_wempf preserving type) as GoodsRecipientName,
@Semantics.text: true
cast(mseg.UnloadingPointName as ablad preserving type) as UnloadingPointName,
mseg.ReservationIsFinallyIssued as ReservationIsFinallyIssued,
mseg.IsCompletelyDelivered as IsCompletelyDelivered,
mseg.ShelfLifeExpirationDate as ShelfLifeExpirationDate,
mseg.ManufactureDate as ManufactureDate,
mseg.StorageType as StorageType,
mseg.StorageBin as StorageBin,
// EWM Data
@ObjectModel.foreignKey.association: '_EWMWarehouse'
mseg.EWMWarehouse as EWMWarehouse,
-- @ObjectModel.foreignKey.association: '_EWMStorageBin'
mseg.EWMStorageBin as EWMStorageBin,
// Text
@Semantics.text: true
mseg.MaterialDocumentItemText as MaterialDocumentItemText,
// Quantities and UoM
@Semantics.unitOfMeasure: true
mseg.MaterialBaseUnit as BaseUnit,
@Semantics.quantity.unitOfMeasure: 'BaseUnit'
@Aggregation.default: #SUM
cast(mseg.QuantityInBaseUnit as vdm_pp_menge preserving type) as QuantityInBaseUnit,
@Semantics.unitOfMeasure: true
mseg.EntryUnit as EntryUnit,
@Semantics.quantity.unitOfMeasure: 'EntryUnit'
@Aggregation.default: #SUM
cast(mseg.QuantityInEntryUnit as pph_erfmg preserving type) as QuantityInEntryUnit,
// Associations
@Consumption.hidden: true
afru._ConfirmationGroup,
@Consumption.hidden: true
_ConfirmationCount,
@ObjectModel.association.type: [#TO_COMPOSITION_ROOT, #TO_COMPOSITION_PARENT]
_MfgOrderConfirmation,
_MaterialDocumentHeader,
afwi._MaterialDocumentYear,
_MfgOrder,
_MfgOrderSequence,
@VDM.lifecycle.status: #DEPRECATED
@VDM.lifecycle.successor: '_MfgOrderOperation2'
afru._MfgOrderOperation,
afru._MfgOrderOperation2,
_MfgOrderItem,
afru._MfgOrderCategory,
afru._MfgOrderType,
afru._Plant as _ConfirmationPlant,
afru._FinalConfirmationType,
afru._ReversedIndicator,
afru._ReversalIndicator,
_DocumentDate,
_PostingDate,
_ShelfLifeExpirationDate,
_ManufactureDate,
_Material,
_Plant,
_Reservation,
_ReservationItem,
_ReservationRecordType,
_StorageLocation,
_Batch,
_BaseUnit,
_EntryUnit,
_GoodsMovementType,
_GoodsMovementReason,
_GoodsMovementRefDocType,
_InventorySpecialStockType,
_InventorySpecialStockValnType,
_InventoryValuationType,
_ConsumptionPosting,
_DebitCreditCode,
_InventoryUsabilityCode,
_SalesOrder,
_SalesOrderItem,
@VDM.lifecycle.status: #DEPRECATED
@VDM.lifecycle.successor: '_WBSElementBasic'
_WBSElement,
_WBSElementBasic,
_Supplier,
_Customer,
@Consumption.hidden: true
_SupplierCompanyByPlant,
@Consumption.hidden: true
_CustomerCompanyByPlant,
_EWMWarehouse,
_EWMStorageBin
}
union all
select from I_MfgOrderConfirmation as afru
inner join I_MaterialDocumentRecord as mseg on mseg.MaterialDocument = afru.MaterialDocument
and mseg.MaterialDocumentYear = afru.MaterialDocumentYear
and mseg.MaterialDocumentRecordType = 'MDOC'
association [1..1] to I_ConfirmationCount as _ConfirmationCount on $projection.MfgOrderConfirmationGroup = _ConfirmationCount.ConfirmationGroup
and $projection.MfgOrderConfirmation = _ConfirmationCount.ConfirmationCount
association [1..1] to I_MaterialDocumentHeader_2 as _MaterialDocumentHeader on $projection.MaterialDocument = _MaterialDocumentHeader.MaterialDocument
and $projection.MaterialDocumentYear = _MaterialDocumentHeader.MaterialDocumentYear
association [1..1] to I_MaterialDocumentYear as _MaterialDocumentYear on $projection.MaterialDocumentYear = _MaterialDocumentYear.MaterialDocumentYear
association [0..1] to I_CalendarDate as _DocumentDate on $projection.DocumentDate = _DocumentDate.CalendarDate
association [0..1] to I_CalendarDate as _PostingDate on $projection.PostingDate = _PostingDate.CalendarDate
association [0..1] to I_CalendarDate as _ShelfLifeExpirationDate on $projection.ShelfLifeExpirationDate = _ShelfLifeExpirationDate.CalendarDate
association [0..1] to I_CalendarDate as _ManufactureDate on $projection.ManufactureDate = _ManufactureDate.CalendarDate
association [1..1] to I_ManufacturingOrder as _MfgOrder on $projection.ManufacturingOrder = _MfgOrder.ManufacturingOrder
association [0..1] to I_ManufacturingOrderItem as _MfgOrderItem on $projection.ManufacturingOrder = _MfgOrderItem.ManufacturingOrder
and $projection.ManufacturingOrderItem = _MfgOrderItem.ManufacturingOrderItem
association [0..1] to I_ManufacturingOrderSequence as _MfgOrderSequence on $projection.ManufacturingOrder = _MfgOrderSequence.ManufacturingOrder
and $projection.ManufacturingOrderSequence = _MfgOrderSequence.ManufacturingOrderSequence
association [1..1] to I_MfgOrderConfirmation as _MfgOrderConfirmation on $projection.MfgOrderConfirmationGroup = _MfgOrderConfirmation.MfgOrderConfirmationGroup
and $projection.MfgOrderConfirmation = _MfgOrderConfirmation.MfgOrderConfirmation
association [0..1] to I_ReservationDocumentHeader as _Reservation on $projection.Reservation = _Reservation.Reservation
association [0..1] to I_ReservationDocumentItem as _ReservationItem on $projection.Reservation = _ReservationItem.Reservation
and $projection.ReservationItem = _ReservationItem.ReservationItem
and $projection.ReservationRecordType = _ReservationItem.RecordType
association [0..1] to I_ReservationDocRecordType as _ReservationRecordType on $projection.ReservationRecordType = _ReservationRecordType.RecordType
association [1..1] to I_Plant as _Plant on $projection.Plant = _Plant.Plant
association [1..1] to I_Material as _Material on $projection.Material = _Material.Material
association [1..1] to I_UnitOfMeasure as _BaseUnit on $projection.BaseUnit = _BaseUnit.UnitOfMeasure
association [1..1] to I_UnitOfMeasure as _EntryUnit on $projection.EntryUnit = _EntryUnit.UnitOfMeasure
association [1..1] to I_GoodsMovementType as _GoodsMovementType on $projection.GoodsMovementType = _GoodsMovementType.GoodsMovementType
association [0..1] to I_PhysInvtryReasonCode as _GoodsMovementReason on $projection.GoodsMovementType = _GoodsMovementReason.GoodsMovementType
and $projection.GoodsMovementReasonCode = _GoodsMovementReason.ReasonForPhysInvtryDifference
association [0..1] to I_GoodsMovementRefDocType as _GoodsMovementRefDocType on $projection.GoodsMovementRefDocType = _GoodsMovementRefDocType.GoodsMovementRefDocType
association [0..1] to I_InventorySpecialStockType as _InventorySpecialStockType on $projection.InventorySpecialStockType = _InventorySpecialStockType.InventorySpecialStockType
association [0..1] to I_InventoryValuationType as _InventoryValuationType on $projection.InventoryValuationType = _InventoryValuationType.InventoryValuationType
association [0..1] to I_InvtrySpecialStockValnType as _InventorySpecialStockValnType on $projection.InventorySpecialStockValnType = _InventorySpecialStockValnType.InventorySpecialStockValnType
association [0..1] to I_ConsumptionPosting as _ConsumptionPosting on $projection.ConsumptionPosting = _ConsumptionPosting.ConsumptionPosting
association [0..1] to I_DebitCreditCode as _DebitCreditCode on $projection.DebitCreditCode = _DebitCreditCode.DebitCreditCode
association [0..1] to I_StockType_2 as _InventoryUsabilityCode on $projection.InventoryUsabilityCode = _InventoryUsabilityCode.StockType
association [0..1] to I_StorageLocation as _StorageLocation on $projection.Plant = _StorageLocation.Plant
and $projection.StorageLocation = _StorageLocation.StorageLocation
association [0..1] to I_Batch as _Batch on $projection.Plant = _Batch.Plant
and $projection.Material = _Batch.Material
and $projection.Batch = _Batch.Batch
association [0..1] to I_SalesOrder as _SalesOrder on $projection.SalesOrder = _SalesOrder.SalesOrder
association [0..1] to I_SalesOrderItem as _SalesOrderItem on $projection.SalesOrder = _SalesOrderItem.SalesOrder
and $projection.SalesOrderItem = _SalesOrderItem.SalesOrderItem
association [0..1] to I_WBSElementBasicData as _WBSElement on $projection.WBSElementInternalID = _WBSElement.WBSElementInternalID
association [0..1] to I_WBSElementBasicData as _WBSElementBasic on $projection.WBSElementInternalID_2 = _WBSElementBasic.WBSElementInternalID
association [0..1] to I_Supplier as _Supplier on $projection.Supplier = _Supplier.Supplier
association [0..1] to I_Customer as _Customer on $projection.Customer = _Customer.Customer
association [0..1] to I_SupplierCompanyByPlant as _SupplierCompanyByPlant on $projection.Plant = _SupplierCompanyByPlant.Plant
and $projection.Supplier = _SupplierCompanyByPlant.Supplier
association [0..1] to I_CustomerCompanyByPlant as _CustomerCompanyByPlant on $projection.Plant = _CustomerCompanyByPlant.Plant
and $projection.Customer = _CustomerCompanyByPlant.Customer
association [0..1] to I_EWM_WarehouseNumber_2 as _EWMWarehouse on $projection.EWMWarehouse = _EWMWarehouse.EWMWarehouse
association [0..1] to I_EWM_StorageBin_2 as _EWMStorageBin on $projection.EWMWarehouse = _EWMStorageBin.EWMWarehouse
and $projection.EWMStorageBin = _EWMStorageBin.EWMStorageBin
{
// Key
@ObjectModel.foreignKey.association: '_ConfirmationGroup'
key afru.MfgOrderConfirmationGroup,
@ObjectModel.foreignKey.association: '_ConfirmationCount'
key afru.MfgOrderConfirmation,
@ObjectModel.foreignKey.association: '_MaterialDocumentHeader'
key mseg.MaterialDocument,
@ObjectModel.foreignKey.association: '_MaterialDocumentYear'
key mseg.MaterialDocumentYear,
@ObjectModel.text.element: ['MaterialDocumentItemText']
key mseg.MaterialDocumentItem,
// Admin
@Semantics.businessDate.at: true
mseg.PostingDate,
@Semantics.systemDate.createdAt: true
mseg.DocumentDate,
@Semantics.user.createdBy: true
cast(mseg.CreatedByUser as ernam preserving type) as CreatedByUser,
// Order and Operation Data
@ObjectModel.foreignKey.association: '_MfgOrder'
afru.ManufacturingOrder,
@ObjectModel.foreignKey.association: '_MfgOrderSequence'
afru.ManufacturingOrderSequence,
@VDM.lifecycle.status: #DEPRECATED
@VDM.lifecycle.successor: 'ManufacturingOrderOperation_2'
afru.ManufacturingOrderOperation, // with conv. exit NUMCV
@ObjectModel.foreignKey.association: '_MfgOrderOperation2'
afru.ManufacturingOrderOperation_2, // w/o conversion exit
@ObjectModel.foreignKey.association: '_MfgOrderItem'
mseg.OrderItem as ManufacturingOrderItem,
@ObjectModel.foreignKey.association: '_MfgOrderCategory'
afru.ManufacturingOrderCategory,
@ObjectModel.foreignKey.association: '_MfgOrderType'
afru.ManufacturingOrderType,
//Confirmation data
@ObjectModel.foreignKey.association: '_ConfirmationPlant'
afru.Plant as ConfirmationPlant,
@Semantics.text: true
afru.ConfirmationText,
@ObjectModel.foreignKey.association: '_FinalConfirmationType'
afru.FinalConfirmationType,
afru.IsFinalConfirmation,
afru.OpenReservationsIsCleared,
@ObjectModel.foreignKey.association: '_ReversedIndicator'
afru.IsReversed,
@ObjectModel.foreignKey.association: '_ReversalIndicator'
afru.IsReversal,
// Goods Movement data
@ObjectModel.foreignKey.association: '_Material'
cast(mseg.Material as co_matnr preserving type) as Material,
@ObjectModel.foreignKey.association: '_Plant'
mseg.Plant as Plant,
@ObjectModel.foreignKey.association: '_Reservation'
mseg.Reservation as Reservation,
@ObjectModel.foreignKey.association: '_ReservationItem'
mseg.ReservationItem as ReservationItem,
@ObjectModel.foreignKey.association: '_ReservationRecordType'
mseg.ReservationRecordType as ReservationRecordType,
@ObjectModel.foreignKey.association: '_StorageLocation'
cast(mseg.StorageLocation as pph_lgort preserving type) as StorageLocation,
@ObjectModel.foreignKey.association: '_Batch'
mseg.Batch as Batch,
@ObjectModel.foreignKey.association: '_InventoryValuationType'
cast(mseg.InventoryValuationType as pph_bwtar preserving type) as InventoryValuationType,
@ObjectModel.foreignKey.association: '_ConsumptionPosting'
cast(mseg.ConsumptionPosting as pph_kzvbr preserving type) as ConsumptionPosting,
-- @ObjectModel.foreignKey.association: '_DebitCreditCode'
cast(mseg.DebitCreditCode as pph_shkzg preserving type) as DebitCreditCode,
@ObjectModel.foreignKey.association: '_GoodsMovementType'
cast(mseg.GoodsMovementType as pph_bwart preserving type) as GoodsMovementType,
@ObjectModel.foreignKey.association: '_GoodsMovementReason'
mseg.GoodsMovementReasonCode as GoodsMovementReasonCode,
@ObjectModel.foreignKey.association: '_GoodsMovementRefDocType'
mseg.GoodsMovementRefDocType as GoodsMovementRefDocType,
@ObjectModel.foreignKey.association: '_InventoryUsabilityCode'
cast(mseg.InventoryUsabilityCode as inventoryusabilitycode preserving type) as InventoryUsabilityCode,
@ObjectModel.foreignKey.association: '_InventorySpecialStockType'
cast(mseg.InventorySpecialStockType as inventoryspecialstocktype preserving type) as InventorySpecialStockType,
@ObjectModel.foreignKey.association: '_InventorySpecialStockValnType'
cast(mseg.InventorySpecialStockValnType as pph_kzbws preserving type) as InventorySpecialStockValnType,
@ObjectModel.foreignKey.association: '_SalesOrder'
cast(mseg.SalesOrder as co_kdauf preserving type) as SalesOrder,
@ObjectModel.foreignKey.association: '_SalesOrderItem'
cast(mseg.SalesOrderItem as co_kdpos preserving type) as SalesOrderItem,
@VDM.lifecycle.status: #DEPRECATED
@VDM.lifecycle.successor: 'WBSElementInternalID_2'
@ObjectModel.foreignKey.association: '_WBSElement'
cast(mseg.WBSElementInternalID as pph_pspel preserving type) as WBSElementInternalID,
@ObjectModel.foreignKey.association: '_WBSElementBasic'
cast(mseg.WBSElementInternalID as ps_s4_pspnr preserving type) as WBSElementInternalID_2,
@ObjectModel.foreignKey.association: '_Supplier'
mseg.Supplier as Supplier,
@ObjectModel.foreignKey.association: '_Customer'
mseg.Customer as Customer,
@Semantics.text: true
cast(mseg.GoodsRecipientName as pph_wempf preserving type) as GoodsRecipientName,
@Semantics.text: true
cast(mseg.UnloadingPointName as ablad preserving type) as UnloadingPointName,
mseg.ReservationIsFinallyIssued,
mseg.IsCompletelyDelivered,
mseg.ShelfLifeExpirationDate,
mseg.ManufactureDate,
mseg.StorageType,
mseg.StorageBin,
// EWM Data
@ObjectModel.foreignKey.association: '_EWMWarehouse'
mseg.EWMWarehouse as EWMWarehouse,
-- @ObjectModel.foreignKey.association: '_EWMStorageBin'
mseg.EWMStorageBin as EWMStorageBin,
// Text
@Semantics.text: true
mseg.MaterialDocumentItemText,
// Quantities and UoM
@Semantics.unitOfMeasure: true
mseg.MaterialBaseUnit as BaseUnit,
@Semantics.quantity.unitOfMeasure: 'BaseUnit'
@Aggregation.default: #SUM
mseg.QuantityInBaseUnit as QuantityInBaseUnit,
@Semantics.unitOfMeasure: true
mseg.EntryUnit as EntryUnit,
@Semantics.quantity.unitOfMeasure: 'EntryUnit'
@Aggregation.default: #SUM
cast(mseg.QuantityInEntryUnit as pph_erfmg preserving type) as QuantityInEntryUnit,
// Associations
@Consumption.hidden: true
afru._ConfirmationGroup,
@Consumption.hidden: true
_ConfirmationCount,
@ObjectModel.association.type: [#TO_COMPOSITION_ROOT, #TO_COMPOSITION_PARENT]
_MfgOrderConfirmation,
_MaterialDocumentHeader,
_MaterialDocumentYear,
_MfgOrder,
_MfgOrderSequence,
@VDM.lifecycle.status: #DEPRECATED
@VDM.lifecycle.successor: '_MfgOrderOperation2'
afru._MfgOrderOperation,
afru._MfgOrderOperation2,
_MfgOrderItem,
afru._MfgOrderCategory,
afru._MfgOrderType,
afru._Plant as _ConfirmationPlant,
afru._FinalConfirmationType,
afru._ReversedIndicator,
afru._ReversalIndicator,
_DocumentDate,
_PostingDate,
_ShelfLifeExpirationDate,
_ManufactureDate,
_Material,
_Plant,
_Reservation,
_ReservationItem,
_ReservationRecordType,
_StorageLocation,
_Batch,
_BaseUnit,
_EntryUnit,
_GoodsMovementType,
_GoodsMovementReason,
_GoodsMovementRefDocType,
_InventorySpecialStockType,
_InventorySpecialStockValnType,
_InventoryValuationType,
_ConsumptionPosting,
_DebitCreditCode,
_InventoryUsabilityCode,
_SalesOrder,
_SalesOrderItem,
@VDM.lifecycle.status: #DEPRECATED
@VDM.lifecycle.successor: '_WBSElementBasic'
_WBSElement,
_WBSElementBasic,
_Supplier,
_Customer,
@Consumption.hidden: true
_SupplierCompanyByPlant,
@Consumption.hidden: true
_CustomerCompanyByPlant,
_EWMWarehouse,
_EWMStorageBin
};