P_PE_FISlsEntrWthOriginalDoc

DDL: P_PE_FISLSENTRWTHORIGINALDOC Type: view_entity CONSUMPTION Package: GLO_FIN_IS_PE

Peru Sales Entry from FI with Original Document

P_PE_FISlsEntrWthOriginalDoc is a Consumption CDS View that provides data about "Peru Sales Entry from FI with Original Document" in SAP S/4HANA. It reads from 3 data sources (I_GLAccountLineItemRawData, I_JournalEntry, I_StRpJournalEntryHeaderLog) and exposes 21 fields with key fields CompanyCode, FiscalYear, AccountingDocument, StatryRptCategory, StatryRptgEntity. Part of development package GLO_FIN_IS_PE.

Data Sources (3)

SourceAliasJoin Type
I_GLAccountLineItemRawData GLAccountLineItem inner
I_JournalEntry JournalEntry from
I_StRpJournalEntryHeaderLog StRpLog inner

Annotations (6)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
VDM.private true view
VDM.viewType #CONSUMPTION view

Fields (21)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode I_JournalEntry CompanyCode Receiver Company Code
KEY FiscalYear I_JournalEntry FiscalYear G/L Fiscal Year
KEY AccountingDocument I_JournalEntry AccountingDocument Journal Entry
KEY StatryRptCategory I_StRpJournalEntryHeaderLog StatryRptCategory Report ID
KEY StatryRptgEntity I_StRpJournalEntryHeaderLog StatryRptgEntity Reporting Entity
KEY StatryRptRunID I_StRpJournalEntryHeaderLog StatryRptRunID Report Run ID
KEY Ledger I_GLAccountLineItemRawData SourceLedger Source Ledger
FiscalPeriod I_JournalEntry FiscalPeriod Tax period
DocumentDate I_JournalEntry DocumentDate Journal Entry Date
PostingDate I_JournalEntry PostingDate Posting Date for GR
AccountingDocumentType I_JournalEntry AccountingDocumentType Journal Entry Type
IsReversed I_JournalEntry IsReversed Reversed?
OriginalReferenceDocument I_JournalEntry OriginalReferenceDocument Reference Key
DocumentReferenceID I_JournalEntry DocumentReferenceID Reference
ExchangeRate I_JournalEntry AbsoluteExchangeRate Absolute Exchange Rate
CompanyCodeCurrency I_JournalEntry CompanyCodeCurrency Local Currency
TransactionCurrency I_JournalEntry TransactionCurrency Transaction Currency
Customer I_GLAccountLineItemRawData Customer Sold-to Party
DocumentNetDueDate
PE_OriginalDocumentDate
OriginalDocumentReferenceID

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_PE_FISlsEntrWthOriginalDoc.
-- 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.

CREATE VIEW P_PE_FISlsEntrWthOriginalDoc AS
SELECT
  JournalEntry.CompanyCode AS CompanyCode,
  JournalEntry.FiscalYear AS FiscalYear,
  JournalEntry.AccountingDocument AS AccountingDocument,
  StRpLog.StatryRptCategory AS StatryRptCategory,
  StRpLog.StatryRptgEntity AS StatryRptgEntity,
  StRpLog.StatryRptRunID AS StatryRptRunID,
  GLAccountLineItem.SourceLedger AS Ledger,
  JournalEntry.FiscalPeriod AS FiscalPeriod,
  JournalEntry.DocumentDate AS DocumentDate,
  JournalEntry.PostingDate AS PostingDate,
  JournalEntry.AccountingDocumentType AS AccountingDocumentType,
  JournalEntry.IsReversed AS IsReversed,
  JournalEntry.OriginalReferenceDocument AS OriginalReferenceDocument,
  JournalEntry.DocumentReferenceID AS DocumentReferenceID,
  JournalEntry.AbsoluteExchangeRate AS ExchangeRate,
  JournalEntry.CompanyCodeCurrency AS CompanyCodeCurrency,
  JournalEntry.TransactionCurrency AS TransactionCurrency,
  GLAccountLineItem.Customer AS Customer,
  cast(min(GLAccountLineItem.NetDueDate) as faedt_fpos preserving type) AS DocumentNetDueDate,
  cast( coalesce( InvoiceReference.DocumentDate, OriginalJournalEntry.DocumentDate ) as fipe_original_document_date preserving type) AS PE_OriginalDocumentDate,
  cast( coalesce( InvoiceReference.DocumentReferenceID, OriginalJournalEntry.DocumentReferenceID ) as fis_xblnr1 preserving type ) AS OriginalDocumentReferenceID
FROM I_JournalEntry AS JournalEntry
INNER JOIN I_StRpJournalEntryHeaderLog AS StRpLog ON /* join condition not captured in parsed metadata */
INNER JOIN I_GLAccountLineItemRawData AS GLAccountLineItem ON /* join condition not captured in parsed metadata */
;