P_StRpSalesInvoiceItem

DDL: P_STRPSALESINVOICEITEM SQL: PSALEINVLITEM Type: view CONSUMPTION

Private View for Sales Invoice List

P_StRpSalesInvoiceItem is a Consumption CDS View that provides data about "Private View for Sales Invoice List" in SAP S/4HANA. It reads from 7 data sources and exposes 20 fields with key fields CompanyCode, BillingDocument, BillingDocumentItem, FiscalYear, StatryRptCategory. It has 2 associations to related views.

Data Sources (7)

SourceAliasJoin Type
I_BillingDocumentBasic I_BillingDocumentBasic inner
I_BillingDocumentItemBasic I_BillingDocumentItemBasic from
I_Customer I_Customer inner
I_DeliveryDocument I_DeliveryDocument left_outer
I_DeliveryDocumentItem I_DeliveryDocumentItem left_outer
I_JournalEntry I_JournalEntry inner
P_PlantsAndBranchesItem P_PlantsAndBranchesItem left_outer

Associations (2)

CardinalityTargetAliasCondition
[0..*] I_StRpJournalEntryLog _ReportedItemsLog _ReportedItemsLog.CompanyCode = $projection.CompanyCode and _ReportedItemsLog.AccountingDocument = $projection.AccountingDocument and _ReportedItemsLog.FiscalYear = $projection.FiscalYear
[1..1] I_UnitOfMeasureText _UnitofMeasure _UnitofMeasure.UnitOfMeasure = I_BillingDocumentItemBasic.BillingQuantityUnit and _UnitofMeasure.Language = $session.system_language

Annotations (12)

NameValueLevelField
AbapCatalog.sqlViewName PSALEINVLITEM view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
EndUserText.label Private View for Sales Invoice List view
VDM.viewType #CONSUMPTION view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.serviceQuality #P view
ObjectModel.usageType.dataClass #MIXED view
AccessControl.personalData.blocking #NOT_REQUIRED view
VDM.private true view
AccessControl.blocking #BLOCKED_DATA_INCLUDED view

Fields (20)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode I_BillingDocumentBasic CompanyCode Receiver Company Code
KEY BillingDocument I_BillingDocumentBasic BillingDocument SD Document
KEY BillingDocumentItem I_BillingDocumentItemBasic BillingDocumentItem Item
KEY FiscalYear I_BillingDocumentBasic FiscalYear G/L Fiscal Year
KEY StatryRptCategory _ReportedItemsLog StatryRptCategory Report ID
KEY StatryRptgEntity _ReportedItemsLog StatryRptgEntity Reporting Entity
KEY StatryRptRunID _ReportedItemsLog StatryRptRunID Report Run ID
AccountingDocument I_JournalEntry AccountingDocument Journal Entry
PayerParty I_BillingDocumentBasic PayerParty Payer
DocumentReferenceID I_BillingDocumentBasic DocumentReferenceID Reference
Material I_BillingDocumentItemBasic Material Vehicle Model
Plant I_DeliveryDocumentItem Plant Valuation Area
Country P_PlantsAndBranchesItem Country Venue: Ctry/Reg
BillingDocumentDate I_BillingDocumentBasic BillingDocumentDate Billing Date
MeterReadingSystemDate
BillingQuantityUnit I_BillingDocumentItemBasic BillingQuantityUnit Sales Unit
Quantity I_BillingDocumentItemBasic BillingQuantity Invoiced Qty
CustomerName I_Customer CustomerName Name of Customer
CustomerCountry I_Customer Country Venue: Ctry/Reg
_UnitofMeasure _UnitofMeasure

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_StRpSalesInvoiceItem.
-- 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: PSALEINVLITEM

CREATE VIEW P_StRpSalesInvoiceItem AS
SELECT
  I_BillingDocumentBasic.CompanyCode AS CompanyCode,
  I_BillingDocumentBasic.BillingDocument AS BillingDocument,
  I_BillingDocumentItemBasic.BillingDocumentItem AS BillingDocumentItem,
  I_BillingDocumentBasic.FiscalYear AS FiscalYear,
  _ReportedItemsLog.StatryRptCategory AS StatryRptCategory,
  _ReportedItemsLog.StatryRptgEntity AS StatryRptgEntity,
  _ReportedItemsLog.StatryRptRunID AS StatryRptRunID,
  I_JournalEntry.AccountingDocument AS AccountingDocument,
  I_BillingDocumentBasic.PayerParty AS PayerParty,
  I_BillingDocumentBasic.DocumentReferenceID AS DocumentReferenceID,
  I_BillingDocumentItemBasic.Material AS Material,
  I_DeliveryDocumentItem.Plant AS Plant,
  P_PlantsAndBranchesItem.Country AS Country,
  I_BillingDocumentBasic.BillingDocumentDate AS BillingDocumentDate,
  $session.system_date AS MeterReadingSystemDate,
  I_BillingDocumentItemBasic.BillingQuantityUnit AS BillingQuantityUnit,
  I_BillingDocumentItemBasic.BillingQuantity AS Quantity,
  I_Customer.CustomerName AS CustomerName,
  I_Customer.Country AS CustomerCountry
FROM I_BillingDocumentItemBasic
INNER JOIN I_BillingDocumentBasic ON /* join condition not captured in parsed metadata */
INNER JOIN I_JournalEntry ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_DeliveryDocument ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_DeliveryDocumentItem ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN P_PlantsAndBranchesItem ON /* join condition not captured in parsed metadata */
INNER JOIN I_Customer ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_StRpJournalEntryLog AS _ReportedItemsLog ON _ReportedItemsLog.CompanyCode = CompanyCode AND _ReportedItemsLog.AccountingDocument = AccountingDocument AND _ReportedItemsLog.FiscalYear = FiscalYear  -- association [0..*]
LEFT OUTER JOIN I_UnitOfMeasureText AS _UnitofMeasure ON _UnitofMeasure.UnitOfMeasure = I_BillingDocumentItemBasic.BillingQuantityUnit AND _UnitofMeasure.Language = $session.system_language  -- association [1..1]
;