P_TW_StRpNotRptdItem

DDL: P_TW_STRPNOTRPTDITEM SQL: PTWNOTRPTITEM Type: view COMPOSITE Package: GLO_FIN_IS_VAT_TW

Not Reported Tax Items for Taiwan VAT

P_TW_StRpNotRptdItem is a Composite CDS View that provides data about "Not Reported Tax Items for Taiwan VAT" in SAP S/4HANA. It reads from 4 data sources (P_TW_AcctgDocLeadingTaxCode, I_TW_TaxCode, I_StRpTaxItemGrpg, P_TW_StRpRptdItem) and exposes 52 fields with key fields CompanyCode, AccountingDocument, TaxItem, TaxGroup. It has 3 associations to related views. Part of development package GLO_FIN_IS_VAT_TW.

Data Sources (4)

SourceAliasJoin Type
P_TW_AcctgDocLeadingTaxCode _LeadingTaxCode inner
I_TW_TaxCode _TWTaxCode left_outer
I_StRpTaxItemGrpg I_StRpTaxItemGrpg left_outer
P_TW_StRpRptdItem P_TW_StRpRptdItem left_outer

Parameters (5)

NameTypeDefault
P_StatryRptgEntity srf_reporting_entity
P_StatryRptCategory srf_rep_cat_id
P_StatryRptRunID srf_report_run_id
P_StatryRptRunType srf_report_run_type
P_StatryRptRefNmbrPrefixValue idtw_ref_num_prefix

Associations (3)

CardinalityTargetAliasCondition
[0..1] I_OperationalAcctgDocItem g I_StRpTaxItem.CompanyCode = g.CompanyCode and I_StRpTaxItem.AccountingDocument = g.AccountingDocument and I_StRpTaxItem.FiscalYear = g.FiscalYear and I_StRpTaxItem.TaxItemGroup = g.TaxItemGroup --CE2002: I_StRpTaxItem.TaxItemGroup is the BSET-TXGRP, g.TaxItemGroup is the BSEG-TXGRP and (g.TaxType is not null and g.TaxType <> '')
[0..1] I_BillingDocument _CheckingBillingDocument I_StRpTaxItem.OriginalReferenceDocument = _CheckingBillingDocument.BillingDocument and I_StRpTaxItem.ReferenceDocumentType = 'VBRK'
[0..1] I_InvoiceList _InvoiceList I_StRpTaxItem.DocumentReferenceID = _InvoiceList.InvoiceList

Annotations (5)

NameValueLevelField
AbapCatalog.sqlViewName PTWNOTRPTITEM view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
VDM.viewType #COMPOSITE view
VDM.private true view

