P_ML_Balance

DDL: P_ML_BALANCE Type: view COMPOSITE

P_ML_Balance is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (P_ML_Balance_Bcf) and exposes 91 fields with key fields CompanyCode, Ledger, GLAccount, FiscalYear, AccountingDocument. It has 2 associations to related views.

Data Sources (1)

SourceAliasJoin Type
P_ML_Balance_Bcf P_ML_Balance_Bcf from

Parameters (1)

NameTypeDefault
P_CalendarDate calendardate

Associations (2)

CardinalityTargetAliasCondition
[0..1] I_ValuationAreaType _ValuationAreaType _ValuationAreaType.ValuationAreaType = '1'
[0..1] I_Material _Material _Material.Material = it.Material

Annotations (7)

NameValueLevelField
AbapCatalog.sqlViewName PMLCUBEBAL view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
VDM.viewType #COMPOSITE view
VDM.private true view
ClientHandling.algorithm #SESSION_VARIABLE view
AccessControl.authorizationCheck #NOT_REQUIRED view

Fields (91)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode it CompanyCode Receiver Company Code
KEY Ledger it Ledger Ledger
KEY GLAccount it GLAccount General Ledger
KEY FiscalYear it FiscalYear G/L Fiscal Year
KEY AccountingDocument it AccountingDocument Journal Entry
KEY LedgerGLLineItem it LedgerGLLineItem Journal Entry Item
KEY Product it Product Product Sold
Material it Material Vehicle Model
CostEstimate it CostEstimate Cost EstimateNo
ChartOfAccounts it ChartOfAccounts Node Class
AccountingDocumentType it AccountingDocumentType Journal Entry Type
ValuationArea it ValuationArea Valuation Area
InventoryValuationType it InventoryValuationType Valuation Type
FiscalPeriod it FiscalPeriod Tax period
LedgerFiscalYear it LedgerFiscalYear
PostingDate it PostingDate Posting Date for GR
MatlDocLatestPostgDate it MatlDocLatestPostgDate Posting Date for GR
ReferenceDocument it ReferenceDocument Reference Document
BusinessTransactionType it BusinessTransactionType Bus.transaction
DocumentDate it DocumentDate Journal Entry Date
ProfitCenter it ProfitCenter Profit Center
CostCenter it CostCenter Cost Center
Segment it Segment Segment number
AccountingDocCreatedByUser it AccountingDocCreatedByUser User which created overhead document
LastChangeDateTime it LastChangeDateTime Timestamp
FiscalYearPeriod it FiscalYearPeriod Period/Year
FiscalYearVariant it FiscalYearVariant FY Variant
ReferenceDocumentType it ReferenceDocumentType Reference Document Type
PurchasingDocument it PurchasingDocument Purchasing Document
ProductionOrder it ProductionOrder Order
TransactionTypeDetermination it TransactionTypeDetermination Transaction Key
MaterialGroup _Material MaterialGroup Product Group
ProductGroup _Material MaterialGroup Product Group
MaterialValuationClass it MaterialValuationClass Valuation Class
InventoryValuationCategory it InventoryValuationCategory
ControllingArea it ControllingArea Controlling Area
PlantendasPlant
MaterialLedgerProcessType it MaterialLedgerProcessType
MaterialLedgerCategory it MaterialLedgerCategory
IsSupplierStockValuation it IsSupplierStockValuation
InventorySpecialStockValnType it InventorySpecialStockValnType Valuation
InventorySpclStkSalesDocument it InventorySpclStkSalesDocument
InventorySpclStkSalesDocItm it InventorySpclStkSalesDocItm
InvtrySpclStockWBSElmntIntID it InvtrySpclStockWBSElmntIntID
InventorySpecialStockSupplier it InventorySpecialStockSupplier
CompanyCodeCurrencyRole it CompanyCodeCurrencyRole
GlobalCurrencyRole it GlobalCurrencyRole
FreeDefinedCurrency1Role it FreeDefinedCurrency1Role
FreeDefinedCurrency2Role it FreeDefinedCurrency2Role
FreeDefinedCurrency3Role it FreeDefinedCurrency3Role
FreeDefinedCurrency4Role it FreeDefinedCurrency4Role
FreeDefinedCurrency5Role it FreeDefinedCurrency5Role
FreeDefinedCurrency6Role it FreeDefinedCurrency6Role
FreeDefinedCurrency7Role it FreeDefinedCurrency7Role
FreeDefinedCurrency8Role it FreeDefinedCurrency8Role
CompanyCodeCurrency it CompanyCodeCurrency Local Currency
SlsPriceAmountInCoCodeCrcy it SlsPriceAmountInCoCodeCrcy Sales Price Book Value
GroupCurrency it GroupCurrency Ledger curr.
FreeDefinedCurrency1 it FreeDefinedCurrency1 Freely Defined Currency 1
FreeDefinedCurrency2 it FreeDefinedCurrency2 Freely Defined Currency 2
FreeDefinedCurrency3 it FreeDefinedCurrency3 Freely Defined Currency 3
FreeDefinedCurrency4 it FreeDefinedCurrency4 Freely Defined Currency 4
FreeDefinedCurrency5 it FreeDefinedCurrency5 Freely Defined Currency 5
FreeDefinedCurrency6 it FreeDefinedCurrency6 Freely Defined Currency 6
FreeDefinedCurrency7 it FreeDefinedCurrency7 Freely Defined Currency 7
FreeDefinedCurrency8 it FreeDefinedCurrency8 Freely Defined Currency 8
BaseUnit it CostSourceUnit
CostSourceUnit it CostSourceUnit
InventoryQty it InventoryQty
_GLAccountInChartOfAccounts it _GLAccountInChartOfAccounts
_ChartOfAccounts it _ChartOfAccounts
_Segment it _Segment
_Material _Material
_CompanyCode it _CompanyCode
_Ledger it _Ledger
_ProfitCenter it _ProfitCenter
_CostCenter it _CostCenter
_CompanyCodeCurrency it _CompanyCodeCurrency
_GlobalCurrency it _GlobalCurrency
_FreeDefinedCurrency1 it _FreeDefinedCurrency1
_FreeDefinedCurrency2 it _FreeDefinedCurrency2
_FreeDefinedCurrency3 it _FreeDefinedCurrency3
_FreeDefinedCurrency4 it _FreeDefinedCurrency4
_FreeDefinedCurrency5 it _FreeDefinedCurrency5
_FreeDefinedCurrency6 it _FreeDefinedCurrency6
_FreeDefinedCurrency7 it _FreeDefinedCurrency7
_FreeDefinedCurrency8 it _FreeDefinedCurrency8
_CostSourceUnit it _CostSourceUnit
_ControllingArea it _ControllingArea
_BusinessTransactionType it _BusinessTransactionType
_Product it _Product

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_ML_Balance.
-- 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_CalendarDate : calendardate

