P_APCashDiscount16

DDL: P_APCASHDISCOUNT16 SQL: PFIAPCSHDISC16 Type: view COMPOSITE Package: FINS_FIS_AP_APPS

Cash Discount Utilization

P_APCashDiscount16 is a Composite CDS View that provides data about "Cash Discount Utilization" in SAP S/4HANA. It reads from 1 data source (P_APCashDiscountA5) and exposes 9 fields with key fields CompanyCode, Supplier. Part of development package FINS_FIS_AP_APPS.

Data Sources (1)

SourceAliasJoin Type
P_APCashDiscountA5 P_APCashDiscountA5 from

Parameters (7)

NameTypeDefault
P_KeyDate abap.char(8)
P_CashDiscountForecastDays abap.int4
P_PaymentCycle abap.int4
P_PaymentDay1 abap.int4
P_PaymentDay2 abap.int4
P_PaymentDay3 abap.int4
P_Lang abap.lang

Annotations (6)

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

Fields (9)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode CompanyCode Receiver Company Code
KEY Supplier Supplier Supplier
PaymentDate PaymentDate Payment Date
PaymentBlockingReason PaymentBlockingReason Pmnt block
PaymentTerms PaymentTerms Pyt Terms
Currency Currency Valuation Crcy
ExpiringCashDiscountAmount
AvailableCshDiscAmtOnKeyDate
ExpiredCshDiscAmtOnKeyDate

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_APCashDiscount16.
-- 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: PFIAPCSHDISC16
-- Parameters: P_KeyDate : abap.char(8), P_CashDiscountForecastDays : abap.int4, P_PaymentCycle : abap.int4, P_PaymentDay1 : abap.int4, P_PaymentDay2 : abap.int4, P_PaymentDay3 : abap.int4, P_Lang : abap.lang

CREATE VIEW P_APCashDiscount16 AS
SELECT
  CompanyCode,
  Supplier,
  PaymentDate,
  PaymentBlockingReason,
  PaymentTerms,
  Currency,
  sum(ExpiringCashDiscountAmount) AS ExpiringCashDiscountAmount,
  sum(AvailableCshDiscAmtOnKeyDate) AS AvailableCshDiscAmtOnKeyDate,
  sum(ExpiredCshDiscAmtOnKeyDate) AS ExpiredCshDiscAmtOnKeyDate
FROM P_APCashDiscountA5
;