P_PL_SAFTCancAcctgInvoice

DDL: P_PL_SAFTCANCACCTGINVOICE SQL: PPLSAFTCNCACCINV Type: view COMPOSITE

P_PL_SAFTCancAcctgInvoice is a Composite CDS View in SAP S/4HANA.

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName PPLSAFTCNCACCINV view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #CHECK view
VDM.private true view
VDM.viewType #COMPOSITE view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #P view
ClientHandling.algorithm #SESSION_VARIABLE view

Fields (10)

KeyFieldSource TableSource FieldDescription
CompanyCode Entry CompanyCode
AccountingDocument Entry AccountingDocument
FiscalYear Entry FiscalYear
ReverseDocument ReverseDocument AccountingDocument
ReverseDocumentFiscalYear ReverseDocument FiscalYear
PL_SAFTInvoiceType RevDocTypeMap PL_SAFTInvoiceType
InvoiceReference ReverseDocumentItem InvoiceReference
InvoiceReferenceFiscalYear ReverseDocumentItem InvoiceReferenceFiscalYear
_CompanyCode Entry _CompanyCode
_FiscalYear Entry _FiscalYear
@AbapCatalog.sqlViewName: 'PPLSAFTCNCACCINV'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@VDM.private: true
@VDM.viewType: #COMPOSITE
@ObjectModel.usageType.sizeCategory: #XL
@ObjectModel.usageType.dataClass:  #MIXED
@ObjectModel.usageType.serviceQuality: #P
@ClientHandling.algorithm: #SESSION_VARIABLE
define view P_PL_SAFTCancAcctgInvoice
  as select distinct from   I_JournalEntry                as Entry

    left outer to one join  I_JournalEntry                as ReverseDocument     on  ReverseDocument.CompanyCode        = Entry.CompanyCode
                                                                                 and ReverseDocument.AccountingDocument = Entry.ReverseDocument
                                                                                 and ReverseDocument.FiscalYear         = Entry.ReverseDocumentFiscalYear

    left outer to one join  I_PL_SAFTAccountingDocTypeMap as RevDocTypeMap       on  RevDocTypeMap.AccountingDocumentType =  ReverseDocument.AccountingDocumentType
                                                                                 and RevDocTypeMap.StartDate              <= ReverseDocument.TaxReportingDate
                                                                                 and RevDocTypeMap.EndDate                >= ReverseDocument.TaxReportingDate

    left outer to many join I_OperationalAcctgDocItem     as ReverseDocumentItem on  ReverseDocumentItem.CompanyCode          = ReverseDocument.CompanyCode
                                                                                 and ReverseDocumentItem.AccountingDocument   = ReverseDocument.AccountingDocument
                                                                                 and ReverseDocumentItem.FiscalYear           = ReverseDocument.FiscalYear
                                                                                 and ReverseDocumentItem.FinancialAccountType = 'D'



{
  Entry.CompanyCode,
  Entry.AccountingDocument,
  Entry.FiscalYear,

  ReverseDocument.AccountingDocument as ReverseDocument,
  ReverseDocument.FiscalYear         as ReverseDocumentFiscalYear,

  RevDocTypeMap.PL_SAFTInvoiceType,

  ReverseDocumentItem.InvoiceReference,
  ReverseDocumentItem.InvoiceReferenceFiscalYear,

  //Association

  Entry._CompanyCode,
  Entry._FiscalYear  

}
where
      Entry.BusinessTransactionType = 'RFBU'
  and Entry.IsReversal              = 'X'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_JOURNALENTRY",
"I_OPERATIONALACCTGDOCITEM",
"I_PL_SAFTACCOUNTINGDOCTYPEMAP"
],
"ASSOCIATED":
[
"I_COMPANYCODE",
"I_FISCALYEARFORCOMPANYCODE"
],
"BASE":
[
"I_JOURNALENTRY"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/