P_ClearedItem2

DDL: P_CLEAREDITEM2 SQL: PCLRDITM2 Type: view CONSUMPTION

P_ClearedItem2 is a Consumption CDS View in SAP S/4HANA. It reads from 2 data sources (P_ClearedItem1, I_JournalEntry) and exposes 25 fields with key fields CompanyCode, FiscalYear, AccountingDocument, AccountingDocumentItem, FinancialAccountType.

Data Sources (2)

SourceAliasJoin Type
P_ClearedItem1 CleardItem inner
I_JournalEntry I_JournalEntry from

Annotations (6)

NameValueLevelField
AbapCatalog.sqlViewName PCLRDITM2 view
AbapCatalog.compiler.compareFilter true view
VDM.viewType #CONSUMPTION view
VDM.private true view
AccessControl.authorizationCheck #NOT_ALLOWED view
ClientHandling.algorithm #SESSION_VARIABLE view

Fields (25)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode P_ClearedItem1 CompanyCode Receiver Company Code
KEY FiscalYear P_ClearedItem1 FiscalYear G/L Fiscal Year
KEY AccountingDocument P_ClearedItem1 AccountingDocument Journal Entry
KEY AccountingDocumentItem P_ClearedItem1 AccountingDocumentItem Posting View Item
KEY FinancialAccountType P_ClearedItem1 FinancialAccountType Fin. Account Type
ClearingJournalEntry P_ClearedItem1 ClearingJournalEntry Clrng doc.
ClearingJournalEntryFiscalYear P_ClearedItem1 ClearingJournalEntryFiscalYear Fiscal Year of Clearing Journal Entry
AccountingDocumentType P_ClearedItem1 AccountingDocumentType Journal Entry Type
AccountingDocumentCategory P_ClearedItem1 AccountingDocumentCategory Journal Entry Category
AssignmentReference P_ClearedItem1 AssignmentReference Assignment Reference
CompanyCodeCurrency P_ClearedItem1 CompanyCodeCurrency Local Currency
DocumentDate P_ClearedItem1 DocumentDate Journal Entry Date
DocumentItemText P_ClearedItem1 DocumentItemText Text
InvoiceReference P_ClearedItem1 InvoiceReference Invoice Reference
FollowOnDocumentType P_ClearedItem1 FollowOnDocumentType Follow-On Document Type
PostingDate P_ClearedItem1 PostingDate Posting Date for GR
SpecialGLCode P_ClearedItem1 SpecialGLCode Special G/L Ind
Account P_ClearedItem1 Account Std. Account
PaymentCardItem P_ClearedItem1 PaymentCardItem Payment Card Item
AmountInCompanyCodeCurrency Local Crcy Amt
CashDiscountAmtInCoCodeCrcy Discount Amt
AmountInAdditionalCurrency1 P_ClearedItem1 AmountInAdditionalCurrency1 Amount in Additional Currency 1
AmountInAdditionalCurrency2 P_ClearedItem1 AmountInAdditionalCurrency2 LC2 Amount
IntercompanyTransaction I_JournalEntry IntercompanyTransaction Intercompany Transaction
TransactionCode I_JournalEntry TransactionCode Transaction Code

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_ClearedItem2.
-- 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: PCLRDITM2

CREATE VIEW P_ClearedItem2 AS
SELECT
  CleardItem.CompanyCode AS CompanyCode,
  CleardItem.FiscalYear AS FiscalYear,
  CleardItem.AccountingDocument AS AccountingDocument,
  CleardItem.AccountingDocumentItem AS AccountingDocumentItem,
  CleardItem.FinancialAccountType AS FinancialAccountType,
  CleardItem.ClearingJournalEntry AS ClearingJournalEntry,
  CleardItem.ClearingJournalEntryFiscalYear AS ClearingJournalEntryFiscalYear,
  CleardItem.AccountingDocumentType AS AccountingDocumentType,
  CleardItem.AccountingDocumentCategory AS AccountingDocumentCategory,
  CleardItem.AssignmentReference AS AssignmentReference,
  CleardItem.CompanyCodeCurrency AS CompanyCodeCurrency,
  CleardItem.DocumentDate AS DocumentDate,
  CleardItem.DocumentItemText AS DocumentItemText,
  CleardItem.InvoiceReference AS InvoiceReference,
  CleardItem.FollowOnDocumentType AS FollowOnDocumentType,
  CleardItem.PostingDate AS PostingDate,
  CleardItem.SpecialGLCode AS SpecialGLCode,
  CleardItem.Account AS Account,
  CleardItem.PaymentCardItem AS PaymentCardItem,
  cast( AmountInCompanyCodeCurrency as dmshb_farp ) AS AmountInCompanyCodeCurrency,
  cast( CashDiscountAmtInCoCodeCrcy as sknto_farp ) AS CashDiscountAmtInCoCodeCrcy,
  CleardItem.AmountInAdditionalCurrency1 AS AmountInAdditionalCurrency1,
  CleardItem.AmountInAdditionalCurrency2 AS AmountInAdditionalCurrency2,
  I_JournalEntry.IntercompanyTransaction AS IntercompanyTransaction,
  I_JournalEntry.TransactionCode AS TransactionCode
FROM I_JournalEntry
INNER JOIN P_ClearedItem1 AS CleardItem ON /* join condition not captured in parsed metadata */
;