I_IN_STODocument
STO GR verified Documents for Invoice
I_IN_STODocument is a Composite CDS View that provides data about "STO GR verified Documents for Invoice" in SAP S/4HANA. It reads from 2 data sources (I_AccountingDocument, I_IN_STOBilling) and exposes 24 fields with key fields PurchasingDocument, DeliveryDocument. It has 4 associations to related views.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| I_AccountingDocument | I_AccountingDocument | left_outer |
| I_IN_STOBilling | I_IN_STOBilling | from |
Associations (4)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..1] | I_CompanyCode | _CompanyCode | $projection.CompanyCode = _CompanyCode.CompanyCode |
| [1..1] | I_CompanyCodeStdVH | _CompanyCodeStdVH | $projection.CompanyCode = _CompanyCodeStdVH.CompanyCode |
| [1..1] | I_Plant | _SupplyingPlant | $projection.SupplyingPlant = _SupplyingPlant.Plant |
| [1..1] | I_Plant | _ReceivingPlant | $projection.ReceivingPlant = _ReceivingPlant.Plant |
Annotations (9)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | IINSTODOC | view | |
| VDM.viewType | #COMPOSITE | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| EndUserText.label | STO GR verified Documents for Invoice | view |
Fields (24)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | PurchasingDocument | PurchasingDocument | Purchasing Document | |
| KEY | DeliveryDocument | PurchasingHistoryDocument | ||
| AccountingDocument | AccountingDocument | Journal Entry | ||
| PurchasingHistoryDocumentType | PurchasingHistoryDocumentType | |||
| PurchasingHistoryDocumentYear | PurchasingHistoryDocumentYear | |||
| STOCreationDate | STOCreationDate | |||
| CreationDateYear | ||||
| CreationDateMonth | ||||
| CompanyCode | I_IN_STOBilling | CompanyCode | Receiver Company Code | |
| SupplyingPlant | SupplyingPlant | Supplying Plant | ||
| ReceivingPlant | Plant | Valuation Area | ||
| PurchasingDocumentCategory | PurchasingDocumentCategory | Doc. Category | ||
| PurchasingHistoryCategory | PurchasingHistoryCategory | |||
| BillingDocument | BillingDocument | SD Document | ||
| BillingDocCreationDate | CreationDate | Time Stamp | ||
| DocumentReferenceID | I_IN_STOBilling | DocumentReferenceID | Reference | |
| BillingDocumentType | I_IN_STOBilling | BillingDocumentType | Billing Type | |
| PostingDate | I_IN_STOBilling | PostingDate | Posting Date for GR | |
| ExternalDocumentReferenceID | I_AccountingDocument | DocumentReferenceID | Reference | |
| SubsequentDocument | SubsequentDocument | |||
| _CompanyCode | _CompanyCode | |||
| _CompanyCodeStdVH | _CompanyCodeStdVH | |||
| _SupplyingPlant | _SupplyingPlant | |||
| _ReceivingPlant | _ReceivingPlant |
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_IN_STODocument.
-- 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: IINSTODOC
CREATE VIEW I_IN_STODocument AS
SELECT
PurchasingDocument,
PurchasingHistoryDocument AS DeliveryDocument,
AccountingDocument,
PurchasingHistoryDocumentType,
PurchasingHistoryDocumentYear,
STOCreationDate,
cast(left (STOCreationDate, 4) as abap.numc( 4 )) AS CreationDateYear,
cast(substring(STOCreationDate, 5, 2) as abap.numc( 2 )) AS CreationDateMonth,
I_IN_STOBilling.CompanyCode AS CompanyCode,
SupplyingPlant,
Plant AS ReceivingPlant,
PurchasingDocumentCategory,
PurchasingHistoryCategory,
BillingDocument,
CreationDate AS BillingDocCreationDate,
I_IN_STOBilling.DocumentReferenceID AS DocumentReferenceID,
I_IN_STOBilling.BillingDocumentType AS BillingDocumentType,
I_IN_STOBilling.PostingDate AS PostingDate,
I_AccountingDocument.DocumentReferenceID AS ExternalDocumentReferenceID,
SubsequentDocument
FROM I_IN_STOBilling
LEFT OUTER JOIN I_AccountingDocument ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_CompanyCode AS _CompanyCode ON CompanyCode = _CompanyCode.CompanyCode -- association [1..1]
LEFT OUTER JOIN I_CompanyCodeStdVH AS _CompanyCodeStdVH ON CompanyCode = _CompanyCodeStdVH.CompanyCode -- association [1..1]
LEFT OUTER JOIN I_Plant AS _SupplyingPlant ON SupplyingPlant = _SupplyingPlant.Plant -- association [1..1]
LEFT OUTER JOIN I_Plant AS _ReceivingPlant ON ReceivingPlant = _ReceivingPlant.Plant -- 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