P_PT_DocItemCshDisc

DDL: P_PT_DOCITEMCSHDISC SQL: PTDOCITEMCSHDISC Type: view CONSUMPTION Package: GLO_FIN_IS_VAT_PT

Cash Discount Items

P_PT_DocItemCshDisc is a Consumption CDS View that provides data about "Cash Discount Items" in SAP S/4HANA. It reads from 1 data source (P_PT_DocItemPartner) and exposes 28 fields with key fields AccountingDocument, CompanyCode, FiscalYear, AccountingDocumentItem. Part of development package GLO_FIN_IS_VAT_PT.

Data Sources (1)

SourceAliasJoin Type
P_PT_DocItemPartner P_PT_DocItemPartner from

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName PTDOCITEMCSHDISC view
VDM.viewType #CONSUMPTION view
VDM.private true view
AbapCatalog.preserveKey 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 Items view

Fields (28)

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
AmountInReportingCurrency CashDiscountAmtInCoCodeCrcy Discount Amt
CashDiscountAmount CD Amount
CashDiscountAmtInCoCodeCrcy Discount Amt
TransactionCurrency TransactionCurrency Transaction Currency
IsSalesRelated IsSalesRelated Is Sales Related
AccountingDocumentType AccountingDocumentType Journal Entry Type
FinancialAccountType FinancialAccountType Fin. Account Type
CompanyCodeCurrency CompanyCodeCurrency Local Currency
SupplierVATRegistration SupplierVATRegistration VAT Registration No.
CustomerVATRegistration CustomerVATRegistration VAT Registration No.
OneTimeVendor OneTimeVendor One-time acct
OneTimeCustomer OneTimeCustomer One-time acct
VATRegistration VATRegistration VAT Registration No.
VATRegistrationCountry VATRegistrationCountry CtryRgnSlsTxNo.
SupplierVATRegistrationCountry SupplierVATRegistrationCountry
CustomerVATRegistrationCountry CustomerVATRegistrationCountry
ExchangeRate ExchangeRate Exchange rate

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_DocItemCshDisc.
-- 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: PTDOCITEMCSHDISC

CREATE VIEW P_PT_DocItemCshDisc AS
SELECT
  AccountingDocument,
  CompanyCode,
  FiscalYear,
  AccountingDocumentItem,
  PostingDate,
  DocumentDate,
  Customer,
  Supplier,
  DebitCreditCode,
  WithholdingTaxCode,
  BalanceTransactionCurrency,
  CashDiscountAmtInCoCodeCrcy AS AmountInReportingCurrency,
  cast( CashDiscountAmount as wskto_shl ) AS CashDiscountAmount,
  cast( CashDiscountAmtInCoCodeCrcy as sknto_shl ) AS CashDiscountAmtInCoCodeCrcy,
  TransactionCurrency,
  IsSalesRelated,
  AccountingDocumentType,
  FinancialAccountType,
  CompanyCodeCurrency,
  SupplierVATRegistration,
  CustomerVATRegistration,
  OneTimeVendor,
  OneTimeCustomer,
  VATRegistration,
  VATRegistrationCountry,
  SupplierVATRegistrationCountry,
  CustomerVATRegistrationCountry,
  ExchangeRate
FROM P_PT_DocItemPartner
;