I_MfgOrderDocdGoodsMovement

DDL: I_MFGORDERDOCDGOODSMOVEMENT Type: view_entity BASIC Package: VDM_PP_SFC

Documented Goods Movement of a Manufacturing Order

I_MfgOrderDocdGoodsMovement is a Basic CDS View that provides data about "Documented Goods Movement of a Manufacturing Order" in SAP S/4HANA. It reads from 1 data source (I_OrderDocumentedGoodsMovement) and exposes 79 fields with key fields GoodsMovement, GoodsMovementYear, GoodsMovementItem. It has 12 associations to related views. Part of development package VDM_PP_SFC.

Data Sources (1)

SourceAliasJoin Type
I_OrderDocumentedGoodsMovement I_OrderDocumentedGoodsMovement from

Associations (12)

CardinalityTargetAliasCondition
[1..1] I_ManufacturingOrder _MfgOrder $projection.ManufacturingOrder = _MfgOrder.ManufacturingOrder
[1..1] I_MfgOrderCategory _MfgOrderCategory $projection.ManufacturingOrderCategory = _MfgOrderCategory.ManufacturingOrderCategory
[1..1] I_MfgOrderType _MfgOrderType $projection.ManufacturingOrderType = _MfgOrderType.ManufacturingOrderType
[1..1] I_Plant _ProductionPlant $projection.ProductionPlant = _ProductionPlant.Plant -- start new associations for full coverage of text relations
[1..1] I_Plant _ProductionPlantText $projection.ProductionPlant = _ProductionPlantText.Plant
[1..1] I_Plant _GoodsMovementPlantText $projection.GoodsMovementPlant = _GoodsMovementPlantText.Plant
[1..*] I_ProductText _MaterialText $projection.Material = _MaterialText.Product
[1..1] I_ManufacturingOrder _MfgOrderText $projection.ManufacturingOrder = _MfgOrderText.ManufacturingOrder
[0..1] I_WBSElementBasicData _WBSElementText $projection.WBSElementInternalID = _WBSElementText.WBSElementInternalID
[0..1] I_StorageLocation _StorageLocationText $projection.ProductionPlant = _StorageLocationText.Plant and $projection.StorageLocation = _StorageLocationText.StorageLocation
[0..1] I_Supplier _SupplierText $projection.Supplier = _SupplierText.Supplier
[0..1] I_ControllingArea _ControllingAreaText $projection.ControllingArea = _ControllingAreaText.ControllingArea -- end new associations for full coverage of text relations

Annotations (9)

NameValueLevelField
AccessControl.authorizationCheck #MANDATORY view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.modelingPattern #NONE view
ObjectModel.usageType.serviceQuality #A view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
VDM.lifecycle.contract.type #PUBLIC_LOCAL_API view
VDM.viewType #BASIC view
EndUserText.label Documented Goods Movement of a Manufacturing Order view

Fields (79)

