I_APCashDiscount
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.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| P_APCashDiscount17 | P_APCashDiscount17 | from |
Parameters (8)
| Name | Type | Default |
|---|---|---|
| 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)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [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 (14)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | IFIAPCSHDISC | view | |
| AbapCatalog.preserveKey | true | 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)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| 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]
;
Learn More
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- S/4HANA CDS View Deprecation: What You Need to Know
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA