I_ProductMarginAnalysisCube

DDL: I_PRODUCTMARGINANALYSISCUBE Type: view_entity COMPOSITE Package: FINS_COPA_REPORTING

Product Margin - Cube

I_ProductMarginAnalysisCube (Composite)

Package: Explore, extend and adapt the SAP S/4HANA Public Edition with built-in and side-by-side extension capabilities.

Accounting and Financial Close

I_ProductMarginAnalysisCube is a Composite CDS View (Cube) that provides data about "Product Margin - Cube" in SAP S/4HANA. It reads from 1 data source (P_SemTagAndSubldgrItmDisCrcy) and exposes 107 fields with key fields Ledger, SourceLedger, CompanyCode, FiscalYear, AccountingDocument. It has 45 associations to related views. Part of development package FINS_COPA_REPORTING.

SAP Help Documentation

CategoryCDS Views for Sales Accounting
Data CategoryCube
Purpose
This CDS view is designed to provide a comprehensive analysis of product margins by aggregating and associating various financial and sales data. It serves as an analytical cube that integrates information from multiple dimensions such as ledger, company code, fiscal year, product, customer, and sales documents. The view is structured to support complex business analytics and reporting requirements, enabling users to gain insights into product profitability and financial performance. This CDS view provides the data to answer the following business questions: What is the margin for each product sold within a specific fiscal year and company code? How do different sales documents and items contribute to the overall product margin? What are the financial impacts of various ledger entries on product margins? How do customer and supplier relationships affect product profitability? What is the distribution of product margins across different sales organizations and distribution channels? How do cost centers and profit centers influence the financial outcomes of product sales? What are the effects of inventory valuation and business transactions on product margins? How do variations in input and output prices impact the product margin in display currency? What is the role of semantic tags and GL account hierarchies in analyzing product margins? To help you decide which CDS view to use for your purposes, SAP has introduced the annotation ObjectModel.supportedCapabilities that indicates the most appropriate use cases for each CDS view. To find out what use cases are best supported by this CDS view, access the entry of the CDS view in the View Browser app and find the values for this annotation under the Annotation tab. For more information, see Supported Capabilities for CDS Views .

Prerequisites
Authorizations Users who want to use this CDS view must have a role with the following restriction types set to read access: Restriction Type ID Restriction Type A_B_ANLKL Asset Postings: Company Code/Asset Class BEGRU_BKPF_BEK Authorization Group for Supplier-Related Journal Entries BEGRU_BKPF_BED Authorization Group for Customer Related Journal Entries SEGMENT_GLRRCTY Segment for Segmental Reporting/Record Type BUKRS_GLRLDNR_GLRRCTY_GLRVERS Company Code/Ledger/Record Type/Version BUKRS_PRCTR_KSTAR Company Code/ Profit Center / Cost Element SALES_AREA_OFFICE_GROUP Sales Area / Sales Office / Sales Group BEGRU_BKPF_BLA Authorization Groups for Journal Entry Document Type KOART Account Type COMPANYCODE_HIERARCHY Company Code Hierarchies BWKEY Valuation Area AUART Sales Document Type DATE Due Date for Authority Check KOSTL_KSTAR Cost Center/Cost Element FKBER Functional Area F_BKPF_ORD Order Category / Order Type for Journal Entries BUKRS Company Code SALES_AREA Sales Area You can use the Display Restriction Types app to find out in which business catalogs these restriction types are included.

Structure
Parameters The parameters of the CDS view are as follows: Parameter Name Label P_GLAccountHierarchy FSV Important Fields Important fields in this view include the following: Field Name Label Ledger Ledger SourceLedger Source Ledger CompanyCode Company Code FiscalYear Fiscal Year AccountingDocument Journal Entry LedgerGLLineItem Journal Entry Item GLAccountHierarchy FSV SemanticTag Semantic Tag CurrencyField Currency Role Field CurrencyRole Currency Role LedgerFiscalYear Fiscal Year of Ledger FiscalYearVariant Fiscal Year Variant FiscalPeriod Fiscal Period FiscalYearPeriod Fiscal Year Period GLAccount G/L Account SoldProduct Product Sold SoldProductGroup Product Sold Group ProfitCenter Profit Center CostCenter Cost Center Plant Plant BusinessArea Business Area FunctionalArea Functional Area Segment Segment Customer Customer CustomerGroup Customer Group TradingPartner Trading Partner No. SalesDistrict Sales District BillToParty Bill-to Party ShipToParty Ship-to Party DistributionChannel Distribution Channel OrderID Order ID SalesDocument

View on SAP Help Portal →

SAP API Hub

CategoryComposite
StateC1
Line of BusinessAccounting and Financial Close
Application ComponentCO-FIO-PA-2CL
CapabilitiesData Provider for Analytical Queries,Data Source for Defining CDS Entities,Data Source in SQL Select
Extensible (Key User)Yes
Extensible (Developer)No
Release State (Key User)Released
Release State (Developer)Not Released
PackageAccounting and Financial Close for SAP S/4HANA Cloud Public Edition
Description <p>This CDS view is designed to provide a comprehensive analysis of product margins by aggregating and associating various financial and sales data. It serves as an analytical cube that integrates information from multiple dimensions such as ledger, company code, fiscal year, product, customer, and sales documents. The view is structured to support complex business analytics and reporting requirements, enabling users to gain insights into product profitability and financial performance. </p> <p>This CDS view provides the data to answer the following business questions:</p> <ul> <li><p>What is the margin for each product sold within a specific fiscal year and company code?</p></li> <li><p>How do different sales documents and items contribute to the overall product margin?</p></li> <li><p>What are the financial impacts of various ledger entries on product margins?</p></li> <li><p>How do customer and supplier relationships affect product profitability?</p></li> <li><p>What is the distribution of product margins across different sales organizations and distribution channels?</p></li> <li><p>How do cost centers and profit centers influence the financial outcomes of product sales?</p></li> <li><p>What are the effects of inventory valuation and business transactions on product margins?</p></li> <li><p>How do variations in input and output prices impact the product margin in display currency?</p></li> <li><p>What is the role of semantic tags and GL account hierarchies in analyzing product margins?</p></li> </ul> <p>To help you decide which CDS view to use for your purposes, SAP has introduced the annotation ObjectModel.supportedCapabilities that indicates the most appropriate use cases for each CDS view. To find out what use cases are best supported by this CDS view, access the entry of the CDS view in the View Browser app and find the values for this annotation under the Annotation tab. For more information, see Supported Capabilities for CDS Views.</p>

Documentation

Data Sources (1)

SourceAliasJoin Type
P_SemTagAndSubldgrItmDisCrcy P_SemTagAndSubldgrItmDisCrcy from

Parameters (1)

NameTypeDefault
P_GLAccountHierarchy fins_sem_tag_hryid

Associations (45)