KeyFieldSource TableSource FieldDescription
KEY GoodsMovement GoodsMovement
KEY GoodsMovementYear GoodsMovementYear
KEY GoodsMovementItem GoodsMovementItem
ManufacturingOrder
ManufacturingOrderCategory OrderCategory
ManufacturingOrderType
ProductionPlant
Material
GoodsMovementPlant
Reservation
ReservationItem ReservationItem
ReservationRecordType ReservationRecordType
ReservationIsFinallyIssued ReservationIsFinallyIssued
StorageLocation
Batch
InventoryValuationType
DebitCreditCode DebitCreditCode
GoodsMovementType
GoodsMovementRefDocType GoodsMovementRefDocType
InventorySpecialStockType
SalesOrder SalesOrder
SalesOrderItem SalesOrderItem
WBSElementInternalID WBSElementInternalID
Supplier
GoodsRecipientName GoodsRecipientName
UnloadingPointName UnloadingPointName
GoodsReceiptIsNonValuated GoodsReceiptIsNonValuated
GoodsReceiptIsCmpltlyDelivered GoodsReceiptIsCmpltlyDelivered
ControllingArea
PostingDate PostingDate
DocumentDate DocumentDate
BaseUnit
QuantityInBaseUnit QuantityInBaseUnit
EntryUnit
QuantityInEntryUnit QuantityInEntryUnit
CompanyCodeCurrency
TotalGoodsMvtAmtInCCCrcy TotalGoodsMvtAmtInCCCrcy
_GoodsMovementYear _GoodsMovementYear
_GoodsMovementHeader _GoodsMovementHeader
_GoodsMovementItem _GoodsMovementItem
_MfgOrder _MfgOrder
_MfgOrderCategory _MfgOrderCategory
_MfgOrderType _MfgOrderType
_ProductionPlant _ProductionPlant
_DocumentDate _DocumentDate
_PostingDate _PostingDate
_Material _Material
_GoodsMovementPlant _GoodsMovementPlant
_Reservation _Reservation
_ReservationItem _ReservationItem
_ReservationRecordType _ReservationRecordType
_StorageLocation _StorageLocation
_Batch _Batch
_BaseUnit _BaseUnit
_EntryUnit _EntryUnit
_GoodsMovementType _GoodsMovementType
_GoodsMovementRefDocType _GoodsMovementRefDocType
_InventorySpecialStockType _InventorySpecialStockType
_InventoryValuationType _InventoryValuationType
_DebitCreditCode _DebitCreditCode
_SalesOrder _SalesOrder
_SalesOrderItem _SalesOrderItem
_WBSElement _WBSElement
_EnterpriseProjectElement _EnterpriseProjectElement
_PurchaseOrder _PurchaseOrder
_PurchaseOrderItem _PurchaseOrderItem
_Supplier _Supplier
_SupplierCompanyByPlant _SupplierCompanyByPlant
_GLAccount _GLAccount
_ControllingArea _ControllingArea
_Currency _Currency
_MaterialText _MaterialText
_GoodsMovementPlantText _GoodsMovementPlantText
_ProductionPlantText _ProductionPlantText
_MfgOrderText _MfgOrderText
_WBSElementText _WBSElementText
_StorageLocationText _StorageLocationText
_SupplierText _SupplierText
_ControllingAreaText _ControllingAreaText
@AccessControl.authorizationCheck: #MANDATORY
@AccessControl.personalData.blocking: #('TRANSACTIONAL_DATA')
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.modelingPattern: #NONE
@ObjectModel.supportedCapabilities: [#CDS_MODELING_DATA_SOURCE, #SQL_DATA_SOURCE]
@ObjectModel.usageType: {serviceQuality: #A, sizeCategory: #XL, dataClass: #TRANSACTIONAL}
@VDM.lifecycle.contract.type: #PUBLIC_LOCAL_API
@VDM.viewType: #BASIC
@EndUserText.label: 'Documented Goods Movement of a Manufacturing Order'

/*+[hideWarning] { "IDS" : [ "CALCULATED_FIELD_CHECK" ]  } */
define view entity I_MfgOrderDocdGoodsMovement
  as select from I_OrderDocumentedGoodsMovement

  association [1..1] to I_ManufacturingOrder  as _MfgOrder         on  $projection.ManufacturingOrder = _MfgOrder.ManufacturingOrder
  association [1..1] to I_MfgOrderCategory    as _MfgOrderCategory on  $projection.ManufacturingOrderCategory = _MfgOrderCategory.ManufacturingOrderCategory
  association [1..1] to I_MfgOrderType        as _MfgOrderType     on  $projection.ManufacturingOrderType = _MfgOrderType.ManufacturingOrderType
  association [1..1] to I_Plant               as _ProductionPlant  on  $projection.ProductionPlant = _ProductionPlant.Plant

  -- start new associations for full coverage of text relations
  association [1..1] to I_Plant               as _ProductionPlantText    on  $projection.ProductionPlant = _ProductionPlantText.Plant
  association [1..1] to I_Plant               as _GoodsMovementPlantText on  $projection.GoodsMovementPlant = _GoodsMovementPlantText.Plant
  association [1..*] to I_ProductText         as _MaterialText           on  $projection.Material = _MaterialText.Product
  association [1..1] to I_ManufacturingOrder  as _MfgOrderText           on  $projection.ManufacturingOrder = _MfgOrderText.ManufacturingOrder
  association [0..1] to I_WBSElementBasicData as _WBSElementText         on  $projection.WBSElementInternalID = _WBSElementText.WBSElementInternalID
  association [0..1] to I_StorageLocation     as _StorageLocationText    on  $projection.ProductionPlant = _StorageLocationText.Plant
                                                                         and $projection.StorageLocation = _StorageLocationText.StorageLocation
  association [0..1] to I_Supplier            as _SupplierText           on  $projection.Supplier = _SupplierText.Supplier
  association [0..1] to I_ControllingArea     as _ControllingAreaText    on  $projection.ControllingArea = _ControllingAreaText.ControllingArea  
  -- end new associations for full coverage of text relations
{     
      // Key

      @ObjectModel.foreignKey.association: '_GoodsMovementHeader'
  key GoodsMovement,
      @ObjectModel.foreignKey.association: '_GoodsMovementYear'
  key GoodsMovementYear, 
      @ObjectModel.foreignKey.association: '_GoodsMovementItem'
  key GoodsMovementItem,

      // Order data

      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_MfgOrderStdVH', element: 'ManufacturingOrder' } } ]
      @ObjectModel.foreignKey.association: '_MfgOrder'
      cast(OrderID as manufacturingorder preserving type)          as ManufacturingOrder,
      @ObjectModel.foreignKey.association: '_MfgOrderCategory'
      OrderCategory                                                as ManufacturingOrderCategory,
      @ObjectModel.foreignKey.association: '_MfgOrderType'
      cast(OrderType as manufacturingordertype preserving type)    as ManufacturingOrderType,
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_PlantStdVH', element: 'Plant' } } ]
      @ObjectModel.foreignKey.association: '_ProductionPlant'
      cast(Plant as pwwrk preserving type)                         as ProductionPlant,

      // Goods Movement data

      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_ProductStdVH', element: 'Product' } } ]
      @ObjectModel.foreignKey.association: '_Material'
      @ObjectModel.text.association: '_MaterialText'
      cast(Material as matnr preserving type)                      as Material,
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_PlantStdVH', element: 'Plant' } } ]
      @ObjectModel.foreignKey.association: '_GoodsMovementPlant'
      cast(GoodsMovementPlant as werks_d preserving type)          as GoodsMovementPlant,
      @ObjectModel.foreignKey.association: '_Reservation'
      cast(Reservation as rsnum preserving type)                   as Reservation,
      @ObjectModel.foreignKey.association: '_ReservationItem'
      ReservationItem,
      @ObjectModel.foreignKey.association: '_ReservationRecordType'
      ReservationRecordType,
      ReservationIsFinallyIssued,
      @ObjectModel.foreignKey.association: '_StorageLocation'
      cast(StorageLocation as pph_lgort preserving type)           as StorageLocation,
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_BatchStdVH', element: 'Batch' } } ]
      @ObjectModel.foreignKey.association: '_Batch'
      cast(Batch as charg_d preserving type)                       as Batch,
      @ObjectModel.foreignKey.association: '_InventoryValuationType'
      cast(InventoryValuationType as pph_bwtar preserving type)    as InventoryValuationType,
      @ObjectModel.foreignKey.association: '_DebitCreditCode'
      DebitCreditCode,
      @ObjectModel.foreignKey.association: '_GoodsMovementType'
      cast(GoodsMovementType as bwart preserving type)             as GoodsMovementType,
      @ObjectModel.foreignKey.association: '_GoodsMovementRefDocType'
      GoodsMovementRefDocType,
      @ObjectModel.foreignKey.association: '_InventorySpecialStockType'
      cast(InventorySpecialStockType as pph_sobkz preserving type) as InventorySpecialStockType,
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_SalesOrderStdVH', element: 'SalesOrder' } } ]
      @ObjectModel.foreignKey.association: '_SalesOrder'
      SalesOrder,
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_SalesOrderItemStdVH', element: 'SalesOrderItem' } } ]
      @ObjectModel.foreignKey.association: '_SalesOrderItem'
      SalesOrderItem,
      @ObjectModel.foreignKey.association: '_WBSElement'
      WBSElementInternalID,
--    @ObjectModel.foreignKey.association: '_PurchaseOrder'
      cast(PurchaseOrder as vdm_purchaseorder preserving type)     as PurchaseOrder,
--    @ObjectModel.foreignKey.association: '_PurchaseOrderItem'
      cast(PurchaseOrderItem as vdm_purchaseorderitem preserving type) as PurchaseOrderItem,
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_Supplier_VH', element: 'Supplier' } } ]
      @ObjectModel.foreignKey.association: '_Supplier'
      cast(Supplier as lifnr preserving type)                      as Supplier,
      @Semantics.text: true
      GoodsRecipientName,
      @Semantics.text: true
      UnloadingPointName,
      GoodsReceiptIsNonValuated,
      GoodsReceiptIsCmpltlyDelivered,

      // Assignments FI/CO

      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_ControllingAreaStdVH', element: 'ControllingArea' } } ]
      @ObjectModel.foreignKey.association: '_ControllingArea'
      cast(ControllingArea as kokrs preserving type)               as ControllingArea,
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_GLAccountStdVH', element: 'GLAccount' } } ]
--    @ObjectModel.foreignKey.association: '_GLAccount'
      cast(GLAccount as saknr preserving type)                     as GLAccount,

      // Dates

      @Semantics.businessDate.at: true
      PostingDate,
      @Semantics.businessDate.at: true
      DocumentDate,

      // Quantities and UoM

      @ObjectModel.foreignKey.association: '_BaseUnit'
      cast(BaseUnit as meins preserving type)                      as BaseUnit,
      @Semantics.quantity.unitOfMeasure: 'BaseUnit'
      @Aggregation.default: #SUM
      QuantityInBaseUnit,
      @ObjectModel.foreignKey.association: '_EntryUnit'
      cast(EntryUnit as erfme preserving type)                     as EntryUnit,
      @Semantics.quantity.unitOfMeasure: 'EntryUnit'
      @Aggregation.default: #SUM
      QuantityInEntryUnit,

      // Amount and Currency

      @ObjectModel.foreignKey.association: '_Currency'
      cast(CompanyCodeCurrency as cccrcy preserving type)          as CompanyCodeCurrency,
      @Semantics.amount.currencyCode: 'CompanyCodeCurrency'
      @Aggregation.default: #SUM
      TotalGoodsMvtAmtInCCCrcy,

      // Associations

      _GoodsMovementYear,
      _GoodsMovementHeader,
      _GoodsMovementItem,
      @ObjectModel.association.type: [#TO_COMPOSITION_ROOT, #TO_COMPOSITION_PARENT]
      _MfgOrder,
      _MfgOrderCategory,
      _MfgOrderType,
      _ProductionPlant,
      _DocumentDate,
      _PostingDate,
      _Material,
      _GoodsMovementPlant,
      _Reservation,
      _ReservationItem,
      _ReservationRecordType,
      _StorageLocation,
      _Batch,
      _BaseUnit,
      _EntryUnit,
      _GoodsMovementType,
      _GoodsMovementRefDocType,
      _InventorySpecialStockType,
      _InventoryValuationType,
      _DebitCreditCode,
      _SalesOrder,
      _SalesOrderItem,
      _WBSElement,
      _EnterpriseProjectElement,
      _PurchaseOrder,
      _PurchaseOrderItem,
      _Supplier,
      @Consumption.hidden: true
      _SupplierCompanyByPlant,
      _GLAccount,
      _ControllingArea,
      _Currency,

      // Text relations

      _MaterialText,
      _GoodsMovementPlantText,
      _ProductionPlantText,
      _MfgOrderText,
      _WBSElementText,
      _StorageLocationText,
      _SupplierText,
      _ControllingAreaText
}
where ( OrderCategory = '10' or
        OrderCategory = '40' );  //Manufacturing orders only