P_ClearingDocument
P_ClearingDocument is a Consumption CDS View in SAP S/4HANA. It reads from 2 data sources (P_ClearedItem1, I_JournalEntry) and exposes 15 fields with key fields CompanyCode, ClearingJournalEntry, ClearingJournalEntryFiscalYear. It has 1 association to related views.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| P_ClearedItem1 | ClrdItm | inner |
| I_JournalEntry | I_JournalEntry | from |
Associations (1)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | P_ClearedItemCorrespondenceCnt | _CorrespondenceCnt | $projection.CompanyCode = _CorrespondenceCnt.CompanyCode and $projection.ClearingJournalEntry = _CorrespondenceCnt.ClearingJournalEntry and $projection.ClearingJournalEntryFiscalYear = _CorrespondenceCnt.ClearingJournalEntryFiscalYear |
Annotations (7)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PCLRGDOC | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| VDM.viewType | #CONSUMPTION | view | |
| VDM.private | true | view | |
| AccessControl.authorizationCheck | #NOT_ALLOWED | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| Metadata.ignorePropagatedAnnotations | true | view |
Fields (15)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CompanyCode | I_JournalEntry | CompanyCode | Receiver Company Code |
| KEY | ClearingJournalEntry | |||
| KEY | ClearingJournalEntryFiscalYear | |||
| AccountingDocumentType | I_JournalEntry | AccountingDocumentType | Journal Entry Type | |
| AuthorizationGroup | ||||
| IntercompanyTransaction | I_JournalEntry | IntercompanyTransaction | Intercompany Transaction | |
| DocumentDate | I_JournalEntry | DocumentDate | Journal Entry Date | |
| PostingDate | I_JournalEntry | PostingDate | Posting Date for GR | |
| ClearingFiscalPeriod | ||||
| ClearingCreationDate | ||||
| AccountingDocCreatedByUser | I_JournalEntry | AccountingDocCreatedByUser | User which created overhead document | |
| CompanyCodeCurrency | I_JournalEntry | CompanyCodeCurrency | Local Currency | |
| AccountingDocumentCategory | I_JournalEntry | AccountingDocumentCategory | Journal Entry Category | |
| _CompanyCode | I_JournalEntry | _CompanyCode | ||
| _CorrespondenceCnt | _CorrespondenceCnt |
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_ClearingDocument.
-- 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: PCLRGDOC
CREATE VIEW P_ClearingDocument AS
SELECT
I_JournalEntry.CompanyCode AS CompanyCode,
cast(I_JournalEntry.AccountingDocument as fis_augbl preserving type) AS ClearingJournalEntry,
cast(I_JournalEntry.FiscalYear as fis_auggj_no_conv preserving type) AS ClearingJournalEntryFiscalYear,
I_JournalEntry.AccountingDocumentType AS AccountingDocumentType,
I_JournalEntry._AccountingDocumentType.AuthorizationGroup AS AuthorizationGroup,
I_JournalEntry.IntercompanyTransaction AS IntercompanyTransaction,
I_JournalEntry.DocumentDate AS DocumentDate,
I_JournalEntry.PostingDate AS PostingDate,
cast(I_JournalEntry.FiscalPeriod as fis_augperiod) AS ClearingFiscalPeriod,
cast(I_JournalEntry.AccountingDocumentCreationDate as fis_augcp) AS ClearingCreationDate,
I_JournalEntry.AccountingDocCreatedByUser AS AccountingDocCreatedByUser,
I_JournalEntry.CompanyCodeCurrency AS CompanyCodeCurrency,
I_JournalEntry.AccountingDocumentCategory AS AccountingDocumentCategory,
I_JournalEntry._CompanyCode AS _CompanyCode
FROM I_JournalEntry
INNER JOIN P_ClearedItem1 AS ClrdItm ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN P_ClearedItemCorrespondenceCnt AS _CorrespondenceCnt ON CompanyCode = _CorrespondenceCnt.CompanyCode AND ClearingJournalEntry = _CorrespondenceCnt.ClearingJournalEntry AND ClearingJournalEntryFiscalYear = _CorrespondenceCnt.ClearingJournalEntryFiscalYear -- 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