P_EG_StRpBillingItem

DDL: P_EG_STRPBILLINGITEM SQL: PEGSRTAXBLITM Type: view COMPOSITE

P_EG_StRpBillingItem is a Composite CDS View in SAP S/4HANA. It reads from 3 data sources (I_BillingDocument, I_BillingDocumentItem, I_PricingElement) and exposes 26 fields with key fields BillingDocument, BillingDocumentItem, PricingDocument, PricingDocumentItem.

Data Sources (3)

SourceAliasJoin Type
I_BillingDocument I_BillingDocument from
I_BillingDocumentItem I_BillingDocumentItem inner
I_PricingElement I_PricingElement inner

Annotations (8)

NameValueLevelField
AbapCatalog.sqlViewName PEGSRTAXBLITM view
VDM.viewType #COMPOSITE view
VDM.private true view
AccessControl.authorizationCheck #PRIVILEGED_ONLY view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.dataClass #MIXED view

Fields (26)

KeyFieldSource TableSource FieldDescription
KEY BillingDocument I_BillingDocument BillingDocument SD Document
KEY BillingDocumentItem I_BillingDocumentItem BillingDocumentItem Item
KEY PricingDocument I_PricingElement PricingDocument Document Condition
KEY PricingDocumentItem I_PricingElement PricingDocumentItem Item
CompanyCode I_BillingDocument CompanyCode Receiver Company Code
FiscalYear I_BillingDocument FiscalYear G/L Fiscal Year
AccountingDocument I_BillingDocument AccountingDocument Journal Entry
ConditionBaseValue I_PricingElement ConditionBaseValue Cond.Basis
ConditionAmount I_PricingElement ConditionAmount Condition Value
TaxCode I_PricingElement TaxCode Tax Code
AccountKeyForGLAccount I_PricingElement AccountKeyForGLAccount Account Key
PriceDetnExchangeRate I_PricingElement PriceDetnExchangeRate Exchange Rate
GLAccount I_PricingElement GLAccount General Ledger
Material I_BillingDocumentItem Material Vehicle Model
MaterialName
BillingDocumentItemText I_BillingDocumentItem BillingDocumentItemText Item Descr.
BillingQuantityUnit I_BillingDocumentItem BillingQuantityUnit Sales Unit
BillingQuantity I_BillingDocumentItem BillingQuantity Invoiced Qty
DocumentCurrency I_PricingElement TransactionCurrency Transaction Currency
TaxAmount
TaxBaseAmountInTransCrcy
CompanyCodeCurrency
TaxAmountInRptgCrcy
TaxBaseAmountInRptgCrcy
_Material I_BillingDocumentItem _Material
_BillingQuantityUnit I_BillingDocumentItem _BillingQuantityUnit

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_EG_StRpBillingItem.
-- 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: PEGSRTAXBLITM

CREATE VIEW P_EG_StRpBillingItem AS
SELECT
  I_BillingDocument.BillingDocument AS BillingDocument,
  I_BillingDocumentItem.BillingDocumentItem AS BillingDocumentItem,
  I_PricingElement.PricingDocument AS PricingDocument,
  I_PricingElement.PricingDocumentItem AS PricingDocumentItem,
  I_BillingDocument.CompanyCode AS CompanyCode,
  I_BillingDocument.FiscalYear AS FiscalYear,
  I_BillingDocument.AccountingDocument AS AccountingDocument,
  I_PricingElement.ConditionBaseValue AS ConditionBaseValue,
  I_PricingElement.ConditionAmount AS ConditionAmount,
  I_PricingElement.TaxCode AS TaxCode,
  I_PricingElement.AccountKeyForGLAccount AS AccountKeyForGLAccount,
  I_PricingElement.PriceDetnExchangeRate AS PriceDetnExchangeRate,
  I_PricingElement.GLAccount AS GLAccount,
  I_BillingDocumentItem.Material AS Material,
  I_BillingDocumentItem._Material._Text[1:Language = $session.system_language].MaterialName AS MaterialName,
  I_BillingDocumentItem.BillingDocumentItemText AS BillingDocumentItemText,
  I_BillingDocumentItem.BillingQuantityUnit AS BillingQuantityUnit,
  I_BillingDocumentItem.BillingQuantity AS BillingQuantity,
  I_PricingElement.TransactionCurrency AS DocumentCurrency,
  cast( I_PricingElement.ConditionAmount as wrbtr ) AS TaxAmount,
  cast( I_PricingElement.ConditionBaseValue as wrbtr ) AS TaxBaseAmountInTransCrcy,
  I_BillingDocument._CompanyCode.Currency AS CompanyCodeCurrency,
  cast( ( AccountingExchangeRate * I_PricingElement.ConditionAmount) as dmbtr ) AS TaxAmountInRptgCrcy,
  cast( ( AccountingExchangeRate * I_PricingElement.ConditionBaseValue) as dmbtr ) AS TaxBaseAmountInRptgCrcy,
  I_BillingDocumentItem._Material AS _Material,
  I_BillingDocumentItem._BillingQuantityUnit AS _BillingQuantityUnit
FROM I_BillingDocument
INNER JOIN I_BillingDocumentItem ON /* join condition not captured in parsed metadata */
INNER JOIN I_PricingElement ON /* join condition not captured in parsed metadata */
;