C_GRIRPurchasingDocItem
GR/IR Purchasing Document Item
C_GRIRPurchasingDocItem is a Consumption CDS View that provides data about "GR/IR Purchasing Document Item" in SAP S/4HANA. It reads from 1 data source (I_PurchasingDocumentItem) and exposes 45 fields with key fields PurchasingDocument, PurchasingDocumentItem. It has 4 associations to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_PurchasingDocumentItem | I_PurchasingDocumentItem | from |
Associations (4)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_Supplier | _SupplierText | $projection.Supplier = _SupplierText.Supplier |
| [0..1] | I_UserContactCard | _CreatedByUser | $projection.CreatedByUser = _CreatedByUser.ContactCardID |
| [0..1] | I_UserContactCard | _RequisitionerUser | $projection.RequisitionerUser = _RequisitionerUser.ContactCardID |
| [0..1] | I_GRIRProcess | _GRIRProcess | $projection.CompanyCode = _GRIRProcess.CompanyCode and $projection.PurchasingDocument = _GRIRProcess.PurchasingDocument and $projection.PurchasingDocumentItem = _GRIRProcess.PurchasingDocumentItem |
Annotations (11)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.preserveKey | true | view | |
| AbapCatalog.sqlViewName | CFIGRIRPURDOCITM | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| EndUserText.label | GR/IR Purchasing Document Item | view | |
| VDM.viewType | #CONSUMPTION | view | |
| ObjectModel.representativeKey | PurchasingDocumentItem | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| ObjectModel.usageType.serviceQuality | #C | view |
Fields (45)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | PurchasingDocument | |||
| KEY | PurchasingDocumentItem | |||
| CompanyCode | I_PurchasingDocumentItem | CompanyCode | Receiver Company Code | |
| PurchasingDocumentCategory | I_PurchasingDocumentItem | PurchasingDocumentCategory | Doc. Category | |
| Supplier | ||||
| DocumentCurrency | I_PurchasingDocumentItem | DocumentCurrency | Document Currency | |
| PurchasingDocumentType | ||||
| MaterialGroup | I_PurchasingDocumentItem | MaterialGroup | Product Group | |
| Material | I_PurchasingDocumentItem | Material | Vehicle Model | |
| Plant | I_PurchasingDocumentItem | Plant | Valuation Area | |
| PurchasingOrganization | ||||
| PurchasingOrganizationName | ||||
| PurchasingGroup | ||||
| PurchasingGroupName | ||||
| FaxNumber | ||||
| PurchasingGroupPhoneNumber | ||||
| PurchasingDocumentItemText | I_PurchasingDocumentItem | PurchasingDocumentItemText | Short Text | |
| OrderQuantityUnit | I_PurchasingDocumentItem | OrderQuantityUnit | Sales Unit | |
| Language | ||||
| LastChangeDateTime | ||||
| PurchasingDocumentOrderDate | ||||
| CreatedByUser | ||||
| RequisitionerUser | ||||
| NetAmount | I_PurchasingDocumentItem | NetAmount | Stated Amount | |
| NetPriceAmount | I_PurchasingDocumentItem | NetPriceAmount | Net Price | |
| NetPriceQuantity | I_PurchasingDocumentItem | NetPriceQuantity | Price Unit | |
| OrderQuantity | I_PurchasingDocumentItem | OrderQuantity | Quantity | |
| IsFinallyInvoiced | I_PurchasingDocumentItem | IsFinallyInvoiced | Final Invoice | |
| IsDeleted | ||||
| ManufacturerMaterial | I_PurchasingDocumentItem | ManufacturerMaterial | MPN: Material | |
| _CompanyCode | I_PurchasingDocumentItem | _CompanyCode | ||
| _Material | I_PurchasingDocumentItem | _Material | ||
| _MaterialGroup | I_PurchasingDocumentItem | _MaterialGroup | ||
| _OrderQuantityUnit | I_PurchasingDocumentItem | _OrderQuantityUnit | ||
| _Plant | I_PurchasingDocumentItem | _Plant | ||
| _PurgDocumentCategory | I_PurchasingDocumentItem | _PurgDocumentCategory | ||
| _DocumentCurrency | I_PurchasingDocumentItem | _DocumentCurrency | ||
| _ManufacturerMaterial | I_PurchasingDocumentItem | _ManufacturerMaterial | ||
| _Language | ||||
| _Supplier | ||||
| _CreatedByUser | _CreatedByUser | |||
| _RequisitionerUser | _RequisitionerUser | |||
| _GRIRProcess | _GRIRProcess | |||
| _SupplierText | _SupplierText | |||
| _PurchasingDocument | I_PurchasingDocumentItem | _PurchasingDocument |
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_GRIRPurchasingDocItem.
-- 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: CFIGRIRPURDOCITM
CREATE VIEW C_GRIRPurchasingDocItem AS
SELECT
cast( I_PurchasingDocumentItem.PurchasingDocument as fis_ebeln preserving type) AS PurchasingDocument,
cast( I_PurchasingDocumentItem.PurchasingDocumentItem as fis_ebelp preserving type) AS PurchasingDocumentItem,
I_PurchasingDocumentItem.CompanyCode AS CompanyCode,
I_PurchasingDocumentItem.PurchasingDocumentCategory AS PurchasingDocumentCategory,
I_PurchasingDocumentItem._PurchasingDocument.Supplier AS Supplier,
I_PurchasingDocumentItem.DocumentCurrency AS DocumentCurrency,
I_PurchasingDocumentItem._PurchasingDocument.PurchasingDocumentType AS PurchasingDocumentType,
I_PurchasingDocumentItem.MaterialGroup AS MaterialGroup,
I_PurchasingDocumentItem.Material AS Material,
I_PurchasingDocumentItem.Plant AS Plant,
cast(I_PurchasingDocumentItem._PurchasingDocument.PurchasingOrganization as fis_grir_ekorg preserving type ) AS PurchasingOrganization,
I_PurchasingDocumentItem._PurchasingDocument._PurchasingOrganization.PurchasingOrganizationName AS PurchasingOrganizationName,
cast(I_PurchasingDocumentItem._PurchasingDocument.PurchasingGroup as fis_grir_ekgrp preserving type ) AS PurchasingGroup,
I_PurchasingDocumentItem._PurchasingDocument._PurchasingGroup.PurchasingGroupName AS PurchasingGroupName,
I_PurchasingDocumentItem._PurchasingDocument._PurchasingGroup.FaxNumber AS FaxNumber,
I_PurchasingDocumentItem._PurchasingDocument._PurchasingGroup.PurchasingGroupPhoneNumber AS PurchasingGroupPhoneNumber,
I_PurchasingDocumentItem.PurchasingDocumentItemText AS PurchasingDocumentItemText,
I_PurchasingDocumentItem.OrderQuantityUnit AS OrderQuantityUnit,
I_PurchasingDocumentItem._PurchasingDocument.Language AS Language,
I_PurchasingDocumentItem._PurchasingDocument.LastChangeDateTime AS LastChangeDateTime,
I_PurchasingDocumentItem._PurchasingDocument.PurchasingDocumentOrderDate AS PurchasingDocumentOrderDate,
I_PurchasingDocumentItem._PurchasingDocument.CreatedByUser AS CreatedByUser,
I_PurchasingDocumentItem._PurchaseRequisitionItem.CreatedByUser AS RequisitionerUser,
I_PurchasingDocumentItem.NetAmount AS NetAmount,
I_PurchasingDocumentItem.NetPriceAmount AS NetPriceAmount,
I_PurchasingDocumentItem.NetPriceQuantity AS NetPriceQuantity,
I_PurchasingDocumentItem.OrderQuantity AS OrderQuantity,
I_PurchasingDocumentItem.IsFinallyInvoiced AS IsFinallyInvoiced,
I_PurchasingDocumentItem._PurchasingInfoRecord.IsDeleted AS IsDeleted,
I_PurchasingDocumentItem.ManufacturerMaterial AS ManufacturerMaterial,
I_PurchasingDocumentItem._CompanyCode AS _CompanyCode,
I_PurchasingDocumentItem._Material AS _Material,
I_PurchasingDocumentItem._MaterialGroup AS _MaterialGroup,
I_PurchasingDocumentItem._OrderQuantityUnit AS _OrderQuantityUnit,
I_PurchasingDocumentItem._Plant AS _Plant,
I_PurchasingDocumentItem._PurgDocumentCategory AS _PurgDocumentCategory,
I_PurchasingDocumentItem._DocumentCurrency AS _DocumentCurrency,
I_PurchasingDocumentItem._ManufacturerMaterial AS _ManufacturerMaterial,
I_PurchasingDocumentItem._PurchasingDocument._Language AS _Language,
I_PurchasingDocumentItem._PurchasingDocument._Supplier AS _Supplier,
I_PurchasingDocumentItem._PurchasingDocument AS _PurchasingDocument
FROM I_PurchasingDocumentItem
LEFT OUTER JOIN I_Supplier AS _SupplierText ON Supplier = _SupplierText.Supplier -- association [0..1]
LEFT OUTER JOIN I_UserContactCard AS _CreatedByUser ON CreatedByUser = _CreatedByUser.ContactCardID -- association [0..1]
LEFT OUTER JOIN I_UserContactCard AS _RequisitionerUser ON RequisitionerUser = _RequisitionerUser.ContactCardID -- association [0..1]
LEFT OUTER JOIN I_GRIRProcess AS _GRIRProcess ON CompanyCode = _GRIRProcess.CompanyCode AND PurchasingDocument = _GRIRProcess.PurchasingDocument AND PurchasingDocumentItem = _GRIRProcess.PurchasingDocumentItem -- 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