I_IN_STODocument

DDL: I_IN_STODOCUMENT SQL: IINSTODOC Type: view COMPOSITE

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)

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 (24)

KeyFieldSource TableSource FieldDescription
KEY PurchasingDocument PurchasingDocument
KEY DeliveryDocument PurchasingHistoryDocument
AccountingDocument AccountingDocument
PurchasingHistoryDocumentType PurchasingHistoryDocumentType
PurchasingHistoryDocumentYear PurchasingHistoryDocumentYear
STOCreationDate STOCreationDate
CreationDateYear
CreationDateMonth
CompanyCode I_IN_STOBilling CompanyCode
SupplyingPlant SupplyingPlant
ReceivingPlant Plant
PurchasingDocumentCategory PurchasingDocumentCategory
PurchasingHistoryCategory PurchasingHistoryCategory
BillingDocument BillingDocument
BillingDocCreationDate CreationDate
DocumentReferenceID I_IN_STOBilling DocumentReferenceID
BillingDocumentType I_IN_STOBilling BillingDocumentType
PostingDate I_IN_STOBilling PostingDate
ExternalDocumentReferenceID I_AccountingDocument DocumentReferenceID
SubsequentDocument SubsequentDocument
_CompanyCode _CompanyCode
_CompanyCodeStdVH _CompanyCodeStdVH
_SupplyingPlant _SupplyingPlant
_ReceivingPlant _ReceivingPlant
@AbapCatalog.sqlViewName: 'IINSTODOC'
@VDM.viewType: #COMPOSITE

@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #XL

@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'STO GR verified Documents for Invoice'
define view I_IN_STODocument
  as select from    I_IN_STOBilling 
    left outer join I_AccountingDocument on  I_IN_STOBilling.DocumentReferenceID = I_AccountingDocument.DocumentReferenceID
                                               and  I_AccountingDocument.ReferenceDocumentType = 'BKPFF' 
                                               and  I_AccountingDocument.ReverseDocument = ' ' 
                                               and  I_AccountingDocument.ReverseDocumentFiscalYear = '0000'
  association [1..1] to I_CompanyCode      as _CompanyCode      on $projection.CompanyCode = _CompanyCode.CompanyCode
  association [1..1] to I_CompanyCodeStdVH as _CompanyCodeStdVH on $projection.CompanyCode = _CompanyCodeStdVH.CompanyCode
  association [1..1] to I_Plant            as _SupplyingPlant   on $projection.SupplyingPlant = _SupplyingPlant.Plant
  association [1..1] to I_Plant            as _ReceivingPlant   on $projection.ReceivingPlant = _ReceivingPlant.Plant 

{
  key PurchasingDocument,
  key 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,
      SupplyingPlant,
      Plant                     as ReceivingPlant,
      PurchasingDocumentCategory,
      PurchasingHistoryCategory,
      BillingDocument,
      CreationDate              as BillingDocCreationDate,
      I_IN_STOBilling.DocumentReferenceID,
      I_IN_STOBilling.BillingDocumentType,
      I_IN_STOBilling.PostingDate,
      I_AccountingDocument.DocumentReferenceID as ExternalDocumentReferenceID,
      SubsequentDocument,

      /* Association */
      _CompanyCode,
      _CompanyCodeStdVH,
      _SupplyingPlant,
      _ReceivingPlant
}