I_APCashDiscount

DDL: I_APCASHDISCOUNT SQL: IFIAPCSHDISC Type: view COMPOSITE Package: FINS_FIS_AP_APPS

Cash Discount Forecast

I_APCashDiscount is a Composite CDS View (Cube) that provides data about "Cash Discount Forecast" in SAP S/4HANA. It reads from 1 data source (P_APCashDiscount17) and exposes 17 fields with key fields CompanyCode, Supplier, PaymentDate, PaymentBlockingReason, PaymentTerms. It has 6 associations to related views. Part of development package FINS_FIS_AP_APPS.

Data Sources (1)

SourceAliasJoin Type
P_APCashDiscount17 P_APCashDiscount17 from

Parameters (8)

NameTypeDefault
P_DisplayCurrency vdm_v_display_currency
P_KeyDate sydate
P_CashDiscountForecastDays farp_forecast_days
P_PaymentCycle farp_payment_cycle
P_PaymentDay1 farp_payment_day1
P_PaymentDay2 farp_payment_day2
P_PaymentDay3 farp_payment_day3
P_Language sylangu

Associations (6)

CardinalityTargetAliasCondition
[0..1] I_CompanyCode _CompanyCode $projection.CompanyCode = _CompanyCode.CompanyCode
[0..1] I_Supplier _Supplier $projection.Supplier = _Supplier.Supplier
[0..1] I_Currency _DisplayCurrency $projection.DisplayCurrency = _DisplayCurrency.Currency
[0..1] C_CshDiscFcstPaymentTerms _PaymentTerms $projection.PaymentTerms = _PaymentTerms.PaymentTerms
[0..1] I_PaymentBlockingReason _PaymentBlockingReason $projection.PaymentBlockingReason = _PaymentBlockingReason.PaymentBlockingReason
[0..1] I_SupplierCompany _SupplierCompany $projection.Supplier = _SupplierCompany.Supplier and $projection.CompanyCode = _SupplierCompany.CompanyCode

Annotations (13)

NameValueLevelField
AbapCatalog.sqlViewName IFIAPCSHDISC view
AbapCatalog.compiler.compareFilter true view
EndUserText.label Cash Discount Forecast view
VDM.viewType #COMPOSITE view
Analytics.dataCategory #CUBE view
AccessControl.authorizationCheck #CHECK view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.dataClass #MIXED view
Metadata.ignorePropagatedAnnotations true view
AccessControl.personalData.blocking #REQUIRED view
Metadata.allowExtensions true view

Fields (17)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode CompanyCode Receiver Company Code
KEY Supplier Supplier Supplier
KEY PaymentDate Payment Date
KEY PaymentBlockingReason PaymentBlockingReason Pmnt block
KEY PaymentTerms PaymentTerms Pyt Terms
KEY TransactionCurrency Currency Valuation Crcy
DisplayCurrency DisplayCurrency Display Currency
SupplierBasicAuthorizationGrp _Supplier AuthorizationGroup AuthorizGroup
SupplierFinsAuthorizationGrp _SupplierCompany AuthorizationGroup AuthorizGroup
ExpiringCshDiscInDspCrcy_E
AvailableCshDiscInDspCrcy_E
ExpiredCshDiscInDspCrcy_E
_DisplayCurrency _DisplayCurrency
_PaymentTerms _PaymentTerms
_PaymentBlockingReason _PaymentBlockingReason
_Supplier _Supplier
_CompanyCode _CompanyCode

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 I_APCashDiscount.
-- 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: IFIAPCSHDISC
-- Parameters: P_DisplayCurrency : vdm_v_display_currency, P_KeyDate : sydate, P_CashDiscountForecastDays : farp_forecast_days, P_PaymentCycle : farp_payment_cycle, P_PaymentDay1 : farp_payment_day1, P_PaymentDay2 : farp_payment_day2, P_PaymentDay3 : farp_payment_day3, P_Language : sylangu

CREATE VIEW I_APCashDiscount AS
SELECT
  CompanyCode,
  Supplier,
  cast(PaymentDate as farp_payment_date) AS PaymentDate,
  PaymentBlockingReason,
  PaymentTerms,
  Currency AS TransactionCurrency,
  DisplayCurrency,
  _Supplier.AuthorizationGroup AS SupplierBasicAuthorizationGrp,
  _SupplierCompany.AuthorizationGroup AS SupplierFinsAuthorizationGrp,
  cast(ExpiringCshDiscInDspCrcy_E as farp_expiring_cash_discounts) AS ExpiringCshDiscInDspCrcy_E,
  cast(AvailableCshDiscInDspCrcy_E as farp_available_disc_on_keydate) AS AvailableCshDiscInDspCrcy_E,
  cast(ExpiredCshDiscInDspCrcy_E as farp_expired_disc_before_keyda) AS ExpiredCshDiscInDspCrcy_E
FROM P_APCashDiscount17
LEFT OUTER JOIN I_CompanyCode AS _CompanyCode ON CompanyCode = _CompanyCode.CompanyCode  -- association [0..1]
LEFT OUTER JOIN I_Supplier AS _Supplier ON Supplier = _Supplier.Supplier  -- association [0..1]
LEFT OUTER JOIN I_Currency AS _DisplayCurrency ON DisplayCurrency = _DisplayCurrency.Currency  -- association [0..1]
LEFT OUTER JOIN C_CshDiscFcstPaymentTerms AS _PaymentTerms ON PaymentTerms = _PaymentTerms.PaymentTerms  -- association [0..1]
LEFT OUTER JOIN I_PaymentBlockingReason AS _PaymentBlockingReason ON PaymentBlockingReason = _PaymentBlockingReason.PaymentBlockingReason  -- association [0..1]
LEFT OUTER JOIN I_SupplierCompany AS _SupplierCompany ON Supplier = _SupplierCompany.Supplier AND CompanyCode = _SupplierCompany.CompanyCode  -- association [0..1]
;