P_ML_Balance_Bcf
P_ML_Balance_Bcf is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (I_GLAccountLineItemRawData, P_ML_CoCode_Ledger_BCF) and exposes 100 fields with key fields CompanyCode, Ledger, GLAccount, FiscalYear, AccountingDocument. It has 2 associations to related views.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| I_GLAccountLineItemRawData | it | inner |
| P_ML_CoCode_Ledger_BCF | P_ML_CoCode_Ledger_BCF | from |
Parameters (1)
| Name | Type | Default |
|---|---|---|
| P_CalendarDate | calendardate |
Associations (2)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_MaterialValuation | _MaterialValuation | _MaterialValuation.CostEstimate = it.CostEstimate and _MaterialValuation.Material = it.Product and _MaterialValuation.ValuationArea = it.ValuationArea |
| [0..1] | I_BusinessTransactionType | _BusinessTransactionType | _BusinessTransactionType.BusinessTransactionType = it.BusinessTransactionType |
Annotations (7)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PMLBALBCF | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| VDM.viewType | #COMPOSITE | view | |
| VDM.private | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view |
Fields (100)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CompanyCode | I_GLAccountLineItemRawData | CompanyCode | |
| KEY | Ledger | I_GLAccountLineItemRawData | SourceLedger | |
| KEY | GLAccount | I_GLAccountLineItemRawData | GLAccount | |
| KEY | FiscalYear | I_GLAccountLineItemRawData | FiscalYear | |
| KEY | AccountingDocument | I_GLAccountLineItemRawData | AccountingDocument | |
| KEY | LedgerGLLineItem | I_GLAccountLineItemRawData | LedgerGLLineItem | |
| KEY | Product | I_GLAccountLineItemRawData | Product | |
| Material | I_GLAccountLineItemRawData | Product | ||
| CostEstimate | I_GLAccountLineItemRawData | CostEstimate | ||
| ChartOfAccounts | I_GLAccountLineItemRawData | ChartOfAccounts | ||
| AccountingDocumentType | I_GLAccountLineItemRawData | AccountingDocumentType | ||
| ValuationArea | I_GLAccountLineItemRawData | ValuationArea | ||
| InventoryValuationType | I_GLAccountLineItemRawData | InventoryValuationType | ||
| FiscalPeriod | I_GLAccountLineItemRawData | FiscalPeriod | ||
| FiscalYearVariant | I_GLAccountLineItemRawData | FiscalYearVariant | ||
| LedgerFiscalYear | I_GLAccountLineItemRawData | LedgerFiscalYear | ||
| PostingDate | I_GLAccountLineItemRawData | PostingDate | ||
| MatlDocLatestPostgDate | I_GLAccountLineItemRawData | PostingDate | ||
| ReferenceDocument | I_GLAccountLineItemRawData | ReferenceDocument | ||
| ReferenceDocumentType | I_GLAccountLineItemRawData | ReferenceDocumentType | ||
| BusinessTransactionType | I_GLAccountLineItemRawData | BusinessTransactionType | ||
| DocumentDate | I_GLAccountLineItemRawData | DocumentDate | ||
| ProfitCenter | I_GLAccountLineItemRawData | ProfitCenter | ||
| CostCenter | I_GLAccountLineItemRawData | CostCenter | ||
| Segment | I_GLAccountLineItemRawData | Segment | ||
| AccountingDocCreatedByUser | I_GLAccountLineItemRawData | AccountingDocCreatedByUser | ||
| LastChangeDateTime | I_GLAccountLineItemRawData | LastChangeDateTime | ||
| FiscalYearPeriod | I_GLAccountLineItemRawData | FiscalYearPeriod | ||
| PurchasingDocument | I_GLAccountLineItemRawData | PurchasingDocument | ||
| ProductionOrder | I_GLAccountLineItemRawData | OrderID | ||
| TransactionTypeDetermination | I_GLAccountLineItemRawData | TransactionTypeDetermination | ||
| MaterialGroup | I_GLAccountLineItemRawData | ProductGroup | ||
| ProductGroup | I_GLAccountLineItemRawData | ProductGroup | ||
| MaterialValuationClass | _MaterialValuation | MaterialValuationClass | ||
| InventoryValuationCategory | _MaterialValuation | InventoryValuationCategory | ||
| ControllingArea | I_GLAccountLineItemRawData | ControllingArea | ||
| Plant | I_GLAccountLineItemRawData | Plant | ||
| MaterialLedgerProcessType | I_GLAccountLineItemRawData | MaterialLedgerProcessType | ||
| MaterialLedgerCategory | I_GLAccountLineItemRawData | MaterialLedgerCategory | ||
| IsSupplierStockValuation | I_GLAccountLineItemRawData | IsSupplierStockValuation | ||
| InventorySpecialStockValnType | I_GLAccountLineItemRawData | InventorySpecialStockValnType | ||
| InventorySpclStkSalesDocument | I_GLAccountLineItemRawData | InventorySpclStkSalesDocument | ||
| InventorySpclStkSalesDocItm | I_GLAccountLineItemRawData | InventorySpclStkSalesDocItm | ||
| InvtrySpclStockWBSElmntIntID | I_GLAccountLineItemRawData | InvtrySpclStockWBSElmntIntID | ||
| InventorySpecialStockSupplier | I_GLAccountLineItemRawData | InventorySpecialStockSupplier | ||
| FromFiscalYear | ml | FromFiscalYear | ||
| CompanyCodeCurrencyRole | ml | CompanyCodeCurrencyRole | ||
| GlobalCurrencyRole | ml | GlobalCurrencyRole | ||
| FreeDefinedCurrency1Role | ml | FreeDefinedCurrency1Role | ||
| FreeDefinedCurrency2Role | ml | FreeDefinedCurrency2Role | ||
| FreeDefinedCurrency3Role | ml | FreeDefinedCurrency3Role | ||
| FreeDefinedCurrency4Role | ml | FreeDefinedCurrency4Role | ||
| FreeDefinedCurrency5Role | ml | FreeDefinedCurrency5Role | ||
| FreeDefinedCurrency6Role | ml | FreeDefinedCurrency6Role | ||
| FreeDefinedCurrency7Role | ml | FreeDefinedCurrency7Role | ||
| FreeDefinedCurrency8Role | ml | FreeDefinedCurrency8Role | ||
| CompanyCodeCurrency | I_GLAccountLineItemRawData | CompanyCodeCurrency | ||
| AmountInCompanyCodeCurrency | I_GLAccountLineItemRawData | AmountInCompanyCodeCurrency | ||
| SlsPriceAmountInCoCodeCrcy | I_GLAccountLineItemRawData | SlsPriceAmountInCoCodeCrcy | ||
| GroupCurrency | I_GLAccountLineItemRawData | GlobalCurrency | ||
| AmountInGroupCurrency | I_GLAccountLineItemRawData | AmountInGlobalCurrency | ||
| FreeDefinedCurrency1 | I_GLAccountLineItemRawData | FreeDefinedCurrency1 | ||
| AmountInFreeDefinedCurrency1 | I_GLAccountLineItemRawData | AmountInFreeDefinedCurrency1 | ||
| FreeDefinedCurrency2 | I_GLAccountLineItemRawData | FreeDefinedCurrency2 | ||
| AmountInFreeDefinedCurrency2 | I_GLAccountLineItemRawData | AmountInFreeDefinedCurrency2 | ||
| FreeDefinedCurrency3 | I_GLAccountLineItemRawData | FreeDefinedCurrency3 | ||
| AmountInFreeDefinedCurrency3 | I_GLAccountLineItemRawData | AmountInFreeDefinedCurrency3 | ||
| FreeDefinedCurrency4 | I_GLAccountLineItemRawData | FreeDefinedCurrency4 | ||
| AmountInFreeDefinedCurrency4 | I_GLAccountLineItemRawData | AmountInFreeDefinedCurrency4 | ||
| FreeDefinedCurrency5 | I_GLAccountLineItemRawData | FreeDefinedCurrency5 | ||
| AmountInFreeDefinedCurrency5 | I_GLAccountLineItemRawData | AmountInFreeDefinedCurrency5 | ||
| FreeDefinedCurrency6 | I_GLAccountLineItemRawData | FreeDefinedCurrency6 | ||
| AmountInFreeDefinedCurrency6 | I_GLAccountLineItemRawData | AmountInFreeDefinedCurrency6 | ||
| FreeDefinedCurrency7 | I_GLAccountLineItemRawData | FreeDefinedCurrency7 | ||
| AmountInFreeDefinedCurrency7 | I_GLAccountLineItemRawData | AmountInFreeDefinedCurrency7 | ||
| FreeDefinedCurrency8 | I_GLAccountLineItemRawData | FreeDefinedCurrency8 | ||
| AmountInFreeDefinedCurrency8 | I_GLAccountLineItemRawData | AmountInFreeDefinedCurrency8 | ||
| CostSourceUnit | I_GLAccountLineItemRawData | CostSourceUnit | ||
| InventoryQty | I_GLAccountLineItemRawData | ValuationQuantity | ||
| _GLAccountInChartOfAccounts | I_GLAccountLineItemRawData | _GLAccountInChartOfAccounts | ||
| _ChartOfAccounts | I_GLAccountLineItemRawData | _ChartOfAccounts | ||
| _Segment | I_GLAccountLineItemRawData | _Segment | ||
| _CompanyCode | I_GLAccountLineItemRawData | _CompanyCode | ||
| _Ledger | I_GLAccountLineItemRawData | _Ledger | ||
| _ProfitCenter | I_GLAccountLineItemRawData | _ProfitCenter | ||
| _CostCenter | I_GLAccountLineItemRawData | _CostCenter | ||
| _CompanyCodeCurrency | I_GLAccountLineItemRawData | _CompanyCodeCurrency | ||
| _GlobalCurrency | I_GLAccountLineItemRawData | _GlobalCurrency | ||
| _FreeDefinedCurrency1 | I_GLAccountLineItemRawData | _FreeDefinedCurrency1 | ||
| _FreeDefinedCurrency2 | I_GLAccountLineItemRawData | _FreeDefinedCurrency2 | ||
| _FreeDefinedCurrency3 | I_GLAccountLineItemRawData | _FreeDefinedCurrency3 | ||
| _FreeDefinedCurrency4 | I_GLAccountLineItemRawData | _FreeDefinedCurrency4 | ||
| _FreeDefinedCurrency5 | I_GLAccountLineItemRawData | _FreeDefinedCurrency5 | ||
| _FreeDefinedCurrency6 | I_GLAccountLineItemRawData | _FreeDefinedCurrency6 | ||
| _FreeDefinedCurrency7 | I_GLAccountLineItemRawData | _FreeDefinedCurrency7 | ||
| _FreeDefinedCurrency8 | I_GLAccountLineItemRawData | _FreeDefinedCurrency8 | ||
| _CostSourceUnit | I_GLAccountLineItemRawData | _CostSourceUnit | ||
| _ControllingArea | I_GLAccountLineItemRawData | _ControllingArea | ||
| _Product | I_GLAccountLineItemRawData | _Product | ||
| _BusinessTransactionType | _BusinessTransactionType |
@AbapCatalog: {
sqlViewName: 'PMLBALBCF',
compiler.compareFilter:true,
preserveKey:true
}
@VDM: {
viewType: #COMPOSITE,
private:true
}
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
define view P_ML_Balance_Bcf
with parameters
P_CalendarDate : calendardate
as select from P_ML_CoCode_Ledger_BCF(P_CalendarDate : $parameters.P_CalendarDate ) as ml
inner join I_GLAccountLineItemRawData as it on it.CompanyCode = ml.CompanyCode
and it.SourceLedger = ml.Ledger
association [0..1] to I_MaterialValuation as _MaterialValuation on _MaterialValuation.CostEstimate = it.CostEstimate
and _MaterialValuation.Material = it.Product
and _MaterialValuation.ValuationArea = it.ValuationArea
association [0..1] to I_BusinessTransactionType as _BusinessTransactionType on _BusinessTransactionType.BusinessTransactionType = it.BusinessTransactionType
{
key it.CompanyCode,
key it.SourceLedger as Ledger,
key it.GLAccount,
key it.FiscalYear,
key it.AccountingDocument,
key it.LedgerGLLineItem,
key it.Product,
@VDM.lifecycle: {
status: #DEPRECATED,
successor: 'Product' }
it.Product as Material,
it.CostEstimate,
it.ChartOfAccounts,
it.AccountingDocumentType,
it.ValuationArea,
it.InventoryValuationType,
it.FiscalPeriod,
it.FiscalYearVariant,
it.LedgerFiscalYear,
it.PostingDate,
it.PostingDate as MatlDocLatestPostgDate,
it.ReferenceDocument,
it.ReferenceDocumentType,
it.BusinessTransactionType,
it.DocumentDate,
it.ProfitCenter,
it.CostCenter,
it.Segment,
it.AccountingDocCreatedByUser,
it.LastChangeDateTime,
it.FiscalYearPeriod,
it.PurchasingDocument,
it.OrderID as ProductionOrder,
it.TransactionTypeDetermination,
@VDM.lifecycle: {
status: #DEPRECATED,
successor: 'ProductGroup' }
it.ProductGroup as MaterialGroup,
it.ProductGroup as ProductGroup,
_MaterialValuation.MaterialValuationClass as MaterialValuationClass,
_MaterialValuation.InventoryValuationCategory as InventoryValuationCategory,
it.ControllingArea,
it.Plant,
it.MaterialLedgerProcessType,
it.MaterialLedgerCategory,
it.IsSupplierStockValuation,
it.InventorySpecialStockValnType,
it.InventorySpclStkSalesDocument,
it.InventorySpclStkSalesDocItm,
it.InvtrySpclStockWBSElmntIntID,
it.InventorySpecialStockSupplier,
ml.FromFiscalYear,
ml.CompanyCodeCurrencyRole,
ml.GlobalCurrencyRole,
ml.FreeDefinedCurrency1Role,
ml.FreeDefinedCurrency2Role,
ml.FreeDefinedCurrency3Role,
ml.FreeDefinedCurrency4Role,
ml.FreeDefinedCurrency5Role,
ml.FreeDefinedCurrency6Role,
ml.FreeDefinedCurrency7Role,
ml.FreeDefinedCurrency8Role,
//----------------------------------------
//KEY FIGURES
//----------------------------------------
@Semantics.currencyCode:true
it.CompanyCodeCurrency,
@Semantics: { amount : {currencyCode: 'CompanyCodeCurrency'} }
it.AmountInCompanyCodeCurrency,
@Semantics: { amount : {currencyCode: 'CompanyCodeCurrency'} }
it.SlsPriceAmountInCoCodeCrcy,
@Semantics.currencyCode:true
it.GlobalCurrency as GroupCurrency,
@Semantics: { amount : {currencyCode: 'GroupCurrency'} }
it.AmountInGlobalCurrency as AmountInGroupCurrency,
@Semantics.currencyCode:true
it.FreeDefinedCurrency1,
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency1'} }
it.AmountInFreeDefinedCurrency1,
@Semantics.currencyCode:true
it.FreeDefinedCurrency2,
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency2'} }
it.AmountInFreeDefinedCurrency2,
@Semantics.currencyCode:true
it.FreeDefinedCurrency3,
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency3'} }
it.AmountInFreeDefinedCurrency3,
@Semantics.currencyCode:true
it.FreeDefinedCurrency4,
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency4'} }
it.AmountInFreeDefinedCurrency4,
@Semantics.currencyCode:true
it.FreeDefinedCurrency5,
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency5'} }
it.AmountInFreeDefinedCurrency5,
@Semantics.currencyCode:true
it.FreeDefinedCurrency6,
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency6'} }
it.AmountInFreeDefinedCurrency6,
@Semantics.currencyCode:true
it.FreeDefinedCurrency7,
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency7'} }
it.AmountInFreeDefinedCurrency7,
@Semantics.currencyCode:true
it.FreeDefinedCurrency8,
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency8'} }
it.AmountInFreeDefinedCurrency8,
@Semantics.unitOfMeasure:true
it.CostSourceUnit,
@Semantics: { quantity : {unitOfMeasure: 'CostSourceUnit'} }
it.ValuationQuantity as InventoryQty,
//----------------------------------------
//Associations
//----------------------------------------
it._GLAccountInChartOfAccounts,
it._ChartOfAccounts,
it._Segment,
it._CompanyCode,
it._Ledger,
it._ProfitCenter,
it._CostCenter,
it._CompanyCodeCurrency,
it._GlobalCurrency,
it._FreeDefinedCurrency1,
it._FreeDefinedCurrency2,
it._FreeDefinedCurrency3,
it._FreeDefinedCurrency4,
it._FreeDefinedCurrency5,
it._FreeDefinedCurrency6,
it._FreeDefinedCurrency7,
it._FreeDefinedCurrency8,
it._CostSourceUnit,
it._ControllingArea,
it._Product,
_BusinessTransactionType
}
where
it.TransactionTypeDetermination = 'BSX'
and it.CostEstimate > '000000000000'
and it.GLRecordType = '0'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_GLACCOUNTLINEITEMRAWDATA",
"I_MATERIALVALUATION",
"P_ML_COCODE_LEDGER_BCF"
],
"ASSOCIATED":
[
"I_BUSINESSTRANSACTIONTYPE",
"I_CHARTOFACCOUNTS",
"I_COMPANYCODE",
"I_CONTROLLINGAREA",
"I_COSTCENTER",
"I_CURRENCY",
"I_GLACCOUNTINCHARTOFACCOUNTS",
"I_LEDGER",
"I_MATERIALVALUATION",
"I_PRODUCT",
"I_PROFITCENTER",
"I_SEGMENT",
"I_UNITOFMEASURE"
],
"BASE":
[
"I_GLACCOUNTLINEITEMRAWDATA"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
Learn More
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Annotations — A Complete Guide
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA