C_GRItm
Goods Receipt Document Items
C_GRItm is a Consumption CDS View that provides data about "Goods Receipt Document Items" in SAP S/4HANA. It reads from 1 data source (P_GRItm) and exposes 75 fields with key fields MaterialDocument, MaterialDocumentItem, MaterialDocumentYear. It has 4 associations to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| P_GRItm | P_GRItm | from |
Associations (4)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..1] | I_GoodsMovementType | _GoodsMovementType | $projection.GoodsMovementType = _GoodsMovementType.GoodsMovementType |
| [1..1] | I_UserContactCard | _UserContactCard | $projection.CreatedByUser = _UserContactCard.ContactCardID |
| [0..1] | C_PurgDocStatusSubsetVH | _PurgDocListStatus | $projection.Status = _PurgDocListStatus.Status and _PurgDocListStatus.PurchasingDocumentType = '2' |
| [1..1] | I_DebitCreditCode | _DebitCreditText | $projection.DebitCreditCode = _DebitCreditText.DebitCreditCode |
Annotations (12)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | CGRITM | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #MANDATORY | view | |
| EndUserText.label | Goods Receipt Document Items | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| VDM.viewType | #CONSUMPTION | view | |
| AccessControl.personalData.blocking | #BLOCKED_DATA_EXCLUDED | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| UI.headerInfo.typeName | Material Document Item | view | |
| UI.headerInfo.typeNamePlural | Material Document Items | view |
Fields (75)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | MaterialDocument | MaterialDocument | Material Doc. | |
| KEY | MaterialDocumentItem | MaterialDocumentItem | Item | |
| KEY | MaterialDocumentYear | MaterialDocumentYear | Material Document Year | |
| FormattedPurDoc | FormattedPurDoc | Material Document Item | ||
| Material | Material | Vehicle Model | ||
| MaterialName | ||||
| Plant | Plant | Valuation Area | ||
| PlantName | ||||
| PurchaseOrder | PurchaseOrder | Purchase Order | ||
| PurchaseOrderItem | PurchaseOrderItem | Purchasing Document Item | ||
| GoodsMovementType | GoodsMovementType | Movement Type | ||
| GoodsMovementTypeName | ||||
| DocumentDate | DocumentDate | Journal Entry Date | ||
| PostingDate | PostingDate | Posting Date for GR | ||
| ReferenceDocument | ReferenceDocument | Reference Document | ||
| DebitCreditCode | DebitCreditCode | Debit/Credit Indicator | ||
| PurchasingDocumentType | PurchaseOrderType | Purchasing Document Type | ||
| PurchasingDocumentTypeName | PurchasingDocumentTypeName | Description | ||
| MaterialGroup | MaterialGroup | Product Group | ||
| MaterialGroupName | ||||
| Supplier | Supplier | Supplier | ||
| SupplierName | SupplierName | Supplier Name | ||
| PurchaseOrderQuantityUnit | _PurchaseOrderItem | PurchaseOrderQuantityUnit | Order Unit | |
| OrderQuantity | _PurchaseOrderItem | OrderQuantity | Quantity | |
| PurchasingGroup | PurchasingGroup | Purchasing Group | ||
| PurchasingGroupName | ||||
| StorageLocation | _PurchaseOrderItem | StorageLocation | StorageLocation | |
| StorageLocationName | ||||
| ServicePerformer | ServicePerformer | Service Performer | ||
| MaterialType | ||||
| ServicePerformerName | ||||
| MaterialDocumentItemText | _MatDocRec | MaterialDocumentItemText | Item Description | |
| MaterialTypeName | ||||
| ReasonForPhysInvtryDiffText | ||||
| GoodsMovementReasonCode | _MatDocRec | GoodsMovementReasonCode | Reason for Mvmt | |
| IsCancelled | _MatDocRec | GoodsMovementIsCancelled | Is Item Cancelled | |
| InventoryStockType | _MatDocRec | InventoryStockType | Stock Type | |
| InventoryStockTypeName | ||||
| InventorySpecialStockType | _MatDocRec | InventorySpecialStockType | Special Stock Type | |
| InventorySpecialStockTypeName | ||||
| InventoryTransactionType | _MatDocRec | InventoryTransactionType | Trans. Ev. Type | |
| InventoryTransactionTypeText | ||||
| Batch | _MatDocRec | Batch | Lot No. | |
| BillOfLading | _MatDocRec | BillOfLading | ||
| GoodsReceiptIsNonValuated | _MatDocRec | GoodsReceiptIsNonValuated | GR Non-Valuated | |
| EntryUnit | _MatDocRec | EntryUnit | Unit of Entry | |
| HasMultipleAccountAssignment | _MatDocRec | HasMultipleAccountAssignment | ||
| MultipleAccountAssignmentCode | _MatDocRec | MultipleAccountAssignmentCode | ||
| CreatedByUser | CreatedByUser | User Name | ||
| DeliveryDocumentItem | _MatDocRec | DeliveryDocumentItem | Delivery Item | |
| MaterialDocumentHeaderText | _MatDocRec | MaterialDocumentHeaderText | Note | |
| ManufacturingOrder | _MatDocRec | ManufacturingOrder | Order | |
| IssuingOrReceivingPlant | _MatDocRec | IssuingOrReceivingPlant | Plant (Transfer) | |
| IssuingOrReceivingPlantName | ||||
| SalesOrderItemText | ||||
| WorkItem | _MatDocRec | WorkItem | Work Item | |
| AccountingDocumentType | _MatDocRec | AccountingDocumentType | Journal Entry Type | |
| AccountingDocumentTypeName | ||||
| DeliveryDocument | _MatDocRec | DeliveryDocument | Outbound Delivery | |
| Status | Status | Status | ||
| StatusName | _PurgDocListStatus | StatusName | ||
| ObjectType | ObjectType | Type | ||
| DeliveryDate | DeliveryDate | Delivery Date | ||
| FullName | _UserContactCard | FullName | Created By | |
| PurchasingOrganization | PurchasingOrganization | Purchasing Organization | ||
| PurchasingDocument | PurchasingDocument | Purchasing Document | ||
| SupplyingPlant | SupplyingPlant | Supplying Plant | ||
| PurchasingDocumentItemCategory | PurchasingDocumentItemCategory | Item Category | ||
| AccountAssignmentCategory | AccountAssignmentCategory | Acct Assgmt Cat | ||
| CostCenter | CostCenter | Cost Center | ||
| SalesOrder | SalesOrder | SD Document | ||
| WBSElementExternalID | WBSElementExternalID | WBS Element External ID | ||
| PurchaseOrderType | PurchaseOrderType | PO Type | ||
| _UserContactCard | _UserContactCard | |||
| _DebitCreditText | _DebitCreditText |
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_GRItm.
-- 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: CGRITM
CREATE VIEW C_GRItm AS
SELECT
MaterialDocument,
MaterialDocumentItem,
MaterialDocumentYear,
FormattedPurDoc,
Material,
_PurchaseOrderItem._Material._Text[1:Language = $session.system_language].MaterialName AS MaterialName,
Plant,
_PurchaseOrderItem._Plant.PlantName AS PlantName,
PurchaseOrder,
PurchaseOrderItem,
GoodsMovementType,
_GoodsMovementType._Text[1: Language = $session.system_language].GoodsMovementTypeName AS GoodsMovementTypeName,
DocumentDate,
PostingDate,
ReferenceDocument,
DebitCreditCode,
PurchaseOrderType AS PurchasingDocumentType,
PurchasingDocumentTypeName,
MaterialGroup,
_PurchaseOrderItem._MaterialGroup._Text[1: Language = $session.system_language].MaterialGroupName AS MaterialGroupName,
Supplier,
SupplierName,
_PurchaseOrderItem.PurchaseOrderQuantityUnit AS PurchaseOrderQuantityUnit,
_PurchaseOrderItem.OrderQuantity AS OrderQuantity,
PurchasingGroup,
_PurchaseOrderItem._PurchaseOrder._PurchasingGroup.PurchasingGroupName AS PurchasingGroupName,
_PurchaseOrderItem.StorageLocation AS StorageLocation,
_PurchaseOrderItem._StorageLocation.StorageLocationName AS StorageLocationName,
ServicePerformer,
_PurchaseOrderItem._Material.MaterialType AS MaterialType,
_MatDocRec._BusinessPartner.BusinessPartnerName AS ServicePerformerName,
_MatDocRec.MaterialDocumentItemText AS MaterialDocumentItemText,
_PurchaseOrderItem._Material._MaterialType._Text[1: Language = $session.system_language].MaterialTypeName AS MaterialTypeName,
_MatDocRec._GoodsMovementReasonCode._PhysInvtryReasonCodeText[1: Language = $session.system_language].ReasonForPhysInvtryDiffText AS ReasonForPhysInvtryDiffText,
_MatDocRec.GoodsMovementReasonCode AS GoodsMovementReasonCode,
_MatDocRec.GoodsMovementIsCancelled AS IsCancelled,
_MatDocRec.InventoryStockType AS InventoryStockType,
_MatDocRec._InventoryStockType._Text[1: Language = $session.system_language].InventoryStockTypeName AS InventoryStockTypeName,
_MatDocRec.InventorySpecialStockType AS InventorySpecialStockType,
_MatDocRec._InventorySpecialStockType._Text[1: Language = $session.system_language].InventorySpecialStockTypeName AS InventorySpecialStockTypeName,
_MatDocRec.InventoryTransactionType AS InventoryTransactionType,
_MatDocRec._InventoryTransactionType._Text[1: Language = $session.system_language].InventoryTransactionTypeText AS InventoryTransactionTypeText,
_MatDocRec.Batch AS Batch,
_MatDocRec.BillOfLading AS BillOfLading,
_MatDocRec.GoodsReceiptIsNonValuated AS GoodsReceiptIsNonValuated,
_MatDocRec.EntryUnit AS EntryUnit,
_MatDocRec.HasMultipleAccountAssignment AS HasMultipleAccountAssignment,
_MatDocRec.MultipleAccountAssignmentCode AS MultipleAccountAssignmentCode,
CreatedByUser,
_MatDocRec.DeliveryDocumentItem AS DeliveryDocumentItem,
_MatDocRec.MaterialDocumentHeaderText AS MaterialDocumentHeaderText,
_MatDocRec.ManufacturingOrder AS ManufacturingOrder,
_MatDocRec.IssuingOrReceivingPlant AS IssuingOrReceivingPlant,
_MatDocRec._IssuingOrReceivingPlant.PlantName AS IssuingOrReceivingPlantName,
_MatDocRec._SalesOrderItem.SalesOrderItemText AS SalesOrderItemText,
_MatDocRec.WorkItem AS WorkItem,
_MatDocRec.AccountingDocumentType AS AccountingDocumentType,
_MatDocRec._AccountingDocumentType._Text[1:Language = $session.system_language].AccountingDocumentTypeName AS AccountingDocumentTypeName,
_MatDocRec.DeliveryDocument AS DeliveryDocument,
Status,
_PurgDocListStatus.StatusName AS StatusName,
ObjectType,
DeliveryDate,
_UserContactCard.FullName AS FullName,
PurchasingOrganization,
PurchasingDocument,
SupplyingPlant,
PurchasingDocumentItemCategory,
AccountAssignmentCategory,
CostCenter,
SalesOrder,
WBSElementExternalID,
PurchaseOrderType
FROM P_GRItm
LEFT OUTER JOIN I_GoodsMovementType AS _GoodsMovementType ON GoodsMovementType = _GoodsMovementType.GoodsMovementType -- association [1..1]
LEFT OUTER JOIN I_UserContactCard AS _UserContactCard ON CreatedByUser = _UserContactCard.ContactCardID -- association [1..1]
LEFT OUTER JOIN C_PurgDocStatusSubsetVH AS _PurgDocListStatus ON Status = _PurgDocListStatus.Status AND _PurgDocListStatus.PurchasingDocumentType = '2' -- association [0..1]
LEFT OUTER JOIN I_DebitCreditCode AS _DebitCreditText ON DebitCreditCode = _DebitCreditText.DebitCreditCode -- association [1..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