CardinalityTargetAliasCondition
[0..1] I_MargAnlysRptCurrencyField _CurrencyField $projection.CurrencyField = _CurrencyField.CurrencyField
[1..1] I_CompanyCode _CompanyCode $projection.CompanyCode = _CompanyCode.CompanyCode
[1..1] I_Ledger _Ledger $projection.Ledger = _Ledger.Ledger
[0..1] I_Ledger _SourceLedger $projection.SourceLedger = _SourceLedger.Ledger
[0..1] I_FiscalYearForCompanyCode _FiscalYear $projection.FiscalYear = _FiscalYear.FiscalYear and $projection.CompanyCode = _FiscalYear.CompanyCode
[0..1] I_ProductGroup _SoldProductGroup $projection.SoldProductGroup = _SoldProductGroup.MaterialGroup
[0..1] I_SalesDocument _SalesDocument $projection.SalesDocument = _SalesDocument.SalesDocument
[0..1] I_SalesDocumentItem _SalesDocumentItem $projection.SalesDocument = _SalesDocumentItem.SalesDocument and $projection.SalesDocumentItem = _SalesDocumentItem.SalesDocumentItem
[0..1] I_Plant _Plant $projection.Plant = _Plant.Plant
[0..1] I_Customer _Customer $projection.Customer = _Customer.Customer
[0..1] I_Customer _BillToParty $projection.BillToParty = _BillToParty.Customer
[0..1] I_Customer _ShipToParty $projection.ShipToParty = _ShipToParty.Customer
[0..1] I_Globalcompany _GlobalCompany $projection.tradingpartner = _GlobalCompany.Company
[0..1] I_CustomerGroup _CustomerGroup $projection.CustomerGroup = _CustomerGroup.CustomerGroup
[0..1] I_Segment _Segment $projection.Segment = _Segment.Segment
[0..1] I_Country _CustomerSupplierCountry $projection.CustomerSupplierCountry = _CustomerSupplierCountry.Country
[0..1] I_ControllingArea _ControllingArea $projection.ControllingArea = _ControllingArea.ControllingArea
[0..*] I_ProfitCenter _ProfitCenter $projection.ControllingArea = _ProfitCenter.ControllingArea and $projection.ProfitCenter = _ProfitCenter.ProfitCenter
[0..1] I_SalesOrganization _SalesOrganization $projection.SalesOrganization = _SalesOrganization.SalesOrganization
[0..1] I_DistributionChannel _DistributionChannel $projection.DistributionChannel = _DistributionChannel.DistributionChannel
[0..1] I_SalesDistrict _SalesDistrict $projection.SalesDistrict = _SalesDistrict.SalesDistrict
[0..1] I_Product _SoldProduct $projection.SoldProduct = _SoldProduct.Product
[0..1] I_JournalEntry _JournalEntry $projection.CompanyCode = _JournalEntry.CompanyCode and $projection.FiscalYear = _JournalEntry.FiscalYear and $projection.AccountingDocument = _JournalEntry.AccountingDocument
[0..*] I_GLAccountHierarchy _Hierarchy $projection.GLAccountHierarchy = _Hierarchy.GLAccountHierarchy
[0..1] I_SemanticTag _SemanticTag $projection.SemanticTag = _SemanticTag.SemanticTag
[0..*] I_CostCenter _CostCenter $projection.ControllingArea = _CostCenter.ControllingArea and $projection.CostCenter = _CostCenter.CostCenter
[0..1] I_Division _Division $projection.OrganizationDivision = _Division.Division
[0..1] I_UnitOfMeasure _BaseUnit $projection.QuantityUnit = _BaseUnit.UnitOfMeasure
[0..1] I_UnitOfMeasure _CostSourceUnit $projection.CostSourceUnit = _CostSourceUnit.UnitOfMeasure
[0..1] I_ProfitCenter _CurrentProfitCenter $projection.ControllingArea = _CurrentProfitCenter.ControllingArea and $projection.ProfitCenter = _CurrentProfitCenter.ProfitCenter and _CurrentProfitCenter.ValidityStartDate <= $session.system_date
[0..1] I_CostCenter _CurrentCostCenter $projection.ControllingArea = _CurrentCostCenter.ControllingArea and $projection.CostCenter = _CurrentCostCenter.CostCenter and _CurrentCostCenter.ValidityStartDate <= $session.system_date and _CurrentCostCenter.ValidityEndDate >= $session.system_date
[0..1] I_Supplier _Supplier $projection.Supplier = _Supplier.Supplier
[0..1] I_Order _Order $projection.OrderID = _Order.OrderID
[0..1] I_AccountingDocumentType _AccountingDocumentType '' = _AccountingDocumentType.AccountingDocumentType
[0..1] I_SrvcDocByDocumentType _ServiceDocument '' = _ServiceDocument.ServiceDocumentType and '' = _ServiceDocument.ServiceDocument
[0..1] I_BusinessArea _BusinessArea $projection.BusinessArea = _BusinessArea.BusinessArea
[0..1] I_FunctionalArea _FunctionalArea $projection.FunctionalArea = _FunctionalArea.FunctionalArea
[0..1] I_ChartOfAccounts _ChartOfAccounts $projection.ChartOfAccounts = _ChartOfAccounts.ChartOfAccounts
[0..1] I_GLAccountInChartOfAccounts _GLAccountInChartOfAccounts $projection.ChartOfAccounts = _GLAccountInChartOfAccounts.ChartOfAccounts and $projection.GLAccount = _GLAccountInChartOfAccounts.GLAccount
[0..1] I_BusinessTransactionType _BusinessTransactionType $projection.BusinessTransactionType = _BusinessTransactionType.BusinessTransactionType
[0..1] I_ReferenceDocumentType _ReferenceDocumentType $projection.ReferenceDocumentType = _ReferenceDocumentType.ReferenceDocumentType
[0..1] I_InventoryValuationType _InventoryValuationType $projection.InventoryValuationType = _InventoryValuationType.InventoryValuationType
[0..1] I_Product _Product $projection.Product = _Product.Product
[1..1] E_JournalEntryItem _Extension $projection.Ledger = _Extension.SourceLedger and $projection.CompanyCode = _Extension.CompanyCode and $projection.FiscalYear = _Extension.FiscalYear and $projection.AccountingDocument = _Extension.AccountingDocument and $projection.LedgerGLLineItem = _Extension.LedgerGLLineItem
[0..1] I_ProductMarginAnalysisDSt _DocumentStore _DocumentStore.tra_ledger = $projection.Ledger and _DocumentStore.tra_sourceledger = $projection.SourceLedger and _DocumentStore.tra_companycode = $projection.CompanyCode and _DocumentStore.tra_fiscalyear = $projection.FiscalYear and _DocumentStore.tra_00006 = $projection.AccountingDocument and _DocumentStore.tra_00021 = $projection.LedgerGLLineItem and _DocumentStore.tra_00013 = $projection.GLAccountHierarchy and _DocumentStore.tra_semantictag = $projection.SemanticTag and _DocumentStore.tra_currencyfield = $projection.CurrencyField

