P_StRpTaxItmWithEUTaxClass5

DDL: P_STRPTAXITMWITHEUTAXCLASS5 SQL: PSRTIEUTAXCLS5 Type: view COMPOSITE

P_StRpTaxItmWithEUTaxClass5 is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (P_StRpTaxItmWithEUTaxClass4) and exposes 43 fields with key fields CompanyCode, AccountingDocument, FiscalYear, TaxCode, TransactionTypeDetermination. It has 3 associations to related views.

Data Sources (1)

SourceAliasJoin Type
P_StRpTaxItmWithEUTaxClass4 P_StRpTaxItmWithEUTaxClass4 from

Associations (3)

CardinalityTargetAliasCondition
[0..1] I_Customer_to_BusinessPartner _CustomerToBusinessPartner $projection.Debtor = _CustomerToBusinessPartner.Customer
[0..1] I_Supplier_to_BusinessPartner _SupplierToBusinessPartner $projection.Creditor = _SupplierToBusinessPartner.Supplier
[0..1] I_BusinessPartner _BusinessPartner $projection.BusinessPartnerUUID = _BusinessPartner.BusinessPartnerUUID

Annotations (6)

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

Fields (43)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode CompanyCode Receiver Company Code
KEY AccountingDocument AccountingDocument Journal Entry
KEY FiscalYear FiscalYear G/L Fiscal Year
KEY TaxCode TaxCode Tax Code
KEY TransactionTypeDetermination TransactionTypeDetermination Transaction Key
KEY TaxItem TaxItem Tax Item
Debtor Debtor Debtor
CustomerName _kna1 BPCustomerName Name of Customer
Creditor Creditor Supplier
SupplierName _lfa1 BPSupplierName Supplier Name
VATRegistrationFromBSEG VATRegistrationFromBSEG
VATRegistrationFromBSEGCountry
IsOneTimeAccount
AuthorizationGroup
TaxItemGroup TaxItemGroup Tax doc. item number
TaxJurisdiction TaxJurisdiction Tax Jurisdiction
Country Country Venue: Ctry/Reg
AmountInReportingCurrency AmountInReportingCurrency
TaxCountry TaxCountry Tax Ctry/Reg.
ReportingCountry ReportingCountry
TaxReturnCountry TaxReturnCountry Reporting C/R
ReportingCurrency ReportingCurrency Currency
TaxBaseAmountInCoCodeCrcy TaxBaseAmountInCoCodeCrcy TxBaseAmt CoCodeCrcy
TaxBaseAmountInTransCrcy TaxBaseAmountInTransCrcy Value-Added Tax
TaxBaseAmountInCountryCrcy TaxBaseAmountInCountryCrcy Base Amount
CompanyCodeCurrency CompanyCodeCurrency Local Currency
DocumentCurrency DocumentCurrency Document Currency
CountryCurrency CountryCurrency Currency
IsReversal IsReversal Reversal doc.
IsReversed IsReversed Reversed?
TaxableEntity TaxableEntity
PostingDate PostingDate Posting Date for GR
DocumentDate DocumentDate Journal Entry Date
TaxReportingDate TaxReportingDate Tax Reporting Date
IsEUTriangularDeal IsEUTriangularDeal Is EU Triangular Deal
DelivOfGoodsDestCountry DelivOfGoodsDestCountry Dest. C/R
DelivOfGoodsOriginCountry DelivOfGoodsOriginCountry
TaxDebitCreditCode TaxDebitCreditCode
ReferenceDocumentType ReferenceDocumentType Reference Document Type
TaxRate TaxRate Tax Rate
SpecialGLTransactionType SpecialGLTransactionType Transact.Type
ConditionType ConditionType Condition type
_BusinessPartner _BusinessPartner

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_StRpTaxItmWithEUTaxClass5.
-- 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: PSRTIEUTAXCLS5

CREATE VIEW P_StRpTaxItmWithEUTaxClass5 AS
SELECT
  CompanyCode,
  AccountingDocument,
  FiscalYear,
  TaxCode,
  TransactionTypeDetermination,
  TaxItem,
  Debtor,
  _kna1.BPCustomerName AS CustomerName,
  Creditor,
  _lfa1.BPSupplierName AS SupplierName,
  VATRegistrationFromBSEG,
  cast(substring(VATRegistrationFromBSEG, 1, 2) as stceg_l) AS VATRegistrationFromBSEGCountry,
  cast (coalesce(_kna1.IsOneTimeAccount, _lfa1.IsOneTimeAccount) as xcpdk) AS IsOneTimeAccount,
  cast (coalesce(_kna1.AuthorizationGroup, _lfa1.AuthorizationGroup) as brgru) AS AuthorizationGroup,
  TaxItemGroup,
  TaxJurisdiction,
  Country,
  AmountInReportingCurrency,
  TaxCountry,
  ReportingCountry,
  TaxReturnCountry,
  ReportingCurrency,
  TaxBaseAmountInCoCodeCrcy,
  TaxBaseAmountInTransCrcy,
  TaxBaseAmountInCountryCrcy,
  CompanyCodeCurrency,
  DocumentCurrency,
  CountryCurrency,
  IsReversal,
  IsReversed,
  TaxableEntity,
  PostingDate,
  DocumentDate,
  TaxReportingDate,
  IsEUTriangularDeal,
  DelivOfGoodsDestCountry,
  DelivOfGoodsOriginCountry,
  TaxDebitCreditCode,
  ReferenceDocumentType,
  TaxRate,
  SpecialGLTransactionType,
  ConditionType
FROM P_StRpTaxItmWithEUTaxClass4
LEFT OUTER JOIN I_Customer_to_BusinessPartner AS _CustomerToBusinessPartner ON Debtor = _CustomerToBusinessPartner.Customer  -- association [0..1]
LEFT OUTER JOIN I_Supplier_to_BusinessPartner AS _SupplierToBusinessPartner ON Creditor = _SupplierToBusinessPartner.Supplier  -- association [0..1]
LEFT OUTER JOIN I_BusinessPartner AS _BusinessPartner ON BusinessPartnerUUID = _BusinessPartner.BusinessPartnerUUID  -- association [0..1]
;