Fields (52)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode I_StRpTaxItem CompanyCode Receiver Company Code
KEY AccountingDocument I_StRpTaxItem AccountingDocument Journal Entry
KEY TaxItem I_StRpTaxItem TaxItem Tax Item
I_TaxItemGFNchange
FiscalYear
KEY TaxGroup I_StRpTaxItemGrpg TaxGroup Tax Group
CE2005
TaxBox
CE2005
TaxDeclnAmountType
CE2005
TransactionTypeDetermination
CE2005
DebitCreditCode
ReportingDate
TaxCode I_StRpTaxItem TaxCode Tax Code
TaxCodeendasLeadingTaxCode
TaxRate I_StRpTaxItem TaxRate Tax Rate
TaxRateValidityStartDate I_StRpTaxItem TaxRateValidityStartDate Tax Rate Validity Start Date
TaxNumber1 I_StRpTaxItem TaxNumber1 VAT Reg. No.
BusinessPartner I_StRpTaxItem BusinessPartner Issuing Authority
TaxType I_StRpTaxItem TaxType Tax Type
IsReversal
IsReversed
ReverseDocument
ReverseDocumentFiscalYear
OriginalReferenceDocument
ReferenceDocumentType
NmbrOfPages
CompanyCodeCurrency I_StRpTaxItem CompanyCodeCurrency Local Currency
TaxBaseAmountInCoCodeCrcy I_StRpTaxItem TaxBaseAmountInCoCodeCrcy TxBaseAmt CoCodeCrcy
TaxAmountInCoCodeCrcy I_StRpTaxItem TaxAmountInCoCodeCrcy Tax Amount in Company Code Currency
PostingDate I_StRpTaxItem PostingDate Posting Date for GR
DocumentDate I_StRpTaxItem DocumentDate Journal Entry Date
TaxReportingDate I_StRpTaxItem TaxReportingDate Tax Reporting Date
TaxItemGroup I_StRpTaxItem TaxItemGroup Tax doc. item number
AccountingDocumentType I_StRpTaxItem AccountingDocumentType Journal Entry Type
GLAccount I_StRpTaxItem GLAccount General Ledger
BusinessPlace I_StRpTaxItem BusinessPlace Business place
TaxJurisdiction I_StRpTaxItem TaxJurisdiction Tax Jurisdiction
LowestLevelTaxJurisdiction I_StRpTaxItem LowestLevelTaxJurisdiction Jurisdict. Code
TaxDeclnAmountType
ReportingCountry I_StRpTaxItem ReportingCountry
TaxItemGroupingVersion I_StRpTaxItemGrpg TaxItemGroupingVersion Tax Grping Ver.
_AccountingDocument I_StRpTaxItem _AccountingDocument
_ReceivablesPayablesItem I_StRpTaxItem _ReceivablesPayablesItem
_OneTimeAccountBP I_StRpTaxItem _OneTimeAccountBP
StatryRptgEntity
StatryRptCategory
StatryRptRunID
StatryRptRunType
DocumentReferenceNumberPrefix I_StRpTaxItem DocumentReferenceNumberPrefix

Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.

-- Derived SQL interpretation of CDS view P_TW_StRpNotRptdItem.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.
-- SQL view name: PTWNOTRPTITEM
-- Parameters: P_StatryRptgEntity : srf_reporting_entity, P_StatryRptCategory : srf_rep_cat_id, P_StatryRptRunID : srf_report_run_id, P_StatryRptRunType : srf_report_run_type, P_StatryRptRefNmbrPrefixValue : idtw_ref_num_prefix

