P_UpdatedOpenItem

DDL: P_UPDATEDOPENITEM SQL: PAGRIUU Type: view CONSUMPTION

P_UpdatedOpenItem is a Consumption CDS View in SAP S/4HANA. It reads from 4 data sources (I_ChangeDocument, I_ChangeDocumentItem, I_AccountingDocument, P_ResItemSession) and exposes 35 fields with key fields CompanyCode, FiscalYear, AccountingDocument, AccountingDocumentItem.

Data Sources (4)

SourceAliasJoin Type
I_ChangeDocument ChangeDocument inner
I_ChangeDocumentItem ChangeDocumentItem inner
I_AccountingDocument Header inner
P_ResItemSession Session inner

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName PAGRIUU view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #MANDATORY view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.representativeKey AccountingDocumentItem view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #D view
VDM.viewType #CONSUMPTION view
VDM.private true view

Fields (35)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode Item CompanyCode Receiver Company Code
KEY FiscalYear Item FiscalYear G/L Fiscal Year
KEY AccountingDocument Item AccountingDocument Journal Entry
KEY AccountingDocumentItem Item AccountingDocumentItem Posting View Item
AssignmentReference Item AssignmentReference Assignment Reference
AccountingDocumentHeaderText I_AccountingDocument AccountingDocumentHeaderText Doc.Header Text
DocumentItemText Item DocumentItemText Text
PaymentDifferenceReason Item PaymentDifferenceReason Reason Code
CreationDate I_AccountingDocument AccountingDocumentCreationDate Journal Entry Date
CreationTime I_AccountingDocument CreationTime Time of Change
LastChangeDate I_AccountingDocument LastChangeDate Time Stamp
ChangeDocCreationDate I_ChangeDocument CreationDate Time Stamp
ChangeDocumentCreationTime I_ChangeDocument CreationTime Time of Change
PostingDate Item PostingDate Posting Date for GR
DocumentDate Item DocumentDate Journal Entry Date
NetDueDate Item NetDueDate Net Due Date
DebitCreditCode Item DebitCreditCode Single-Character Flag
CashDiscountBaseAmount Item CashDiscountBaseAmount Cash Dscnt Base Amt
CashDiscountAmount Item CashDiscountAmount CD Amount
PaymentTerms Item PaymentTerms Pyt Terms
CashDiscount1Days Item CashDiscount1Days Days from Baseline Date for Payment
CashDiscount2Days Item CashDiscount2Days Days from Baseline Date for Payment
NetPaymentDays Item NetPaymentDays Net Pmt Terms Period
CashDiscount1Percent Item CashDiscount1Percent Disc. Percent 1
CashDiscount2Percent Item CashDiscount2Percent Disc. Percent 2
DueCalculationBaseDate Item DueCalculationBaseDate Due Calculation Base Date
FixedCashDiscount Item FixedCashDiscount Fixed Cash Discount
PaymentBlockingReason Item PaymentBlockingReason Pmnt block
TransactionCurrency Item TransactionCurrency Transaction Currency
CompanyCodeCurrency Item CompanyCodeCurrency Local Currency
AmountInCompanyCodeCurrency Item AmountInCompanyCodeCurrency Local Crcy Amt
AmountInTransactionCurrency Item AmountInTransactionCurrency Pt Crcy Amt
Customer Item Customer Sold-to Party
BillingDocument Item BillingDocument SD Document
AccountingDocumentType Item AccountingDocumentType Journal Entry Type

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_UpdatedOpenItem.
-- 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: PAGRIUU

CREATE VIEW P_UpdatedOpenItem AS
SELECT
  Item.CompanyCode AS CompanyCode,
  Item.FiscalYear AS FiscalYear,
  Item.AccountingDocument AS AccountingDocument,
  Item.AccountingDocumentItem AS AccountingDocumentItem,
  Item.AssignmentReference AS AssignmentReference,
  Header.AccountingDocumentHeaderText AS AccountingDocumentHeaderText,
  Item.DocumentItemText AS DocumentItemText,
  Item.PaymentDifferenceReason AS PaymentDifferenceReason,
  Header.AccountingDocumentCreationDate AS CreationDate,
  Header.CreationTime AS CreationTime,
  Header.LastChangeDate AS LastChangeDate,
  ChangeDocument.CreationDate AS ChangeDocCreationDate,
  ChangeDocument.CreationTime AS ChangeDocumentCreationTime,
  Item.PostingDate AS PostingDate,
  Item.DocumentDate AS DocumentDate,
  Item.NetDueDate AS NetDueDate,
  Item.DebitCreditCode AS DebitCreditCode,
  Item.CashDiscountBaseAmount AS CashDiscountBaseAmount,
  Item.CashDiscountAmount AS CashDiscountAmount,
  Item.PaymentTerms AS PaymentTerms,
  Item.CashDiscount1Days AS CashDiscount1Days,
  Item.CashDiscount2Days AS CashDiscount2Days,
  Item.NetPaymentDays AS NetPaymentDays,
  Item.CashDiscount1Percent AS CashDiscount1Percent,
  Item.CashDiscount2Percent AS CashDiscount2Percent,
  Item.DueCalculationBaseDate AS DueCalculationBaseDate,
  Item.FixedCashDiscount AS FixedCashDiscount,
  Item.PaymentBlockingReason AS PaymentBlockingReason,
  Item.TransactionCurrency AS TransactionCurrency,
  Item.CompanyCodeCurrency AS CompanyCodeCurrency,
  Item.AmountInCompanyCodeCurrency AS AmountInCompanyCodeCurrency,
  Item.AmountInTransactionCurrency AS AmountInTransactionCurrency,
  Item.Customer AS Customer,
  Item.BillingDocument AS BillingDocument,
  Item.AccountingDocumentType AS AccountingDocumentType
INNER JOIN I_AccountingDocument AS Header ON /* join condition not captured in parsed metadata */
INNER JOIN P_ResItemSession AS Session ON /* join condition not captured in parsed metadata */
INNER JOIN I_ChangeDocument AS ChangeDocument ON /* join condition not captured in parsed metadata */
INNER JOIN I_ChangeDocumentItem AS ChangeDocumentItem ON /* join condition not captured in parsed metadata */
;