I_ML_Balance

DDL: I_ML_BALANCE Type: view COMPOSITE

Balance Summary for Material Ledger

I_ML_Balance (Composite)

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

Accounting and Financial Close

I_ML_Balance is a Composite CDS View (Cube) that provides data about "Balance Summary for Material Ledger" in SAP S/4HANA. It reads from 1 data source (P_ML_Balance) and exposes 88 fields with key fields CompanyCode, Ledger, GLAccount, FiscalYear, AccountingDocument. It has 5 associations to related views.

SAP Help Documentation

CategoryCDS Views for Inventory Accounting
Data CategoryCube
Purpose
This CDS view provides material inventory relevant journal entry items per key date and company code, ledger, G/L account. This CDS view provides the data to answer the following business questions: What are the quantities and values per journal entry item that were posted to a material inventory account up to the specified key date? 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: BUKRS_GLRLDNR_GLRRCTY_GLRVERS (Company Code/Ledger/Record Type/Version) BWKEY (Valuation Area) BUKRS (Company Code) 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: P_CalendarDate : This parameter is used to specify the date on which the journal entry items relevant for material inventory are provided. Important Fields Important fields in this view include the following: Field Name Description CompanyCode Company Code Ledger Source Ledger GLAccount G/L Account FiscalYear Fiscal Year AccountingDocument Journal Entry LedgerGLLineItem Journal Entry Item Material Product

Constraints
You should regularly post the balance carryforwards at the end of the year. As a result, the CDS view provides the balance carryforward record for past years, that is, an aggregation of the line items per account and material, and not the individual line items. This improves performance and ensures that you can run the Material Inventory Values – Balance Summary app (ID: F1422 ) even if documents from older fiscal years have already been archived. Note At least one element of this CDS view was deprecated with SAP S/4HANA Cloud Public Edition 2102. We recommend that you switch to the following successor elements: Deprecated Element Successor Element MatlDocLatestPostgDate PostingDate For more information about the deprecation process for CDS views, see Deprecated and Decommissioned CDS Views .

View on SAP Help Portal →

SAP API Hub

StateC1
Line of BusinessAccounting and Financial Close
Application ComponentFI-FIO-GL-IS
CapabilitiesData Source in SQL Select, Data Provider for Analytical Queries, Data Source for Defining CDS Entities
PackageAccounting and Financial Close for SAP S/4HANA Cloud Private Edition

Documentation

Data Sources (1)

SourceAliasJoin Type
P_ML_Balance P_ML_Balance from

Parameters (1)

NameTypeDefault
P_CalendarDate calendardate

Associations (5)

CardinalityTargetAliasCondition
[0..1] I_ProductHierarchy _ProductHierarchy $projection.ProductHierarchy = _ProductHierarchy.ProductHierarchy
[0..1] I_Plant _Plant $projection.Plant = _Plant.Plant
[0..1] I_MaterialGroup _MaterialGroup $projection.MaterialGroup = _MaterialGroup.MaterialGroup
[0..1] I_UnitOfMeasure _CostSourceUnit $projection.BaseUnit = _CostSourceUnit.UnitOfMeasure
[0..1] I_Product _Product $projection.Material = _Product.Product

Annotations (14)

NameValueLevelField
AbapCatalog.sqlViewName IMLBALANCE view
AbapCatalog.compiler.compareFilter true view
VDM.viewType #COMPOSITE view
Analytics.dataCategory #CUBE view
AccessControl.authorizationCheck #CHECK view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.modelingPattern #ANALYTICAL_CUBE view
Search.searchable true view
Metadata.allowExtensions true view
Metadata.ignorePropagatedAnnotations true view
EndUserText.label Balance Summary for Material Ledger view

