P_RU_VATInvoiceClearingChain2

DDL: P_RU_VATINVOICECLEARINGCHAIN2 SQL: PRUVATINVCLRCH2 Type: view CONSUMPTION

P_RU_VATInvoiceClearingChain2 is a Consumption CDS View in SAP S/4HANA. It reads from 2 data sources (P_RU_VATInvoiceClearingChain1, P_RU_BusPartnerClearing) and exposes 15 fields.

Data Sources (2)

SourceAliasJoin Type
P_RU_VATInvoiceClearingChain1 Level1 from
P_RU_BusPartnerClearing Level2 inner

Annotations (7)

NameValueLevelField
VDM.private true view
VDM.viewType #CONSUMPTION view
AbapCatalog.sqlViewName PRUVATINVCLRCH2 view
AbapCatalog.preserveKey true view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view

Fields (15)

KeyFieldSource TableSource FieldDescription
CompanyCode P_RU_VATInvoiceClearingChain1 CompanyCode
AccountingDocument P_RU_VATInvoiceClearingChain1 AccountingDocument
FiscalYear P_RU_VATInvoiceClearingChain1 FiscalYear
AccountingDocumentItem P_RU_VATInvoiceClearingChain1 AccountingDocumentItem
DebitCreditCode P_RU_VATInvoiceClearingChain1 DebitCreditCode
AccountType P_RU_VATInvoiceClearingChain1 AccountType
ClearingAccountingDocument P_RU_BusPartnerClearing ClearingAccountingDocument
ClearingFiscalYear P_RU_BusPartnerClearing ClearingFiscalYear
ClearingInformationIndex P_RU_BusPartnerClearing ClearingInformationIndex
ClearingInformationType P_RU_BusPartnerClearing ClearingInformationType
ClearedAccountingDocument P_RU_BusPartnerClearing AccountingDocument
ClearedFiscalYear P_RU_BusPartnerClearing FiscalYear
ClearedAccountingDocumentItem P_RU_BusPartnerClearing AccountingDocumentItem
ClearedAccountType P_RU_BusPartnerClearing AccountType
ClearingLevel
@VDM.private: true
@VDM.viewType: #CONSUMPTION
@AbapCatalog.sqlViewName: 'PRUVATINVCLRCH2'
@AbapCatalog.preserveKey: true
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
define view P_RU_VATInvoiceClearingChain2
  as select from P_RU_VATInvoiceClearingChain1 as Level1

    inner join   P_RU_BusPartnerClearing       as Level2 on  Level2.CompanyCode                =  Level1.CompanyCode
                                                         and Level2.ClearingAccountingDocument =  Level1.ClearingAccountingDocument
                                                         and Level2.ClearingFiscalYear         =  Level1.ClearingFiscalYear
                                                         and Level2.DebitCreditCode            <> Level1.DebitCreditCode

{
  Level1.CompanyCode,
  Level1.AccountingDocument,
  Level1.FiscalYear,
  Level1.AccountingDocumentItem,
  Level1.DebitCreditCode,
  Level1.AccountType,

  Level2.ClearingAccountingDocument,
  Level2.ClearingFiscalYear,
  Level2.ClearingInformationIndex,
  Level2.ClearingInformationType,

  Level2.AccountingDocument     as ClearedAccountingDocument,
  Level2.FiscalYear             as ClearedFiscalYear,
  Level2.AccountingDocumentItem as ClearedAccountingDocumentItem,
  Level2.AccountType            as ClearedAccountType,

  '2'                           as ClearingLevel
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"P_RU_BUSPARTNERCLEARING",
"P_RU_VATINVOICECLEARINGCHAIN1"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/