Annotations (12)

NameValueLevelField
EndUserText.label Product Margin - Cube view
AccessControl.authorizationCheck #MANDATORY view
AccessControl.personalData.blocking #REQUIRED view
Analytics.dataCategory #CUBE view
Analytics.internalName #LOCAL view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.modelingPattern #ANALYTICAL_CUBE view
Metadata.ignorePropagatedAnnotations true view
Metadata.allowExtensions true view
VDM.viewType #COMPOSITE view

Fields (107)

KeyFieldSource TableSource FieldDescription
KEY Ledger Ledger Ledger in General Ledger Accounting
KEY SourceLedger SourceLedger Source Ledger
KEY CompanyCode CompanyCode Receiver Company Code
KEY FiscalYear FiscalYear G/L Fiscal Year
KEY AccountingDocument AccountingDocument Journal Entry
KEY LedgerGLLineItem LedgerGLLineItem General Ledger Journal Entry Line Item
KEY GLAccountHierarchy GLAccountHierarchy Financial Statement Version
KEY SemanticTag SemanticTag Semantic Tag of a Hierarchy Node
KEY CurrencyField CurrencyField Currency Role Field
CurrencyRole CurrencyRole Curr./Val. Type
LedgerFiscalYear LedgerFiscalYear Fiscal Year of Ledger
FiscalYearVariant FiscalYearVariant Fiscal Year Variant
FiscalPeriod FiscalPeriod Fiscal Period
FiscalYearPeriod FiscalYearPeriod Fiscal Year Period
GLAccount GLAccount General Ledger
SoldProduct SoldProduct Product Sold
SoldProductGroup SoldProductGroup Product Sold Group
ProfitCenter ProfitCenter Profit Center
CostCenter CostCenter Cost Center
Plant Plant Valuation Area
BusinessArea BusinessArea Business Area
FunctionalArea FunctionalArea Sendr Fctl Area
Segment Segment Segment for Segmental Reporting
Customer Customer Customer Number
CustomerGroup CustomerGroup Customer Group
TradingPartner _Customer TradingPartner Company ID of Trading Partner
SalesDistrict SalesDistrict Sales District
BillToParty BillToParty Inv. Recipient
ShipToParty ShipToParty Ship-To Party (obsolete)
DistributionChannel DistributionChannel Distribution Channel
OrderID OrderID Order ID
SalesDocument SalesDocument Sales Document
SalesDocumentItem SalesDocumentItem Sales Document Item
SalesOrganization SalesOrganization Sales Organization
AccountAssignmentType AccountAssignmentType Account Assignment Type
CustomerSupplierCountry CustomerSupplierCountry Customer or Supplier Country/Region
CustomerSupplierIndustry CustomerSupplierIndustry Customer Supplier Industry
PurchasingDocument PurchasingDocument Purchasing Document
ControllingArea ControllingArea Controlling Area
PostingDate PostingDate Posting Date for GR
Supplier Supplier Supplier
FinancialAccountType FinancialAccountType Fin. Account Type
OrganizationDivision OrganizationDivision Org. Division
AssetClass AssetClass Asset Class
ValuationArea ValuationArea Valuation Area
BusinessTransactionType BusinessTransactionType Business Transaction Type
ReferenceDocumentType ReferenceDocumentType Reference Document Type
InventoryValuationType InventoryValuationType Inventory Valuation Type
Product Product Product Sold
ChartOfAccounts ChartOfAccounts Chart of Accounts
QuantityUnit QuantityUnit Base Unit of Measure
Quantity Quantity Quantity
CostSourceUnit CostSourceUnit Cost Source Unit
ValuationQuantity ValuationQuantity Valuation Quantity
Currency Currency Valuation Crcy
AmountInDisplayCurrency AmountInDisplayCurrency Amount in Currency Role Currency
FixedAmountInDspCrcy FixedAmountInDspCrcy Fixed Amount in Currency Role Currency
InptPrVarcAmtInDspCrcy InptPrVarcAmtInDspCrcy Input Price Variance in Display Currency
OutpPrVarcAmtInDspCrcy OutpPrVarcAmtInDspCrcy Output Price Variance Amount in Display Currency
InptQtyVarcAmtInDspCrcy InptQtyVarcAmtInDspCrcy Input Quantity Variance Amount in Display Currency
RsceUsgeVarcAmtInDspCrcy RsceUsgeVarcAmtInDspCrcy Resource Usage Variance Amount in Display Currency
LotSizeVarcAmtInDspCrcy LotSizeVarcAmtInDspCrcy Lot Size Variance Amount in Display Currency
InptRmngVarcAmtInDspCrcy InptRmngVarcAmtInDspCrcy Remaining Variance Amount in Display Currency
_BusinessTransactionType _BusinessTransactionType
_ReferenceDocumentType _ReferenceDocumentType
_InventoryValuationType _InventoryValuationType
_Product _Product
_BaseUnit _BaseUnit
_CostSourceUnit _CostSourceUnit
_Division _Division
_Hierarchy _Hierarchy
_SemanticTag _SemanticTag
_JournalEntry _JournalEntry
_AccountingDocumentType _AccountingDocumentType
_CurrentProfitCenter _CurrentProfitCenter
_CurrentCostCenter _CurrentCostCenter
_Supplier _Supplier
_Order _Order
_ServiceDocument _ServiceDocument
_CustomerSupplierCountry _CustomerSupplierCountry
_SalesOrganization _SalesOrganization
_DistributionChannel _DistributionChannel
_ProfitCenter _ProfitCenter
_CostCenter _CostCenter
_ControllingArea _ControllingArea
_Ledger _Ledger
_SourceLedger _SourceLedger
_CompanyCode _CompanyCode
_FiscalYear _FiscalYear
_SoldProduct _SoldProduct
_SoldProductGroup _SoldProductGroup
_Plant _Plant
_BusinessArea _BusinessArea
_FunctionalArea _FunctionalArea
_Segment _Segment
_Customer _Customer
_GlobalCompany _GlobalCompany
_CustomerGroup _CustomerGroup
_BillToParty _BillToParty
_ShipToParty _ShipToParty
_SalesDocument _SalesDocument
_SalesDocumentItem _SalesDocumentItem
_SalesDistrict _SalesDistrict
_CurrencyField _CurrencyField
_ChartOfAccounts _ChartOfAccounts
_GLAccountInChartOfAccounts _GLAccountInChartOfAccounts
_DocumentStore _DocumentStore

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 I_ProductMarginAnalysisCube.
-- 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.
-- Parameters: P_GLAccountHierarchy : fins_sem_tag_hryid

