P_APCshDiscUtilization8
Account Payable Cash Discount Utilization
P_APCshDiscUtilization8 is a Composite CDS View that provides data about "Account Payable Cash Discount Utilization" in SAP S/4HANA. It reads from 2 data sources (P_APCshDiscUtilization4, P_APCshDiscUtilization7) and exposes 19 fields with key fields CompanyCode, AccountingDocument, FiscalYear, AccountingDocumentItem. It has 1 association to related views. Part of development package FINS_FIS_AP_APPS.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| P_APCshDiscUtilization4 | P_APCshDiscUtilization4 | from |
| P_APCshDiscUtilization7 | P_APCshDiscUtilization7 | left_outer |
Parameters (2)
| Name | Type | Default |
|---|---|---|
| P_KeyDate | abap.dats | |
| P_BeforeKeyDateDays | abap.int4 |
Associations (1)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..1] | I_AccountingDocument | _AccountingDocument | $projection.ClearingAccountingDocument = _AccountingDocument.AccountingDocument and $projection.CompanyCode = _AccountingDocument.CompanyCode and $projection.ClearingDocFiscalYear = _AccountingDocument.FiscalYear |
Annotations (6)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PFIAPCSHDISUTI8 | view | |
| VDM.private | true | view | |
| VDM.viewType | #COMPOSITE | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| Metadata.ignorePropagatedAnnotations | true | view |
Fields (19)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CompanyCode | CompanyCode | Receiver Company Code | |
| KEY | AccountingDocument | AccountingDocument | Journal Entry | |
| KEY | FiscalYear | FiscalYear | G/L Fiscal Year | |
| KEY | AccountingDocumentItem | AccountingDocumentItem | Posting View Item | |
| ClearingAccountingDocument | ClearingAccountingDocument | Clearing Journal Entry | ||
| ClearingDocFiscalYear | ClearingDocFiscalYear | Fiscal Year of Clearing Journal Entry | ||
| Supplier | Supplier | Supplier | ||
| PaymentTerms | PaymentTerms | Pyt Terms | ||
| TransactionCurrency | TransactionCurrency | Transaction Currency | ||
| KeyDate | KeyDate | Maturity Key Date | ||
| TakenCshDiscInTransacCrcy | TakenCshDiscInTransacCrcy | |||
| OfferedCshDiscInTransacCrcy | OfferedCshDiscInTransacCrcy | |||
| AccountingDocumentCreationDate | AccountingDocumentCreationDate | Journal Entry Date | ||
| DocumentDate | DocumentDate | Journal Entry Date | ||
| CashDiscountDuedate | CashDiscountDuedate | |||
| DocumentDateendasPaymentDate | ||||
| _Supplier | _Supplier | |||
| _CompanyCode | _CompanyCode | |||
| _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_APCshDiscUtilization8.
-- 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: PFIAPCSHDISUTI8
-- Parameters: P_KeyDate : abap.dats, P_BeforeKeyDateDays : abap.int4
CREATE VIEW P_APCshDiscUtilization8 AS
SELECT
CompanyCode,
AccountingDocument,
FiscalYear,
AccountingDocumentItem,
ClearingAccountingDocument,
ClearingDocFiscalYear,
Supplier,
PaymentTerms,
TransactionCurrency,
KeyDate,
TakenCshDiscInTransacCrcy,
OfferedCshDiscInTransacCrcy,
AccountingDocumentCreationDate,
DocumentDate,
CashDiscountDuedate,
case when ArrearsBaseDate = '1' then ValueDate else _AccountingDocument.DocumentDate end as PaymentDate AS DocumentDateendasPaymentDate
FROM P_APCshDiscUtilization4
LEFT OUTER JOIN P_APCshDiscUtilization7 ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_AccountingDocument AS _AccountingDocument ON ClearingAccountingDocument = _AccountingDocument.AccountingDocument AND CompanyCode = _AccountingDocument.CompanyCode AND ClearingDocFiscalYear = _AccountingDocument.FiscalYear -- association [1..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