P_US_StRpAlternativePayee

DDL: P_US_STRPALTERNATIVEPAYEE SQL: PALTPAYEE Type: view COMPOSITE

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

Data Sources (1)

SourceAliasJoin Type
P_US_StRpWhldgTaxItemDoc wht from

Associations (2)

CardinalityTargetAliasCondition
[0..1] I_SupplierToBusinessPartner _bpsupplier _bpsupplier.Supplier = wht.AlternativePayee
[0..1] I_CustomerToBusinessPartner _bpcustomer _bpcustomer.Customer = wht.AlternativePayer

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName PALTPAYEE view
VDM.viewType #COMPOSITE view
VDM.private true view
ClientHandling.algorithm #SESSION_VARIABLE view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ObjectModel.usageType.serviceQuality #P view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
AccessControl.personalData.blocking #BLOCKED_DATA_INCLUDED view

Fields (44)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode P_US_StRpWhldgTaxItemDoc CompanyCode Receiver Company Code
KEY AccountingDocument P_US_StRpWhldgTaxItemDoc AccountingDocument Journal Entry
KEY FiscalYear P_US_StRpWhldgTaxItemDoc FiscalYear G/L Fiscal Year
KEY WithholdingTaxType P_US_StRpWhldgTaxItemDoc WithholdingTaxType WTax Type
KEY AccountingDocumentItem P_US_StRpWhldgTaxItemDoc AccountingDocumentItem Posting View Item
BPRgn P_US_StRpWhldgTaxItemDoc BPRgn
BusinessPartner P_US_StRpWhldgTaxItemDoc BusinessPartner Issuing Authority
AlternativePayeeAccountNumber
AlternativePayerAccount
AlternativePayee P_US_StRpWhldgTaxItemDoc AlternativePayee Alternat.payee
AlternativePayer P_US_StRpWhldgTaxItemDoc AlternativePayer
WithholdingTaxCode P_US_StRpWhldgTaxItemDoc WithholdingTaxCode WTax Code
OfficialWhldgTaxCode P_US_StRpWhldgTaxItemDoc OfficialWhldgTaxCode
WhldgTaxReferenceText P_US_StRpWhldgTaxItemDoc WhldgTaxReferenceText
PostingDate P_US_StRpWhldgTaxItemDoc PostingDate Posting Date for GR
DocumentDate P_US_StRpWhldgTaxItemDoc DocumentDate Journal Entry Date
ClearingDate P_US_StRpWhldgTaxItemDoc ClearingDate Clearing Date
ReportingDate P_US_StRpWhldgTaxItemDoc ReportingDate
BusinessPartnerNumber P_US_StRpWhldgTaxItemDoc BusinessPartnerNumber
BusinessPartnerCountry P_US_StRpWhldgTaxItemDoc BusinessPartnerCountry BP Ctry/Reg.
TaxNumber1 P_US_StRpWhldgTaxItemDoc TaxNumber1 VAT Reg. No.
TaxNumber2 P_US_StRpWhldgTaxItemDoc TaxNumber2 Tax Number 2
TaxNumber1endasbptaxnumber
AddressID P_US_StRpWhldgTaxItemDoc AddressID Ship-to address
Partner P_US_StRpWhldgTaxItemDoc Partner With Partner
BusinessPlace P_US_StRpWhldgTaxItemDoc BusinessPlace Business place
FinancialAccountType P_US_StRpWhldgTaxItemDoc FinancialAccountType Fin. Account Type
AccountingDocumentType P_US_StRpWhldgTaxItemDoc AccountingDocumentType Journal Entry Type
WhldgTaxDocumentType P_US_StRpWhldgTaxItemDoc WhldgTaxDocumentType 3-Byte field
ClearingJournalEntry P_US_StRpWhldgTaxItemDoc ClearingJournalEntry Clrng doc.
IsReversed P_US_StRpWhldgTaxItemDoc IsReversed Reversed?
IsReversal P_US_StRpWhldgTaxItemDoc IsReversal Reversal doc.
Creditor P_US_StRpWhldgTaxItemDoc Creditor Supplier
ReportingCurrency P_US_StRpWhldgTaxItemDoc ReportingCurrency Currency
Debtor P_US_StRpWhldgTaxItemDoc Debtor Debtor
WhldgTaxBaseAmtInCoCodeCrcy P_US_StRpWhldgTaxItemDoc WhldgTaxBaseAmtInCoCodeCrcy
WhldgTaxAmtInCoCodeCrcy P_US_StRpWhldgTaxItemDoc WhldgTaxAmtInCoCodeCrcy
CashDiscountAmtInCoCodeCrcy P_US_StRpWhldgTaxItemDoc CashDiscountAmtInCoCodeCrcy Discount Amt
WhldgTaxExmptAmtInCoCodeCrcy P_US_StRpWhldgTaxItemDoc WhldgTaxExmptAmtInCoCodeCrcy
IsOnetimeAccount P_US_StRpWhldgTaxItemDoc IsOnetimeAccount One-time acct
SpecialGLTransactionType P_US_StRpWhldgTaxItemDoc SpecialGLTransactionType Transact.Type
SpecialGLCode P_US_StRpWhldgTaxItemDoc SpecialGLCode Special G/L Ind
_AltCustomer P_US_StRpWhldgTaxItemDoc _AltCustomer
_AltSupplier P_US_StRpWhldgTaxItemDoc _AltSupplier

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_US_StRpAlternativePayee.
-- 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: PALTPAYEE

