P_APCashDiscount15

DDL: P_APCASHDISCOUNT15 SQL: PFIAPCSHDISC15 Type: view COMPOSITE Package: FINS_FIS_AP_APPS

cash discount 15

P_APCashDiscount15 is a Composite CDS View that provides data about "cash discount 15" in SAP S/4HANA. It reads from 1 data source (P_APCashDiscount14) and exposes 34 fields with key fields CompanyCode, AccountingDocument, FiscalYear, AccountingDocumentItem, Supplier. Part of development package FINS_FIS_AP_APPS.

Data Sources (1)

SourceAliasJoin Type
P_APCashDiscount14 P_APCashDiscount14 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 PFIAPCSHDISC15 view
VDM.private true view
VDM.viewType #COMPOSITE view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
Metadata.ignorePropagatedAnnotations true view

Fields (34)

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
KEY Supplier Supplier Supplier
PaymentDate PaymentDate Payment Date
NextPaymentDate NextPaymentDate
IsLastPaymentDate IsLastPaymentDate
PaymentBlockingReason PaymentBlockingReason Pmnt block
PaymentTerms PaymentTerms Pyt Terms
FixedCashDiscount FixedCashDiscount Fixed Cash Discount
DueCalculationBaseDate DueCalculationBaseDate Due Calculation Base Date
CashDiscount1Days CashDiscount1Days Days from Baseline Date for Payment
CashDiscount2Days CashDiscount2Days Days from Baseline Date for Payment
NetPaymentDays NetPaymentDays Net Pmt Terms Period
Term1Days Term1Days
Term2Days Term2Days
CashDiscount1InDspCrcy_E CashDiscount1InDspCrcy_E
CashDiscount2InDspCrcy_E CashDiscount2InDspCrcy_E
ExpiringCashDiscountAmountOrg ExpiringCashDiscountAmountOrg
InvAmtWithExpiringCshDiscOrg InvAmtWithExpiringCshDiscOrg
AvaiCshDiscAmtOnKeyDateOrg AvaiCshDiscAmtOnKeyDateOrg
ExpiredCshDiscAmtOnKeyDateOrg ExpiredCshDiscAmtOnKeyDateOrg
GrossAmountInDisplayCrcy_E GrossAmountInDisplayCrcy_E
Currency Currency Valuation Crcy
KeyDate KeyDate Maturity Key Date
NetDueDate NetDueDate Net Due Date
CashDiscount1DueDate CashDiscount1DueDate Cash Discount 1
CashDiscount2DueDate CashDiscount2DueDate Cash Discount 2
InvoiceAmtWithExpiringCshDisc InvoiceAmtWithExpiringCshDisc
AvailableCshDiscAmtOnKeyDate AvailableCshDiscAmtOnKeyDate
ExpiredCshDiscAmtOnKeyDate ExpiredCshDiscAmtOnKeyDate
DaysBetweenBasePay DaysBetweenBasePay
DaysBetweenBaseNextPay DaysBetweenBaseNextPay

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_APCashDiscount15.
-- 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: PFIAPCSHDISC15
-- 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_APCashDiscount15 AS
SELECT
  CompanyCode,
  AccountingDocument,
  FiscalYear,
  AccountingDocumentItem,
  Supplier,
  PaymentDate,
  NextPaymentDate,
  IsLastPaymentDate,
  PaymentBlockingReason,
  PaymentTerms,
  FixedCashDiscount,
  DueCalculationBaseDate,
  CashDiscount1Days,
  CashDiscount2Days,
  NetPaymentDays,
  Term1Days,
  Term2Days,
  CashDiscount1InDspCrcy_E,
  CashDiscount2InDspCrcy_E,
  ExpiringCashDiscountAmountOrg,
  InvAmtWithExpiringCshDiscOrg,
  AvaiCshDiscAmtOnKeyDateOrg,
  ExpiredCshDiscAmtOnKeyDateOrg,
  GrossAmountInDisplayCrcy_E,
  Currency,
  KeyDate,
  NetDueDate,
  CashDiscount1DueDate,
  CashDiscount2DueDate,
  InvoiceAmtWithExpiringCshDisc,
  AvailableCshDiscAmtOnKeyDate,
  ExpiredCshDiscAmtOnKeyDate,
  DaysBetweenBasePay,
  DaysBetweenBaseNextPay
FROM P_APCashDiscount14
;