P_APCshDiscUtilization1

DDL: P_APCSHDISCUTILIZATION1 SQL: PFIAPCSHDISUTI1 Type: view COMPOSITE

P_APCshDiscUtilization1 is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (P_APCshDiscDocument2) and exposes 28 fields with key fields CompanyCode, AccountingDocument, FiscalYear, AccountingDocumentItem.

Data Sources (1)

SourceAliasJoin Type
P_APCshDiscDocument2 P_APCshDiscDocument2 from

Parameters (2)

NameTypeDefault
P_KeyDate abap.dats
P_BeforeKeyDateDays abap.int4

Annotations (6)

NameValueLevelField
AbapCatalog.sqlViewName PFIAPCSHDISUTI1 view
VDM.private true view
VDM.viewType #COMPOSITE view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
Metadata.ignorePropagatedAnnotations true view

Fields (28)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode CompanyCode Receiver Company Code
KEY AccountingDocument AccountingDocument Journal Entry
KEY FiscalYear FiscalYear G/L Fiscal Year
KEY AccountingDocumentItem AccountingDocumentItem Posting View Item
FixedCashDiscount FixedCashDiscount Fixed Cash Discount
DueCalculationBaseDate DueCalculationBaseDate Due Calculation Base Date
CashDiscount1Percent CashDiscount1Percent Disc. Percent 1
CashDiscount2Percent CashDiscount2Percent Disc. Percent 2
Supplier Supplier Supplier
ClearingDate ClearingDate Clearing Date
ClearingAccountingDocument ClearingAccountingDocument Clearing Journal Entry
PaymentTerms PaymentTerms Pyt Terms
PaymentBlockingReason PaymentBlockingReason Pmnt block
ClearingDocFiscalYear ClearingDocFiscalYear Fiscal Year of Clearing Journal Entry
CashDiscount1Days CashDiscount1Days Days from Baseline Date for Payment
CashDiscount1Days_char Days from Baseline Date for Payment
CashDiscount2Days CashDiscount2Days Days from Baseline Date for Payment
DocumentDate DocumentDate Journal Entry Date
ValueDate ValueDate Value Date
KeyDate KeyDate Maturity Key Date
TransactionCurrency TransactionCurrency Transaction Currency
AccountingDocumentCreationDate _AccountingDocument AccountingDocumentCreationDate Journal Entry Date
GraceDays GraceDays
ArrearsBaseDate ArrearsBaseDate
_Supplier _Supplier
_CompanyCode _CompanyCode
_AccountingDocument _AccountingDocument
_CustomerPaymentTerms _CustomerPaymentTerms

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_APCshDiscUtilization1.
-- 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: PFIAPCSHDISUTI1
-- Parameters: P_KeyDate : abap.dats, P_BeforeKeyDateDays : abap.int4

CREATE VIEW P_APCshDiscUtilization1 AS
SELECT
  CompanyCode,
  AccountingDocument,
  FiscalYear,
  AccountingDocumentItem,
  FixedCashDiscount,
  DueCalculationBaseDate,
  CashDiscount1Percent,
  CashDiscount2Percent,
  Supplier,
  ClearingDate,
  ClearingAccountingDocument,
  PaymentTerms,
  PaymentBlockingReason,
  ClearingDocFiscalYear,
  CashDiscount1Days,
  cast(CashDiscount1Days as abap.char(20)) AS CashDiscount1Days_char,
  CashDiscount2Days,
  DocumentDate,
  ValueDate,
  KeyDate,
  TransactionCurrency,
  _AccountingDocument.AccountingDocumentCreationDate AS AccountingDocumentCreationDate,
  GraceDays,
  ArrearsBaseDate
FROM P_APCshDiscDocument2
;