P_PT_DocItemWhldgTxCshDisc

DDL: P_PT_DOCITEMWHLDGTXCSHDISC SQL: PTDOCITEMWTCD Type: view CONSUMPTION Package: GLO_FIN_IS_VAT_PT

Cash Discount and WithHolding Tax items union

P_PT_DocItemWhldgTxCshDisc is a Consumption CDS View that provides data about "Cash Discount and WithHolding Tax items union" in SAP S/4HANA. It reads from 1 data source (P_PT_DocItemWhldgTx) and exposes 23 fields with key fields AccountingDocument, CompanyCode, FiscalYear, AccountingDocumentItem. Part of development package GLO_FIN_IS_VAT_PT.

Data Sources (1)

SourceAliasJoin Type
P_PT_DocItemWhldgTx P_PT_DocItemWhldgTx from

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName PTDOCITEMWTCD view
VDM.viewType #CONSUMPTION view
VDM.private true view
ClientHandling.type #INHERITED view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.serviceQuality #X view
AbapCatalog.compiler.compareFilter true view
EndUserText.label Cash Discount and WithHolding Tax items union view

Fields (23)

KeyFieldSource TableSource FieldDescription
KEY AccountingDocument AccountingDocument Journal Entry
KEY CompanyCode CompanyCode Receiver Company Code
KEY FiscalYear FiscalYear G/L Fiscal Year
KEY AccountingDocumentItem AccountingDocumentItem Posting View Item
PostingDate PostingDate Posting Date for GR
DocumentDate DocumentDate Journal Entry Date
Customer Customer Sold-to Party
Supplier Supplier Supplier
DebitCreditCode DebitCreditCode Single-Character Flag
WithholdingTaxCode WithholdingTaxCode WTax Code
BalanceTransactionCurrency BalanceTransactionCurrency Currency
AccountingDocumentType AccountingDocumentType Journal Entry Type
WithholdingTaxAmount Withholding Tax Amt
CashDiscountAmount CashDiscountAmount CD Amount
CashDiscountAmtInCoCodeCrcy CashDiscountAmtInCoCodeCrcy Discount Amt
TransactionCurrency TransactionCurrency Transaction Currency
IsSalesRelated IsSalesRelated Is Sales Related
AmountInCompanyCodeCurrency Local Crcy Amt
FinancialAccountType FinancialAccountType Fin. Account Type
AmountInReportingCurrency
ReportingVATRegistration ReportingVATRegistration Reporting VAT Number
CompanyCodeCurrency CompanyCodeCurrency Local Currency
VATRegistrationCountry

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_PT_DocItemWhldgTxCshDisc.
-- 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: PTDOCITEMWTCD

CREATE VIEW P_PT_DocItemWhldgTxCshDisc AS
SELECT
  AccountingDocument,
  CompanyCode,
  FiscalYear,
  AccountingDocumentItem,
  PostingDate,
  DocumentDate,
  Customer,
  Supplier,
  DebitCreditCode,
  WithholdingTaxCode,
  BalanceTransactionCurrency,
  AccountingDocumentType,
  cast(WithholdingTaxAmount as qbshb_shl) AS WithholdingTaxAmount,
  CashDiscountAmount,
  CashDiscountAmtInCoCodeCrcy,
  TransactionCurrency,
  IsSalesRelated,
  cast(AmountInCompanyCodeCurrency as fis_hsl) AS AmountInCompanyCodeCurrency,
  FinancialAccountType,
  cast( (AmountInCompanyCodeCurrency + CashDiscountAmtInCoCodeCrcy + WithholdingTaxAmount) as glo_amount_rptg_crcy ) AS AmountInReportingCurrency,
  ReportingVATRegistration,
  CompanyCodeCurrency,
  left(ReportingVATRegistration, 2) AS VATRegistrationCountry
FROM P_PT_DocItemWhldgTx
;