P_DeftaxInvoice

DDL: P_DEFTAXINVOICE SQL: PDEFTAXINVOICE Type: view COMPOSITE

P_DeftaxInvoice is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (I_JournalEntry) and exposes 70 fields with key fields CompanyCode, FiscalYear, AccountingDocument.

Data Sources (1)

SourceAliasJoin Type
I_JournalEntry I_JournalEntry from

Annotations (7)

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

Fields (70)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode CompanyCode
KEY FiscalYear FiscalYear
KEY AccountingDocument AccountingDocument
AccountingDocumentType AccountingDocumentType
DocumentDate DocumentDate
PostingDate PostingDate
FiscalPeriod FiscalPeriod
AccountingDocumentCreationDate AccountingDocumentCreationDate
CreationTime CreationTime
LastChangeDate LastChangeDate
ExchangeRateDate ExchangeRateDate
AccountingDocCreatedByUser AccountingDocCreatedByUser
TransactionCode TransactionCode
IntercompanyTransaction IntercompanyTransaction
DocumentReferenceID DocumentReferenceID
ReverseDocument ReverseDocument
ReverseDocumentFiscalYear ReverseDocumentFiscalYear
AccountingDocumentHeaderText AccountingDocumentHeaderText
TransactionCurrency TransactionCurrency
ExchangeRate ExchangeRate
AccountingDocumentCategory AccountingDocumentCategory
BusinessTransactionType BusinessTransactionType
BatchInputSession BatchInputSession
ReferenceDocumentType ReferenceDocumentType
OriginalReferenceDocument OriginalReferenceDocument
CompanyCodeCurrency CompanyCodeCurrency
AdditionalCurrency1 AdditionalCurrency1
AdditionalCurrency2 AdditionalCurrency2
ReversalIsPlanned ReversalIsPlanned
PlannedReversalDate PlannedReversalDate
TaxIsCalculatedAutomatically TaxIsCalculatedAutomatically
TaxBaseAmountIsNetAmount TaxBaseAmountIsNetAmount
SourceCompanyCode SourceCompanyCode
LogicalSystem LogicalSystem
ReferenceDocumentLogicalSystem ReferenceDocumentLogicalSystem
TaxExchangeRate TaxExchangeRate
ReversalReason ReversalReason
Branch Branch
Reference1InDocumentHeader Reference1InDocumentHeader
Reference2InDocumentHeader Reference2InDocumentHeader
InvoiceReceiptDate InvoiceReceiptDate
Ledger Ledger
LedgerGroup LedgerGroup
TaxReportingDate TaxReportingDate
AccountingDocumentClass AccountingDocumentClass
ExchangeRateType ExchangeRateType
SenderLogicalSystem SenderLogicalSystem
SenderCompanyCode SenderCompanyCode
SenderAccountingDocument SenderAccountingDocument
SenderFiscalYear SenderFiscalYear
ReversalReferenceDocumentCntxt ReversalReferenceDocumentCntxt
ReversalReferenceDocument ReversalReferenceDocument
LatePaymentReason LatePaymentReason
SalesDocumentCondition SalesDocumentCondition
IsReversal IsReversal
IsReversed IsReversed
_TaxItem _TaxItem
_CompanyCode _CompanyCode
_FiscalYear _FiscalYear
_AccountingDocumentType _AccountingDocumentType
_CompanyCodeCurrency _CompanyCodeCurrency
_TransactionCurrency _TransactionCurrency
_FiscalPeriod _FiscalPeriod
_AccountingDocumentCategory _AccountingDocumentCategory
_BusinessTransactionType _BusinessTransactionType
_BusinessTransactionTypeText _BusinessTransactionTypeText
_ReferenceDocumentType _ReferenceDocumentType
_RefDocumentLogicalSystem _RefDocumentLogicalSystem
_Ledger _Ledger
_LedgerText _LedgerText
@AbapCatalog.sqlViewName: 'PDEFTAXINVOICE'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@VDM.private: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
@VDM.viewType: #COMPOSITE
define view P_DeftaxInvoice as select from I_JournalEntry
  association[0..*] to I_TaxItem as _TaxItem
    on $projection.CompanyCode = _TaxItem.CompanyCode
      and $projection.AccountingDocument = _TaxItem.AccountingDocument
      and $projection.FiscalYear = _TaxItem.FiscalYear
{
  @ObjectModel.foreignKey.association: '_CompanyCode'
  key CompanyCode,
  @ObjectModel.foreignKey.association: '_FiscalYear'
  key FiscalYear,
  key AccountingDocument,
  
  @ObjectModel.foreignKey.association: '_AccountingDocumentType'
  AccountingDocumentType, 
  DocumentDate,
  PostingDate,
  @ObjectModel.foreignKey.association: '_FiscalPeriod'
  FiscalPeriod,
  AccountingDocumentCreationDate,
  CreationTime,
  LastChangeDate,
  ExchangeRateDate,
  AccountingDocCreatedByUser,
  TransactionCode,
  IntercompanyTransaction,
  DocumentReferenceID,
  ReverseDocument,
  ReverseDocumentFiscalYear,
  AccountingDocumentHeaderText,
  
  @ObjectModel.foreignKey.association: '_TransactionCurrency'
  @Semantics.currencyCode:true
  TransactionCurrency,
  //@Aggregation.default: #NOP

  ExchangeRate,
  
  @ObjectModel.foreignKey.association: '_AccountingDocumentCategory'
  AccountingDocumentCategory,
        //--[ GENERATED:012:29JlHNUf7jY4ip7HtmZN9m

        @Consumption.valueHelpDefinition: [ 
          { entity:  { name:    'I_BusTransTypeStdVH',
                       element: 'BusinessTransactionType' }
          }]
        @ObjectModel.text.association: '_BusinessTransactionTypeText'
        // ]--GENERATED

  @ObjectModel.foreignKey.association: '_BusinessTransactionType'
  BusinessTransactionType,
  BatchInputSession,
  @ObjectModel.foreignKey.association: '_ReferenceDocumentType'
  ReferenceDocumentType,
  OriginalReferenceDocument,
  
  @ObjectModel.foreignKey.association: '_CompanyCodeCurrency'
  @Semantics.currencyCode:true
  CompanyCodeCurrency,
  @Semantics.currencyCode:true
  AdditionalCurrency1,
  @Semantics.currencyCode:true
  AdditionalCurrency2,
  
  ReversalIsPlanned,
  PlannedReversalDate,
  TaxIsCalculatedAutomatically,
  
  TaxBaseAmountIsNetAmount,
  SourceCompanyCode,
  @ObjectModel.foreignKey.association: '_LogicalSystem'
  @VDM.lifecycle.status:    #DEPRECATED
  @VDM.lifecycle.successor: 'ReferenceDocumentLogicalSystem'
  LogicalSystem,
  @ObjectModel.foreignKey.association: '_RefDocumentLogicalSystem'
  @Analytics.internalName: #LOCAL
  ReferenceDocumentLogicalSystem,
  //@Aggregation.default: #NOP

  TaxExchangeRate,
  ReversalReason,
  Branch,
  Reference1InDocumentHeader,
  Reference2InDocumentHeader,
  InvoiceReceiptDate,
        //--[ GENERATED:012:29JlHNUf7jY4ip7HtmZN9m

        @Consumption.valueHelpDefinition: [ 
          { entity:  { name:    'I_LedgerStdVH',
                       element: 'Ledger' }
          }]
        @ObjectModel.text.association: '_LedgerText'
        // ]--GENERATED

  @ObjectModel.foreignKey.association: '_Ledger'      
  Ledger,
  LedgerGroup,
//  AlternativeReferenceDocument,

  TaxReportingDate,
  AccountingDocumentClass,
  ExchangeRateType,
  SenderLogicalSystem,
  SenderCompanyCode,
  SenderAccountingDocument,
  SenderFiscalYear,
  ReversalReferenceDocumentCntxt,
  ReversalReferenceDocument,
  LatePaymentReason,
  SalesDocumentCondition,
  IsReversal,
  IsReversed,
  
  _TaxItem,   
  
  _CompanyCode,
  _FiscalYear,
  _AccountingDocumentType,
  _CompanyCodeCurrency,
  _TransactionCurrency,
  _FiscalPeriod,
  _AccountingDocumentCategory,
  _BusinessTransactionType,
  _BusinessTransactionTypeText,
  _ReferenceDocumentType,
  _RefDocumentLogicalSystem,
  _Ledger,
  _LedgerText //,

  
  //_JournalEntryItem,

  //_OperationalAcctgDocItem,

  //_AddlLedgerOplAcctgDocItem

}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_JOURNALENTRY"
],
"ASSOCIATED":
[
"I_ACCOUNTINGDOCUMENTCATEGORY",
"I_ACCOUNTINGDOCUMENTTYPE",
"I_BUSINESSTRANSACTIONTYPE",
"I_BUSTRANSACTIONTYPETEXT",
"I_COMPANYCODE",
"I_CURRENCY",
"I_FISCALYEARFORCOMPANYCODE",
"I_FISCALYEARPERIODFORCMPNYCODE",
"I_LEDGER",
"I_LEDGERTEXT",
"I_LOGICALSYSTEM",
"I_REFERENCEDOCUMENTTYPE",
"I_TAXITEM"
],
"BASE":
[
"I_JOURNALENTRY"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/