P_PL_SAFTAcctgDocInvoiceBasic

DDL: P_PL_SAFTACCTGDOCINVOICEBASIC SQL: PPLSAFTACDOCINVB Type: view COMPOSITE

P_PL_SAFTAcctgDocInvoiceBasic is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (I_JournalEntry) and exposes 9 fields with key fields CompanyCode, AccountingDocument, FiscalYear. It has 2 associations to related views.

Data Sources (1)

SourceAliasJoin Type
I_JournalEntry Entry from

Associations (2)

CardinalityTargetAliasCondition
[0..1] I_PL_SAFTAccountingDocTypeMap _AccountingDocTypeMap _AccountingDocTypeMap.AccountingDocumentType = $projection.AccountingDocumentType and _AccountingDocTypeMap.StartDate <= $projection.TaxReportingDate and _AccountingDocTypeMap.EndDate >= $projection.TaxReportingDate
[0..1] P_PL_SAFTCancAcctgInvoice _CancelInvoice _CancelInvoice.CompanyCode = Entry.CompanyCode and _CancelInvoice.AccountingDocument = Entry.AccountingDocument and _CancelInvoice.FiscalYear = Entry.FiscalYear

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName PPLSAFTACDOCINVB 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 (9)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode CompanyCode
KEY AccountingDocument AccountingDocument
KEY FiscalYear FiscalYear
AccountingDocumentType AccountingDocumentType
TaxReportingDate TaxReportingDate
DocumentReferenceID DocumentReferenceID
AlternativeReferenceDocument AlternativeReferenceDocument
IsReversal IsReversal
_CancelInvoice _CancelInvoice
@AbapCatalog.sqlViewName: 'PPLSAFTACDOCINVB'
@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_SAFTAcctgDocInvoiceBasic
  as select from I_JournalEntry as Entry

  association [0..1] to I_PL_SAFTAccountingDocTypeMap as _AccountingDocTypeMap on  _AccountingDocTypeMap.AccountingDocumentType = $projection.AccountingDocumentType
                                                                               and _AccountingDocTypeMap.StartDate              <= $projection.TaxReportingDate
                                                                               and _AccountingDocTypeMap.EndDate                >= $projection.TaxReportingDate

  association [0..1] to P_PL_SAFTCancAcctgInvoice     as _CancelInvoice        on  _CancelInvoice.CompanyCode        = Entry.CompanyCode
                                                                               and _CancelInvoice.AccountingDocument = Entry.AccountingDocument
                                                                               and _CancelInvoice.FiscalYear         = Entry.FiscalYear
{

  key CompanyCode,
  key AccountingDocument,
  key FiscalYear,


      AccountingDocumentType,
      TaxReportingDate,
      
      DocumentReferenceID,
      AlternativeReferenceDocument,
      
      IsReversal,

      case when Entry.IsReversal = 'X'
        then
          _CancelInvoice.PL_SAFTInvoiceType
        else
          _AccountingDocTypeMap.PL_SAFTInvoiceType
      end as PL_SAFTInvoiceType,

      _CancelInvoice
      
}

/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_JOURNALENTRY",
"I_PL_SAFTACCOUNTINGDOCTYPEMAP",
"P_PL_SAFTCANCACCTGINVOICE"
],
"ASSOCIATED":
[
"I_PL_SAFTACCOUNTINGDOCTYPEMAP",
"P_PL_SAFTCANCACCTGINVOICE"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/