Fields (88)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode CompanyCode Receiver Company Code
KEY Ledger Ledger Source Ledger
KEY GLAccount GLAccount General Ledger
KEY FiscalYear FiscalYear G/L Fiscal Year
KEY AccountingDocument AccountingDocument Journal Entry
KEY LedgerGLLineItem LedgerGLLineItem General Ledger Journal Entry Line Item
KEY Material Material Product Number
Product Product Product Number
CostEstimate CostEstimate Cost EstimateNo
ChartOfAccounts ChartOfAccounts Chart of Accounts
AccountingDocumentType AccountingDocumentType Journal Entry Type
ValuationArea ValuationArea Valuation Area
InventoryValuationType InventoryValuationType Inventory Valuation Type
FiscalPeriod FiscalPeriod Fiscal Period
LedgerFiscalYear LedgerFiscalYear Fiscal Year of Ledger
PostingDate PostingDate Posting Date for GR
MatlDocLatestPostgDate MatlDocLatestPostgDate Posting Date
ReferenceDocument ReferenceDocument Reference Doc. Number
BusinessTransactionType BusinessTransactionType Business Transaction Type
BusinessTransactionTypeName Business Transaction Type Name
ProductHierarchy _ProductHierarchy ProductHierarchy Product Hierarchy
DocumentDate DocumentDate Journal Entry Date
ProfitCenter ProfitCenter Profit Center
CostCenter CostCenter Cost Center
Segment Segment Segment for Segmental Reporting
AccountingDocCreatedByUser AccountingDocCreatedByUser User which created overhead document
LastChangeDateTime LastChangeDateTime Last Change Date Time
FiscalYearPeriod FiscalYearPeriod Fiscal Year Period
FiscalYearVariant FiscalYearVariant Fiscal Year Variant
ReferenceDocumentType ReferenceDocumentType Reference Document Type
PurchasingDocument PurchasingDocument Purchasing Document
ProductionOrder ProductionOrder Order ID
TransactionTypeDetermination TransactionTypeDetermination Transaction Key
MaterialGroup MaterialGroup Material Group
MaterialValuationClass MaterialValuationClass Valuation Class
InventoryValuationCategory InventoryValuationCategory Valuation Category
ControllingArea ControllingArea Controlling Area
Plant Plant Valuation Area
MaterialLedgerProcessType MaterialLedgerProcessType Material Ledger Process Type (Procurement/Consumption)
MaterialLedgerCategory MaterialLedgerCategory Category in Material Ledger Update Structure
CompanyCodeCurrency CompanyCodeCurrency Company Code Currency
AmountInCompanyCodeCurrency AmountInCompanyCodeCurrency Amount in Company Code Currency
SlsPriceAmountInCoCodeCrcy SlsPriceAmountInCoCodeCrcy Sales Price Amount in Company Code Currency
GroupCurrency GroupCurrency Global Currency
AmountInGroupCurrency AmountInGroupCurrency Amount in Global Currency
FreeDefinedCurrency1 FreeDefinedCurrency1 Freely Defined Currency 1
AmountInFreeDefinedCurrency1 AmountInFreeDefinedCurrency1 Amount in Freely Defined Currency 1
FreeDefinedCurrency2 FreeDefinedCurrency2 Freely Defined Currency 2
AmountInFreeDefinedCurrency2 AmountInFreeDefinedCurrency2 Amount in Freely Defined Currency 2
FreeDefinedCurrency3 FreeDefinedCurrency3 Freely Defined Currency 3
AmountInFreeDefinedCurrency3 AmountInFreeDefinedCurrency3 Amount in Freely Defined Currency 3
FreeDefinedCurrency4 FreeDefinedCurrency4 Freely Defined Currency 4
AmountInFreeDefinedCurrency4 AmountInFreeDefinedCurrency4 Amount in Freely Defined Currency 4
FreeDefinedCurrency5 FreeDefinedCurrency5 Freely Defined Currency 5
AmountInFreeDefinedCurrency5 AmountInFreeDefinedCurrency5 Amount in Freely Defined Currency 5
FreeDefinedCurrency6 FreeDefinedCurrency6 Freely Defined Currency 6
AmountInFreeDefinedCurrency6 AmountInFreeDefinedCurrency6 Amount in Freely Defined Currency 6
FreeDefinedCurrency7 FreeDefinedCurrency7 Freely Defined Currency 7
AmountInFreeDefinedCurrency7 AmountInFreeDefinedCurrency7 Amount in Freely Defined Currency 7
FreeDefinedCurrency8 FreeDefinedCurrency8 Freely Defined Currency 8
AmountInFreeDefinedCurrency8 AmountInFreeDefinedCurrency8 Amount in Freely Defined Currency 8
BaseUnit BaseUnit Cost Source Unit
InventoryQty InventoryQty Valuation Quantity
_GLAccountInChartOfAccounts _GLAccountInChartOfAccounts
_ChartOfAccounts _ChartOfAccounts
_Segment _Segment
_Material _Material
_CompanyCode _CompanyCode
_ProfitCenter _ProfitCenter
_CostCenter _CostCenter
_Ledger _Ledger
_CompanyCodeCurrency _CompanyCodeCurrency
_GlobalCurrency _GlobalCurrency
_FreeDefinedCurrency1 _FreeDefinedCurrency1
_FreeDefinedCurrency2 _FreeDefinedCurrency2
_FreeDefinedCurrency3 _FreeDefinedCurrency3
_FreeDefinedCurrency4 _FreeDefinedCurrency4
_FreeDefinedCurrency5 _FreeDefinedCurrency5
_FreeDefinedCurrency6 _FreeDefinedCurrency6
_FreeDefinedCurrency7 _FreeDefinedCurrency7
_FreeDefinedCurrency8 _FreeDefinedCurrency8
_CostSourceUnit _CostSourceUnit
_ControllingArea _ControllingArea
_ProductHierarchy _ProductHierarchy
_Plant _Plant
_Product _Product
_BusinessTransactionType _BusinessTransactionType
_MaterialGroup _MaterialGroup

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_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 I_ML_Balance AS
SELECT
  CompanyCode,
  Ledger,
  GLAccount,
  FiscalYear,
  AccountingDocument,
  LedgerGLLineItem,
  Material,
  Product,
  CostEstimate,
  ChartOfAccounts,
  AccountingDocumentType,
  ValuationArea,
  InventoryValuationType,
  FiscalPeriod,
  LedgerFiscalYear,
  PostingDate,
  MatlDocLatestPostgDate,
  ReferenceDocument,
  BusinessTransactionType,
  _BusinessTransactionType._Text[1:Language = $session.system_language].BusinessTransactionTypeName AS BusinessTransactionTypeName,
  _ProductHierarchy.ProductHierarchy AS ProductHierarchy,
  DocumentDate,
  ProfitCenter,
  CostCenter,
  Segment,
  AccountingDocCreatedByUser,
  LastChangeDateTime,
  FiscalYearPeriod,
  FiscalYearVariant,
  ReferenceDocumentType,
  PurchasingDocument,
  ProductionOrder,
  TransactionTypeDetermination,
  MaterialGroup,
  MaterialValuationClass,
  InventoryValuationCategory,
  ControllingArea,
  Plant,
  MaterialLedgerProcessType,
  MaterialLedgerCategory,
  CompanyCodeCurrency,
  AmountInCompanyCodeCurrency,
  SlsPriceAmountInCoCodeCrcy,
  GroupCurrency,
  AmountInGroupCurrency,
  FreeDefinedCurrency1,
  AmountInFreeDefinedCurrency1,
  FreeDefinedCurrency2,
  AmountInFreeDefinedCurrency2,
  FreeDefinedCurrency3,
  AmountInFreeDefinedCurrency3,
  FreeDefinedCurrency4,
  AmountInFreeDefinedCurrency4,
  FreeDefinedCurrency5,
  AmountInFreeDefinedCurrency5,
  FreeDefinedCurrency6,
  AmountInFreeDefinedCurrency6,
  FreeDefinedCurrency7,
  AmountInFreeDefinedCurrency7,
  FreeDefinedCurrency8,
  AmountInFreeDefinedCurrency8,
  BaseUnit,
  InventoryQty
FROM P_ML_Balance
LEFT OUTER JOIN I_ProductHierarchy AS _ProductHierarchy ON ProductHierarchy = _ProductHierarchy.ProductHierarchy  -- association [0..1]
LEFT OUTER JOIN I_Plant AS _Plant ON Plant = _Plant.Plant  -- association [0..1]
LEFT OUTER JOIN I_MaterialGroup AS _MaterialGroup ON MaterialGroup = _MaterialGroup.MaterialGroup  -- association [0..1]
LEFT OUTER JOIN I_UnitOfMeasure AS _CostSourceUnit ON BaseUnit = _CostSourceUnit.UnitOfMeasure  -- association [0..1]
LEFT OUTER JOIN I_Product AS _Product ON Material = _Product.Product  -- association [0..1]
;