I_OrderDocumentedGoodsMovement
Documented Goods Movement of an Order
I_OrderDocumentedGoodsMovement is a Basic CDS View that provides data about "Documented Goods Movement of an Order" in SAP S/4HANA. It reads from 2 data sources (aufk, aufm) and exposes 74 fields with key fields GoodsMovement, GoodsMovementYear, GoodsMovementItem. It has 35 associations to related views. Part of development package VDM_PP_SFC.
Associations (35)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..1] | I_MaterialDocumentYear | _GoodsMovementYear | $projection.GoodsMovementYear = _GoodsMovementYear.MaterialDocumentYear |
| [1..1] | I_MaterialDocumentHeader_2 | _GoodsMovementHeader | $projection.GoodsMovementYear = _GoodsMovementHeader.MaterialDocumentYear and $projection.GoodsMovement = _GoodsMovementHeader.MaterialDocument |
| [1..1] | I_MaterialDocumentItem_2 | _GoodsMovementItem | $projection.GoodsMovementYear = _GoodsMovementItem.MaterialDocumentYear and $projection.GoodsMovement = _GoodsMovementItem.MaterialDocument and $projection.GoodsMovementItem = _GoodsMovementItem.MaterialDocumentItem |
| [0..1] | I_LogisticsOrder | _Order | $projection.OrderID = _Order.OrderID |
| [0..1] | I_ProjectNetwork | _ProjectNetwork | $projection.ProjectNetwork = _ProjectNetwork.ProjectNetwork |
| [1..1] | I_OrderType | _OrderType | $projection.OrderType = _OrderType.OrderType |
| [1..1] | I_OrderCategory | _OrderCategory | $projection.OrderCategory = _OrderCategory.OrderCategory |
| [1..1] | I_Plant | _OrderPlant | $projection.Plant = _OrderPlant.Plant |
| [0..1] | I_CalendarDate | _DocumentDate | $projection.DocumentDate = _DocumentDate.CalendarDate |
| [0..1] | I_CalendarDate | _PostingDate | $projection.PostingDate = _PostingDate.CalendarDate |
| [0..1] | I_ReservationDocumentHeader | _Reservation | $projection.Reservation = _Reservation.Reservation |
| [0..1] | I_ReservationDocumentItem | _ReservationItem | $projection.Reservation = _ReservationItem.Reservation and $projection.ReservationItem = _ReservationItem.ReservationItem and $projection.ReservationRecordType = _ReservationItem.RecordType |
| [0..1] | I_ReservationDocRecordType | _ReservationRecordType | $projection.ReservationRecordType = _ReservationRecordType.RecordType |
| [0..1] | I_Plant | _GoodsMovementPlant | $projection.GoodsMovementPlant = _GoodsMovementPlant.Plant |
| [0..1] | I_Product | _Material | $projection.Material = _Material.Product |
| [0..1] | I_UnitOfMeasure | _BaseUnit | $projection.BaseUnit = _BaseUnit.UnitOfMeasure |
| [1..1] | I_UnitOfMeasure | _EntryUnit | $projection.EntryUnit = _EntryUnit.UnitOfMeasure |
| [1..1] | I_GoodsMovementType | _GoodsMovementType | $projection.GoodsMovementType = _GoodsMovementType.GoodsMovementType |
| [0..1] | I_GoodsMovementRefDocType | _GoodsMovementRefDocType | $projection.GoodsMovementRefDocType = _GoodsMovementRefDocType.GoodsMovementRefDocType |
| [0..1] | I_InventorySpecialStockType | _InventorySpecialStockType | $projection.InventorySpecialStockType = _InventorySpecialStockType.InventorySpecialStockType |
| [0..1] | I_InventoryValuationType | _InventoryValuationType | $projection.InventoryValuationType = _InventoryValuationType.InventoryValuationType |
| [0..1] | I_DebitCreditCode | _DebitCreditCode | $projection.DebitCreditCode = _DebitCreditCode.DebitCreditCode |
| [0..1] | I_StorageLocation | _StorageLocation | $projection.GoodsMovementPlant = _StorageLocation.Plant and $projection.StorageLocation = _StorageLocation.StorageLocation |
| [0..1] | I_Batch | _Batch | $projection.GoodsMovementPlant = _Batch.Plant and $projection.Material = _Batch.Material and $projection.Batch = _Batch.Batch |
| [0..1] | I_SalesOrder | _SalesOrder | $projection.SalesOrder = _SalesOrder.SalesOrder |
| [0..1] | I_SalesOrderItem | _SalesOrderItem | $projection.SalesOrder = _SalesOrderItem.SalesOrder and $projection.SalesOrderItem = _SalesOrderItem.SalesOrderItem |
| [0..1] | I_WBSElementBasicData | _WBSElement | $projection.WBSElementInternalID = _WBSElement.WBSElementInternalID |
| [0..1] | I_EnterpriseProjectElement | _EnterpriseProjectElement | $projection.WBSElementInternalID = _EnterpriseProjectElement.WBSElementInternalID |
| [0..1] | I_PurchaseOrderAPI01 | _PurchaseOrder | $projection.PurchaseOrder = _PurchaseOrder.PurchaseOrder |
| [0..1] | I_PurchaseOrderItemAPI01 | _PurchaseOrderItem | $projection.PurchaseOrder = _PurchaseOrderItem.PurchaseOrder and $projection.PurchaseOrderItem = _PurchaseOrderItem.PurchaseOrderItem |
| [0..1] | I_Supplier | _Supplier | $projection.Supplier = _Supplier.Supplier |
| [0..1] | I_SupplierCompanyByPlant | _SupplierCompanyByPlant | $projection.GoodsMovementPlant = _SupplierCompanyByPlant.Plant and $projection.Supplier = _SupplierCompanyByPlant.Supplier |
| [0..1] | I_ControllingArea | _ControllingArea | $projection.ControllingArea = _ControllingArea.ControllingArea |
| [0..*] | I_GLAccount | _GLAccount | $projection.GLAccount = _GLAccount.GLAccount |
| [0..1] | I_Currency | _Currency | $projection.CompanyCodeCurrency = _Currency.Currency |
Annotations (11)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | IORDDOCDGMVT | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #MANDATORY | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| ObjectModel.modelingPattern | #NONE | view | |
| ObjectModel.usageType.serviceQuality | #B | 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 an Order | view |
Fields (74)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | GoodsMovement | aufm | mblnr | Material Doc. |
| KEY | GoodsMovementYear | |||
| KEY | GoodsMovementItem | |||
| OrderID | aufm | aufnr | SettlementOrder | |
| ProjectNetwork | aufm | nplnr | Network | |
| OrderCategory | ||||
| OrderType | aufk | auart | Sales Doc. Type | |
| Plant | aufk | werks | Receiving Plant | |
| Material | ||||
| GoodsMovementPlant | aufm | werks | Receiving Plant | |
| Reservation | aufm | rsnum | Reservation | |
| ReservationItem | ||||
| ReservationRecordType | ||||
| ReservationIsFinallyIssued | aufm | kzear | Final Issue | |
| StorageLocation | ||||
| Batch | aufm | charg | Chargeable Proc. | |
| InventoryValuationType | ||||
| DebitCreditCode | ||||
| GoodsMovementType | ||||
| GoodsMovementRefDocType | ||||
| InventorySpecialStockType | ||||
| SalesOrder | ||||
| SalesOrderItem | ||||
| WBSElementInternalID | ||||
| Supplier | aufm | lifnr | Vendor no. | |
| GoodsRecipientName | ||||
| UnloadingPointName | aufm | ablad | Unloading Point | |
| GoodsReceiptIsNonValuated | ||||
| GoodsReceiptIsCmpltlyDelivered | aufm | elikz | Delivery Completion | |
| ControllingArea | aufm | kokrs | Org. Value | |
| saktoasGLAccount | ||||
| PostingDate | aufm | budat | Posting Date | |
| DocumentDate | aufm | bldat | Journal Entry Date | |
| BaseUnit | aufm | meins | Valuation Unit | |
| QuantityInBaseUnit | ||||
| EntryUnit | aufm | erfme | Unit of Entry | |
| QuantityInEntryUnit | ||||
| CompanyCodeCurrency | aufm | waers | Transaction Currency | |
| TotalGoodsMvtAmtInCCCrcy | ||||
| _GoodsMovementYear | _GoodsMovementYear | |||
| _GoodsMovementHeader | _GoodsMovementHeader | |||
| _GoodsMovementItem | _GoodsMovementItem | |||
| _Order | _Order | |||
| _ProjectNetwork | _ProjectNetwork | |||
| _OrderCategory | _OrderCategory | |||
| _OrderType | _OrderType | |||
| _OrderPlant | _OrderPlant | |||
| _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 |
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_OrderDocumentedGoodsMovement.
-- 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: IORDDOCDGMVT
CREATE VIEW I_OrderDocumentedGoodsMovement AS
SELECT
aufm.mblnr AS GoodsMovement,
cast(aufm.mjahr as nsdm_mjahr preserving type) AS GoodsMovementYear,
cast(aufm.zeile as nsdm_mblpo preserving type) AS GoodsMovementItem,
aufm.aufnr AS OrderID,
aufm.nplnr AS ProjectNetwork,
cast(aufk.autyp as pph_autyp preserving type) AS OrderCategory,
aufk.auart AS OrderType,
aufk.werks AS Plant,
cast(aufm.matnr as co_matnr preserving type) AS Material,
aufm.werks AS GoodsMovementPlant,
aufm.rsnum AS Reservation,
cast(aufm.rspos as pph_rspos preserving type) AS ReservationItem,
cast(aufm.rsart as pph_rsart preserving type) AS ReservationRecordType,
aufm.kzear AS ReservationIsFinallyIssued,
cast(aufm.lgort as pph_lgort preserving type) AS StorageLocation,
aufm.charg AS Batch,
cast(aufm.bwtar as pph_bwtar preserving type) AS InventoryValuationType,
cast(aufm.shkzg as pph_shkzg preserving type) AS DebitCreditCode,
cast(aufm.bwart as pph_bwart preserving type) AS GoodsMovementType,
cast(aufm.kzbew as pph_kzbew preserving type) AS GoodsMovementRefDocType,
cast(aufm.sobkz as pph_sobkz preserving type) AS InventorySpecialStockType,
cast(aufm.kdauf as co_kdauf preserving type) AS SalesOrder,
cast(aufm.kdpos as co_kdpos preserving type) AS SalesOrderItem,
cast(aufm.ps_psp_pnr as ps_s4_pspnr preserving type) AS WBSElementInternalID,
aufm.lifnr AS Supplier,
cast(aufm.wempf as pph_wempf preserving type) AS GoodsRecipientName,
aufm.ablad AS UnloadingPointName,
cast(aufm.weunb as pph_weunb preserving type) AS GoodsReceiptIsNonValuated,
aufm.elikz AS GoodsReceiptIsCmpltlyDelivered,
aufm.kokrs AS ControllingArea,
aufm.budat AS PostingDate,
aufm.bldat AS DocumentDate,
aufm.meins AS BaseUnit,
cast(aufm.menge as vdm_pp_menge preserving type) AS QuantityInBaseUnit,
aufm.erfme AS EntryUnit,
cast(aufm.erfmg as pph_erfmg preserving type) AS QuantityInEntryUnit,
aufm.waers AS CompanyCodeCurrency,
cast(aufm.dmbtr as pph_dmbtr preserving type) AS TotalGoodsMvtAmtInCCCrcy
FROM aufm
INNER JOIN aufk ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_MaterialDocumentYear AS _GoodsMovementYear ON GoodsMovementYear = _GoodsMovementYear.MaterialDocumentYear -- association [1..1]
LEFT OUTER JOIN I_MaterialDocumentHeader_2 AS _GoodsMovementHeader ON GoodsMovementYear = _GoodsMovementHeader.MaterialDocumentYear AND GoodsMovement = _GoodsMovementHeader.MaterialDocument -- association [1..1]
LEFT OUTER JOIN I_MaterialDocumentItem_2 AS _GoodsMovementItem ON GoodsMovementYear = _GoodsMovementItem.MaterialDocumentYear AND GoodsMovement = _GoodsMovementItem.MaterialDocument AND GoodsMovementItem = _GoodsMovementItem.MaterialDocumentItem -- association [1..1]
LEFT OUTER JOIN I_LogisticsOrder AS _Order ON OrderID = _Order.OrderID -- association [0..1]
LEFT OUTER JOIN I_ProjectNetwork AS _ProjectNetwork ON ProjectNetwork = _ProjectNetwork.ProjectNetwork -- association [0..1]
LEFT OUTER JOIN I_OrderType AS _OrderType ON OrderType = _OrderType.OrderType -- association [1..1]
LEFT OUTER JOIN I_OrderCategory AS _OrderCategory ON OrderCategory = _OrderCategory.OrderCategory -- association [1..1]
LEFT OUTER JOIN I_Plant AS _OrderPlant ON Plant = _OrderPlant.Plant -- association [1..1]
LEFT OUTER JOIN I_CalendarDate AS _DocumentDate ON DocumentDate = _DocumentDate.CalendarDate -- association [0..1]
LEFT OUTER JOIN I_CalendarDate AS _PostingDate ON PostingDate = _PostingDate.CalendarDate -- association [0..1]
LEFT OUTER JOIN I_ReservationDocumentHeader AS _Reservation ON Reservation = _Reservation.Reservation -- association [0..1]
LEFT OUTER JOIN I_ReservationDocumentItem AS _ReservationItem ON Reservation = _ReservationItem.Reservation AND ReservationItem = _ReservationItem.ReservationItem AND ReservationRecordType = _ReservationItem.RecordType -- association [0..1]
LEFT OUTER JOIN I_ReservationDocRecordType AS _ReservationRecordType ON ReservationRecordType = _ReservationRecordType.RecordType -- association [0..1]
LEFT OUTER JOIN I_Plant AS _GoodsMovementPlant ON GoodsMovementPlant = _GoodsMovementPlant.Plant -- association [0..1]
LEFT OUTER JOIN I_Product AS _Material ON Material = _Material.Product -- association [0..1]
LEFT OUTER JOIN I_UnitOfMeasure AS _BaseUnit ON BaseUnit = _BaseUnit.UnitOfMeasure -- association [0..1]
LEFT OUTER JOIN I_UnitOfMeasure AS _EntryUnit ON EntryUnit = _EntryUnit.UnitOfMeasure -- association [1..1]
LEFT OUTER JOIN I_GoodsMovementType AS _GoodsMovementType ON GoodsMovementType = _GoodsMovementType.GoodsMovementType -- association [1..1]
LEFT OUTER JOIN I_GoodsMovementRefDocType AS _GoodsMovementRefDocType ON GoodsMovementRefDocType = _GoodsMovementRefDocType.GoodsMovementRefDocType -- association [0..1]
LEFT OUTER JOIN I_InventorySpecialStockType AS _InventorySpecialStockType ON InventorySpecialStockType = _InventorySpecialStockType.InventorySpecialStockType -- association [0..1]
LEFT OUTER JOIN I_InventoryValuationType AS _InventoryValuationType ON InventoryValuationType = _InventoryValuationType.InventoryValuationType -- association [0..1]
LEFT OUTER JOIN I_DebitCreditCode AS _DebitCreditCode ON DebitCreditCode = _DebitCreditCode.DebitCreditCode -- association [0..1]
LEFT OUTER JOIN I_StorageLocation AS _StorageLocation ON GoodsMovementPlant = _StorageLocation.Plant AND StorageLocation = _StorageLocation.StorageLocation -- association [0..1]
LEFT OUTER JOIN I_Batch AS _Batch ON GoodsMovementPlant = _Batch.Plant AND Material = _Batch.Material AND Batch = _Batch.Batch -- association [0..1]
LEFT OUTER JOIN I_SalesOrder AS _SalesOrder ON SalesOrder = _SalesOrder.SalesOrder -- association [0..1]
LEFT OUTER JOIN I_SalesOrderItem AS _SalesOrderItem ON SalesOrder = _SalesOrderItem.SalesOrder AND SalesOrderItem = _SalesOrderItem.SalesOrderItem -- association [0..1]
LEFT OUTER JOIN I_WBSElementBasicData AS _WBSElement ON WBSElementInternalID = _WBSElement.WBSElementInternalID -- association [0..1]
LEFT OUTER JOIN I_EnterpriseProjectElement AS _EnterpriseProjectElement ON WBSElementInternalID = _EnterpriseProjectElement.WBSElementInternalID -- association [0..1]
LEFT OUTER JOIN I_PurchaseOrderAPI01 AS _PurchaseOrder ON PurchaseOrder = _PurchaseOrder.PurchaseOrder -- association [0..1]
LEFT OUTER JOIN I_PurchaseOrderItemAPI01 AS _PurchaseOrderItem ON PurchaseOrder = _PurchaseOrderItem.PurchaseOrder AND PurchaseOrderItem = _PurchaseOrderItem.PurchaseOrderItem -- association [0..1]
LEFT OUTER JOIN I_Supplier AS _Supplier ON Supplier = _Supplier.Supplier -- association [0..1]
LEFT OUTER JOIN I_SupplierCompanyByPlant AS _SupplierCompanyByPlant ON GoodsMovementPlant = _SupplierCompanyByPlant.Plant AND Supplier = _SupplierCompanyByPlant.Supplier -- association [0..1]
LEFT OUTER JOIN I_ControllingArea AS _ControllingArea ON ControllingArea = _ControllingArea.ControllingArea -- association [0..1]
LEFT OUTER JOIN I_GLAccount AS _GLAccount ON GLAccount = _GLAccount.GLAccount -- association [0..*]
LEFT OUTER JOIN I_Currency AS _Currency ON CompanyCodeCurrency = _Currency.Currency -- association [0..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