I_IN_STODocument

DDL: I_IN_STODOCUMENT SQL: IINSTODOC Type: view COMPOSITE Package: GLO_LOG_IN

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 23 fields with key fields PurchasingDocument, DeliveryDocument. It has 4 associations to related views. Part of development package GLO_LOG_IN.

Data Sources (2)

SourceAliasJoin Type
I_AccountingDocument I_AccountingDocument left_outer
I_IN_STOBilling I_IN_STOBilling from

Associations (4)

CardinalityTargetAliasCondition
[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)

NameValueLevelField
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 (23)

KeyFieldSource TableSource FieldDescription
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
_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]
;