CREATE VIEW I_ProductMarginAnalysisCube AS
SELECT
  Ledger,
  SourceLedger,
  CompanyCode,
  FiscalYear,
  AccountingDocument,
  LedgerGLLineItem,
  GLAccountHierarchy,
  SemanticTag,
  CurrencyField,
  CurrencyRole,
  LedgerFiscalYear,
  FiscalYearVariant,
  FiscalPeriod,
  FiscalYearPeriod,
  GLAccount,
  SoldProduct,
  SoldProductGroup,
  ProfitCenter,
  CostCenter,
  Plant,
  BusinessArea,
  FunctionalArea,
  Segment,
  Customer,
  CustomerGroup,
  _Customer.TradingPartner AS TradingPartner,
  SalesDistrict,
  BillToParty,
  ShipToParty,
  DistributionChannel,
  OrderID,
  SalesDocument,
  SalesDocumentItem,
  SalesOrganization,
  AccountAssignmentType,
  CustomerSupplierCountry,
  CustomerSupplierIndustry,
  PurchasingDocument,
  ControllingArea,
  PostingDate,
  Supplier,
  FinancialAccountType,
  OrganizationDivision,
  AssetClass,
  ValuationArea,
  BusinessTransactionType,
  ReferenceDocumentType,
  InventoryValuationType,
  Product,
  ChartOfAccounts,
  QuantityUnit,
  Quantity,
  CostSourceUnit,
  ValuationQuantity,
  Currency,
  AmountInDisplayCurrency,
  FixedAmountInDspCrcy,
  InptPrVarcAmtInDspCrcy,
  OutpPrVarcAmtInDspCrcy,
  InptQtyVarcAmtInDspCrcy,
  RsceUsgeVarcAmtInDspCrcy,
  LotSizeVarcAmtInDspCrcy,
  InptRmngVarcAmtInDspCrcy