CREATE VIEW P_US_StRpAlternativePayee AS
SELECT
  wht.CompanyCode AS CompanyCode,
  wht.AccountingDocument AS AccountingDocument,
  wht.FiscalYear AS FiscalYear,
  wht.WithholdingTaxType AS WithholdingTaxType,
  wht.AccountingDocumentItem AS AccountingDocumentItem,
  wht.BPRgn AS BPRgn,
  wht.BusinessPartner AS BusinessPartner,
  _bpsupplier._BusinessPartner.BusinessPartner AS AlternativePayeeAccountNumber,
  _bpcustomer._BusinessPartner.BusinessPartner AS AlternativePayerAccount,
  wht.AlternativePayee AS AlternativePayee,
  wht.AlternativePayer AS AlternativePayer,
  wht.WithholdingTaxCode AS WithholdingTaxCode,
  wht.OfficialWhldgTaxCode AS OfficialWhldgTaxCode,
  wht.WhldgTaxReferenceText AS WhldgTaxReferenceText,
  wht.PostingDate AS PostingDate,
  wht.DocumentDate AS DocumentDate,
  wht.ClearingDate AS ClearingDate,
  wht.ReportingDate AS ReportingDate,
  wht.BusinessPartnerNumber AS BusinessPartnerNumber,
  wht.BusinessPartnerCountry AS BusinessPartnerCountry,
  wht.TaxNumber1 AS TaxNumber1,
  wht.TaxNumber2 AS TaxNumber2,
  case when wht.TaxNumber1 is null or wht.TaxNumber1 = '' then wht.TaxNumber2 else wht.TaxNumber1 end as bptaxnumber AS TaxNumber1endasbptaxnumber,
  wht.AddressID AS AddressID,
  wht.Partner AS Partner,
  wht.BusinessPlace AS BusinessPlace,
  wht.FinancialAccountType AS FinancialAccountType,
  wht.AccountingDocumentType AS AccountingDocumentType,
  wht.WhldgTaxDocumentType AS WhldgTaxDocumentType,
  wht.ClearingJournalEntry AS ClearingJournalEntry,
  wht.IsReversed AS IsReversed,
  wht.IsReversal AS IsReversal,
  wht.Creditor AS Creditor,
  wht.ReportingCurrency AS ReportingCurrency,
  wht.Debtor AS Debtor,
  wht.WhldgTaxBaseAmtInCoCodeCrcy AS WhldgTaxBaseAmtInCoCodeCrcy,
  wht.WhldgTaxAmtInCoCodeCrcy AS WhldgTaxAmtInCoCodeCrcy,
  wht.CashDiscountAmtInCoCodeCrcy AS CashDiscountAmtInCoCodeCrcy,
  wht.WhldgTaxExmptAmtInCoCodeCrcy AS WhldgTaxExmptAmtInCoCodeCrcy,
  wht.IsOnetimeAccount AS IsOnetimeAccount,
  wht.SpecialGLTransactionType AS SpecialGLTransactionType,
  wht.SpecialGLCode AS SpecialGLCode,
  wht._AltCustomer AS _AltCustomer,
  wht._AltSupplier AS _AltSupplier
FROM P_US_StRpWhldgTaxItemDoc AS wht
LEFT OUTER JOIN I_SupplierToBusinessPartner AS _bpsupplier ON _bpsupplier.Supplier = wht.AlternativePayee  -- association [0..1]
LEFT OUTER JOIN I_CustomerToBusinessPartner AS _bpcustomer ON _bpcustomer.Customer = wht.AlternativePayer  -- association [0..1]
;