CREATE VIEW P_TW_StRpNotRptdItem AS
SELECT
  I_StRpTaxItem.CompanyCode AS CompanyCode,
  I_StRpTaxItem.AccountingDocument AS AccountingDocument,
  I_StRpTaxItem.TaxItem AS TaxItem,
  AccountingDocumentItem => TaxItem key I_StRpTaxItem.FiscalYear AS FiscalYear,
  I_StRpTaxItemGrpg.TaxGroup AS TaxGroup,
  add the key TaxGroup as I_STRPTAXITEMBOXCUBE add it as key to improve performance (avoid to use DISTINCT) key I_StRpTaxItemGrpg.TaxBox AS TaxBox,
  add the key TaxBox as I_STRPTAXITEMBOXCUBE add it as key to improve performance (avoid to use DISTINCT) key I_StRpTaxItemGrpg.TaxDeclnAmountType AS TaxDeclnAmountType,
  add the key TaxDeclnAmountType as I_STRPTAXITEMBOXCUBE add it as key to improve performance (avoid to use DISTINCT) key I_StRpTaxItem.TransactionTypeDetermination AS TransactionTypeDetermination,
  add the key TransactionTypeDetermination as I_STRPTAXITEMBOXCUBE add it as key to improve performance (avoid to use DISTINCT) I_StRpTaxItem.DebitCreditCode AS DebitCreditCode,
  I_StRpTaxItem.TaxCode AS TaxCode,
  case when (I_StRpTaxItem.DocumentReferenceID = '' or I_StRpTaxItem.DocumentReferenceID is null) and (I_StRpTaxItem._AccountingDocument.NmbrOfPages is null or I_StRpTaxItem._AccountingDocument.NmbrOfPages = '' or I_StRpTaxItem._AccountingDocument.NmbrOfPages is initial) then I_StRpTaxItem.TaxCode when I_StRpTaxItem.DocumentReferenceID is not null then _LeadingTaxCode.TaxCode end as LeadingTaxCode AS TaxCodeendasLeadingTaxCode,
  I_StRpTaxItem.TaxRate AS TaxRate,
  I_StRpTaxItem.TaxRateValidityStartDate AS TaxRateValidityStartDate,
  I_StRpTaxItem.TaxNumber1 AS TaxNumber1,
  I_StRpTaxItem.BusinessPartner AS BusinessPartner,
  I_StRpTaxItem.TaxType AS TaxType,
  I_StRpTaxItem._AccountingDocument.IsReversal AS IsReversal,
  I_StRpTaxItem._AccountingDocument.IsReversed AS IsReversed,
  I_StRpTaxItem._AccountingDocument.ReverseDocument AS ReverseDocument,
  I_StRpTaxItem._AccountingDocument.ReverseDocumentFiscalYear AS ReverseDocumentFiscalYear,
  I_StRpTaxItem._AccountingDocument.OriginalReferenceDocument AS OriginalReferenceDocument,
  I_StRpTaxItem._AccountingDocument.ReferenceDocumentType AS ReferenceDocumentType,
  I_StRpTaxItem._AccountingDocument.NmbrOfPages AS NmbrOfPages,
  I_StRpTaxItem.CompanyCodeCurrency AS CompanyCodeCurrency,
  I_StRpTaxItem.TaxBaseAmountInCoCodeCrcy AS TaxBaseAmountInCoCodeCrcy,
  I_StRpTaxItem.TaxAmountInCoCodeCrcy AS TaxAmountInCoCodeCrcy,
  I_StRpTaxItem.PostingDate AS PostingDate,
  I_StRpTaxItem.DocumentDate AS DocumentDate,
  I_StRpTaxItem.TaxReportingDate AS TaxReportingDate,
  I_StRpTaxItem.TaxItemGroup AS TaxItemGroup,
  I_StRpTaxItem.AccountingDocumentType AS AccountingDocumentType,
  I_StRpTaxItem.GLAccount AS GLAccount,
  I_StRpTaxItem.BusinessPlace AS BusinessPlace,
  I_StRpTaxItem.TaxJurisdiction AS TaxJurisdiction,
  I_StRpTaxItem.LowestLevelTaxJurisdiction AS LowestLevelTaxJurisdiction,
  I_StRpTaxItem.ReportingCountry AS ReportingCountry,
  I_StRpTaxItemGrpg.TaxItemGroupingVersion AS TaxItemGroupingVersion,
  I_StRpTaxItem._AccountingDocument AS _AccountingDocument,
  I_StRpTaxItem._ReceivablesPayablesItem AS _ReceivablesPayablesItem,
  I_StRpTaxItem._OneTimeAccountBP AS _OneTimeAccountBP,
  $parameters.P_StatryRptgEntity AS StatryRptgEntity,
  $parameters.P_StatryRptCategory AS StatryRptCategory,
  $parameters.P_StatryRptRunID AS StatryRptRunID,
  $parameters.P_StatryRptRunType AS StatryRptRunType,
  I_StRpTaxItem.DocumentReferenceNumberPrefix AS DocumentReferenceNumberPrefix
LEFT OUTER JOIN I_StRpTaxItemGrpg ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_TW_TaxCode AS _TWTaxCode ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN P_TW_StRpRptdItem ON /* join condition not captured in parsed metadata */
INNER JOIN P_TW_AcctgDocLeadingTaxCode AS _LeadingTaxCode ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_OperationalAcctgDocItem AS g ON I_StRpTaxItem.CompanyCode = g.CompanyCode AND I_StRpTaxItem.AccountingDocument = g.AccountingDocument AND I_StRpTaxItem.FiscalYear = g.FiscalYear AND I_StRpTaxItem.TaxItemGroup = g.TaxItemGroup  -- association [0..1]
LEFT OUTER JOIN I_BillingDocument AS _CheckingBillingDocument ON I_StRpTaxItem.OriginalReferenceDocument = _CheckingBillingDocument.BillingDocument AND I_StRpTaxItem.ReferenceDocumentType = 'VBRK'  -- association [0..1]
LEFT OUTER JOIN I_InvoiceList AS _InvoiceList ON I_StRpTaxItem.DocumentReferenceID = _InvoiceList.InvoiceList  -- association [0..1]
;