FROM P_SemTagAndSubldgrItmDisCrcy
LEFT OUTER JOIN I_MargAnlysRptCurrencyField AS _CurrencyField ON CurrencyField = _CurrencyField.CurrencyField  -- association [0..1]
LEFT OUTER JOIN I_CompanyCode AS _CompanyCode ON CompanyCode = _CompanyCode.CompanyCode  -- association [1..1]
LEFT OUTER JOIN I_Ledger AS _Ledger ON Ledger = _Ledger.Ledger  -- association [1..1]
LEFT OUTER JOIN I_Ledger AS _SourceLedger ON SourceLedger = _SourceLedger.Ledger  -- association [0..1]
LEFT OUTER JOIN I_FiscalYearForCompanyCode AS _FiscalYear ON FiscalYear = _FiscalYear.FiscalYear AND CompanyCode = _FiscalYear.CompanyCode  -- association [0..1]
LEFT OUTER JOIN I_ProductGroup AS _SoldProductGroup ON SoldProductGroup = _SoldProductGroup.MaterialGroup  -- association [0..1]
LEFT OUTER JOIN I_SalesDocument AS _SalesDocument ON SalesDocument = _SalesDocument.SalesDocument  -- association [0..1]
LEFT OUTER JOIN I_SalesDocumentItem AS _SalesDocumentItem ON SalesDocument = _SalesDocumentItem.SalesDocument AND SalesDocumentItem = _SalesDocumentItem.SalesDocumentItem  -- association [0..1]
LEFT OUTER JOIN I_Plant AS _Plant ON Plant = _Plant.Plant  -- association [0..1]
LEFT OUTER JOIN I_Customer AS _Customer ON Customer = _Customer.Customer  -- association [0..1]
LEFT OUTER JOIN I_Customer AS _BillToParty ON BillToParty = _BillToParty.Customer  -- association [0..1]
LEFT OUTER JOIN I_Customer AS _ShipToParty ON ShipToParty = _ShipToParty.Customer  -- association [0..1]
LEFT OUTER JOIN I_Globalcompany AS _GlobalCompany ON tradingpartner = _GlobalCompany.Company  -- association [0..1]
LEFT OUTER JOIN I_CustomerGroup AS _CustomerGroup ON CustomerGroup = _CustomerGroup.CustomerGroup  -- association [0..1]
LEFT OUTER JOIN I_Segment AS _Segment ON Segment = _Segment.Segment  -- association [0..1]
LEFT OUTER JOIN I_Country AS _CustomerSupplierCountry ON CustomerSupplierCountry = _CustomerSupplierCountry.Country  -- association [0..1]
LEFT OUTER JOIN I_ControllingArea AS _ControllingArea ON ControllingArea = _ControllingArea.ControllingArea  -- association [0..1]
LEFT OUTER JOIN I_ProfitCenter AS _ProfitCenter ON ControllingArea = _ProfitCenter.ControllingArea AND ProfitCenter = _ProfitCenter.ProfitCenter  -- association [0..*]
LEFT OUTER JOIN I_SalesOrganization AS _SalesOrganization ON SalesOrganization = _SalesOrganization.SalesOrganization  -- association [0..1]
LEFT OUTER JOIN I_DistributionChannel AS _DistributionChannel ON DistributionChannel = _DistributionChannel.DistributionChannel  -- association [0..1]
LEFT OUTER JOIN I_SalesDistrict AS _SalesDistrict ON SalesDistrict = _SalesDistrict.SalesDistrict  -- association [0..1]
LEFT OUTER JOIN I_Product AS _SoldProduct ON SoldProduct = _SoldProduct.Product  -- association [0..1]
LEFT OUTER JOIN I_JournalEntry AS _JournalEntry ON CompanyCode = _JournalEntry.CompanyCode AND FiscalYear = _JournalEntry.FiscalYear AND AccountingDocument = _JournalEntry.AccountingDocument  -- association [0..1]
LEFT OUTER JOIN I_GLAccountHierarchy AS _Hierarchy ON GLAccountHierarchy = _Hierarchy.GLAccountHierarchy  -- association [0..*]
LEFT OUTER JOIN I_SemanticTag AS _SemanticTag ON SemanticTag = _SemanticTag.SemanticTag  -- association [0..1]
LEFT OUTER JOIN I_CostCenter AS _CostCenter ON ControllingArea = _CostCenter.ControllingArea AND CostCenter = _CostCenter.CostCenter  -- association [0..*]
LEFT OUTER JOIN I_Division AS _Division ON OrganizationDivision = _Division.Division  -- association [0..1]
LEFT OUTER JOIN I_UnitOfMeasure AS _BaseUnit ON QuantityUnit = _BaseUnit.UnitOfMeasure  -- association [0..1]
LEFT OUTER JOIN I_UnitOfMeasure AS _CostSourceUnit ON CostSourceUnit = _CostSourceUnit.UnitOfMeasure  -- association [0..1]
LEFT OUTER JOIN I_ProfitCenter AS _CurrentProfitCenter ON ControllingArea = _CurrentProfitCenter.ControllingArea AND ProfitCenter = _CurrentProfitCenter.ProfitCenter AND _CurrentProfitCenter.ValidityStartDate <= $session.system_date  -- association [0..1]
LEFT OUTER JOIN I_CostCenter AS _CurrentCostCenter ON ControllingArea = _CurrentCostCenter.ControllingArea AND CostCenter = _CurrentCostCenter.CostCenter AND _CurrentCostCenter.ValidityStartDate <= $session.system_date AND _CurrentCostCenter.ValidityEndDate >= $session.system_date  -- association [0..1]
LEFT OUTER JOIN I_Supplier AS _Supplier ON Supplier = _Supplier.Supplier  -- association [0..1]
LEFT OUTER JOIN I_Order AS _Order ON OrderID = _Order.OrderID  -- association [0..1]
LEFT OUTER JOIN I_AccountingDocumentType AS _AccountingDocumentType ON '' = _AccountingDocumentType.AccountingDocumentType  -- association [0..1]
LEFT OUTER JOIN I_SrvcDocByDocumentType AS _ServiceDocument ON '' = _ServiceDocument.ServiceDocumentType AND '' = _ServiceDocument.ServiceDocument  -- association [0..1]
LEFT OUTER JOIN I_BusinessArea AS _BusinessArea ON BusinessArea = _BusinessArea.BusinessArea  -- association [0..1]
LEFT OUTER JOIN I_FunctionalArea AS _FunctionalArea ON FunctionalArea = _FunctionalArea.FunctionalArea  -- association [0..1]
LEFT OUTER JOIN I_ChartOfAccounts AS _ChartOfAccounts ON ChartOfAccounts = _ChartOfAccounts.ChartOfAccounts  -- association [0..1]
LEFT OUTER JOIN I_GLAccountInChartOfAccounts AS _GLAccountInChartOfAccounts ON ChartOfAccounts = _GLAccountInChartOfAccounts.ChartOfAccounts AND GLAccount = _GLAccountInChartOfAccounts.GLAccount  -- association [0..1]
LEFT OUTER JOIN I_BusinessTransactionType AS _BusinessTransactionType ON BusinessTransactionType = _BusinessTransactionType.BusinessTransactionType  -- association [0..1]
LEFT OUTER JOIN I_ReferenceDocumentType AS _ReferenceDocumentType ON ReferenceDocumentType = _ReferenceDocumentType.ReferenceDocumentType  -- association [0..1]
LEFT OUTER JOIN I_InventoryValuationType AS _InventoryValuationType ON InventoryValuationType = _InventoryValuationType.InventoryValuationType  -- association [0..1]
LEFT OUTER JOIN I_Product AS _Product ON Product = _Product.Product  -- association [0..1]
LEFT OUTER JOIN E_JournalEntryItem AS _Extension ON Ledger = _Extension.SourceLedger AND CompanyCode = _Extension.CompanyCode AND FiscalYear = _Extension.FiscalYear AND AccountingDocument = _Extension.AccountingDocument AND LedgerGLLineItem = _Extension.LedgerGLLineItem  -- association [1..1]
LEFT OUTER JOIN I_ProductMarginAnalysisDSt AS _DocumentStore ON _DocumentStore.tra_ledger = Ledger AND _DocumentStore.tra_sourceledger = SourceLedger AND _DocumentStore.tra_companycode = CompanyCode AND _DocumentStore.tra_fiscalyear = FiscalYear AND _DocumentStore.tra_00006 = AccountingDocument AND _DocumentStore.tra_00021 = LedgerGLLineItem AND _DocumentStore.tra_00013 = GLAccountHierarchy AND _DocumentStore.tra_semantictag = SemanticTag AND _DocumentStore.tra_currencyfield = CurrencyField  -- association [0..1]
;