CREATE VIEW P_ML_Balance AS
SELECT
  it.CompanyCode AS CompanyCode,
  it.Ledger AS Ledger,
  it.GLAccount AS GLAccount,
  it.FiscalYear AS FiscalYear,
  it.AccountingDocument AS AccountingDocument,
  it.LedgerGLLineItem AS LedgerGLLineItem,
  it.Product AS Product,
  it.Material AS Material,
  it.CostEstimate AS CostEstimate,
  it.ChartOfAccounts AS ChartOfAccounts,
  it.AccountingDocumentType AS AccountingDocumentType,
  it.ValuationArea AS ValuationArea,
  it.InventoryValuationType AS InventoryValuationType,
  it.FiscalPeriod AS FiscalPeriod,
  it.LedgerFiscalYear AS LedgerFiscalYear,
  it.PostingDate AS PostingDate,
  it.MatlDocLatestPostgDate AS MatlDocLatestPostgDate,
  it.ReferenceDocument AS ReferenceDocument,
  it.BusinessTransactionType AS BusinessTransactionType,
  it.DocumentDate AS DocumentDate,
  it.ProfitCenter AS ProfitCenter,
  it.CostCenter AS CostCenter,
  it.Segment AS Segment,
  it.AccountingDocCreatedByUser AS AccountingDocCreatedByUser,
  it.LastChangeDateTime AS LastChangeDateTime,
  it.FiscalYearPeriod AS FiscalYearPeriod,
  it.FiscalYearVariant AS FiscalYearVariant,
  it.ReferenceDocumentType AS ReferenceDocumentType,
  it.PurchasingDocument AS PurchasingDocument,
  it.ProductionOrder AS ProductionOrder,
  it.TransactionTypeDetermination AS TransactionTypeDetermination,
  _Material.MaterialGroup AS MaterialGroup,
  _Material.MaterialGroup AS ProductGroup,
  it.MaterialValuationClass AS MaterialValuationClass,
  it.InventoryValuationCategory AS InventoryValuationCategory,
  it.ControllingArea AS ControllingArea,
  case when _ValuationAreaType.ValuationAreaType = '1' then it.ValuationArea else it.Plant end as Plant AS PlantendasPlant,
  it.MaterialLedgerProcessType AS MaterialLedgerProcessType,
  it.MaterialLedgerCategory AS MaterialLedgerCategory,
  it.IsSupplierStockValuation AS IsSupplierStockValuation,
  it.InventorySpecialStockValnType AS InventorySpecialStockValnType,
  it.InventorySpclStkSalesDocument AS InventorySpclStkSalesDocument,
  it.InventorySpclStkSalesDocItm AS InventorySpclStkSalesDocItm,
  it.InvtrySpclStockWBSElmntIntID AS InvtrySpclStockWBSElmntIntID,
  it.InventorySpecialStockSupplier AS InventorySpecialStockSupplier,
  it.CompanyCodeCurrencyRole AS CompanyCodeCurrencyRole,
  it.GlobalCurrencyRole AS GlobalCurrencyRole,
  it.FreeDefinedCurrency1Role AS FreeDefinedCurrency1Role,
  it.FreeDefinedCurrency2Role AS FreeDefinedCurrency2Role,
  it.FreeDefinedCurrency3Role AS FreeDefinedCurrency3Role,
  it.FreeDefinedCurrency4Role AS FreeDefinedCurrency4Role,
  it.FreeDefinedCurrency5Role AS FreeDefinedCurrency5Role,
  it.FreeDefinedCurrency6Role AS FreeDefinedCurrency6Role,
  it.FreeDefinedCurrency7Role AS FreeDefinedCurrency7Role,
  it.FreeDefinedCurrency8Role AS FreeDefinedCurrency8Role,
  it.CompanyCodeCurrency AS CompanyCodeCurrency,
  it.SlsPriceAmountInCoCodeCrcy AS SlsPriceAmountInCoCodeCrcy,
  it.GroupCurrency AS GroupCurrency,
  it.FreeDefinedCurrency1 AS FreeDefinedCurrency1,
  it.FreeDefinedCurrency2 AS FreeDefinedCurrency2,
  it.FreeDefinedCurrency3 AS FreeDefinedCurrency3,
  it.FreeDefinedCurrency4 AS FreeDefinedCurrency4,
  it.FreeDefinedCurrency5 AS FreeDefinedCurrency5,
  it.FreeDefinedCurrency6 AS FreeDefinedCurrency6,
  it.FreeDefinedCurrency7 AS FreeDefinedCurrency7,
  it.FreeDefinedCurrency8 AS FreeDefinedCurrency8,
  it.CostSourceUnit AS BaseUnit,
  it.CostSourceUnit AS CostSourceUnit,
  it.InventoryQty AS InventoryQty,
  it._GLAccountInChartOfAccounts AS _GLAccountInChartOfAccounts,
  it._ChartOfAccounts AS _ChartOfAccounts,
  it._Segment AS _Segment,
  it._CompanyCode AS _CompanyCode,
  it._Ledger AS _Ledger,
  it._ProfitCenter AS _ProfitCenter,
  it._CostCenter AS _CostCenter,
  it._CompanyCodeCurrency AS _CompanyCodeCurrency,
  it._GlobalCurrency AS _GlobalCurrency,
  it._FreeDefinedCurrency1 AS _FreeDefinedCurrency1,
  it._FreeDefinedCurrency2 AS _FreeDefinedCurrency2,
  it._FreeDefinedCurrency3 AS _FreeDefinedCurrency3,
  it._FreeDefinedCurrency4 AS _FreeDefinedCurrency4,
  it._FreeDefinedCurrency5 AS _FreeDefinedCurrency5,
  it._FreeDefinedCurrency6 AS _FreeDefinedCurrency6,
  it._FreeDefinedCurrency7 AS _FreeDefinedCurrency7,
  it._FreeDefinedCurrency8 AS _FreeDefinedCurrency8,
  it._CostSourceUnit AS _CostSourceUnit,
  it._ControllingArea AS _ControllingArea,
  it._BusinessTransactionType AS _BusinessTransactionType,
  it._Product AS _Product
FROM P_ML_Balance_Bcf
LEFT OUTER JOIN I_ValuationAreaType AS _ValuationAreaType ON _ValuationAreaType.ValuationAreaType = '1'  -- association [0..1]
LEFT OUTER JOIN I_Material AS _Material ON _Material.Material = it.Material  -- association [0..1]
;