P_ML_Balance_Bcf

DDL: P_ML_BALANCE_BCF Type: view_entity COMPOSITE Package: FINS_ML_VDM

Balance Summary for ML

P_ML_Balance_Bcf is a Composite CDS View that provides data about "Balance Summary for ML" in SAP S/4HANA. It reads from 2 data sources (I_GLAccountLineItemRawData, P_ML_CoCode_Ledger_BCF) and exposes 90 fields with key fields CompanyCode, Ledger, GLAccount, FiscalYear, AccountingDocument. It has 2 associations to related views. Part of development package FINS_ML_VDM.

Data Sources (2)

SourceAliasJoin Type
I_GLAccountLineItemRawData it from
P_ML_CoCode_Ledger_BCF P_ML_CoCode_Ledger_BCF inner

Parameters (1)

NameTypeDefault
P_CalendarDate calendardate

Associations (2)

CardinalityTargetAliasCondition
[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 (3)

NameValueLevelField
VDM.viewType #COMPOSITE view
VDM.private true view
AccessControl.authorizationCheck #NOT_REQUIRED view

Fields (90)

KeyFieldSource TableSource FieldDescription
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
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
@VDM: {
  viewType: #COMPOSITE,
  private:true
}
@AccessControl.authorizationCheck: #NOT_REQUIRED
define view entity P_ML_Balance_Bcf
  with parameters
    P_CalendarDate : calendardate

  as select from I_GLAccountLineItemRawData as it
  
    inner join P_ML_CoCode_Ledger_BCF(P_CalendarDate : $parameters.P_CalendarDate ) as ml  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,

      //----------------------------------------

      //KEY FIGURES

      //----------------------------------------

      it.CompanyCodeCurrency,
      @Semantics: { amount : {currencyCode: 'CompanyCodeCurrency'} }
      it.AmountInCompanyCodeCurrency,
      @Semantics: { amount : {currencyCode: 'CompanyCodeCurrency'} }
      it.SlsPriceAmountInCoCodeCrcy,

      it.GlobalCurrency                             as GroupCurrency,
      @Semantics: { amount : {currencyCode: 'GroupCurrency'} }
      it.AmountInGlobalCurrency                     as AmountInGroupCurrency,

      it.FreeDefinedCurrency1,
      @Semantics: { amount : {currencyCode: 'FreeDefinedCurrency1'} }
      it.AmountInFreeDefinedCurrency1,

      it.FreeDefinedCurrency2,
      @Semantics: { amount : {currencyCode: 'FreeDefinedCurrency2'} }
      it.AmountInFreeDefinedCurrency2,

      it.FreeDefinedCurrency3,
      @Semantics: { amount : {currencyCode: 'FreeDefinedCurrency3'} }
      it.AmountInFreeDefinedCurrency3,

      it.FreeDefinedCurrency4,
      @Semantics: { amount : {currencyCode: 'FreeDefinedCurrency4'} }
      it.AmountInFreeDefinedCurrency4,

      it.FreeDefinedCurrency5,
      @Semantics: { amount : {currencyCode: 'FreeDefinedCurrency5'} }
      it.AmountInFreeDefinedCurrency5,

      it.FreeDefinedCurrency6,
      @Semantics: { amount : {currencyCode: 'FreeDefinedCurrency6'} }
      it.AmountInFreeDefinedCurrency6,

      it.FreeDefinedCurrency7,
      @Semantics: { amount : {currencyCode: 'FreeDefinedCurrency7'} }
      it.AmountInFreeDefinedCurrency7,

      it.FreeDefinedCurrency8,
      @Semantics: { amount : {currencyCode: 'FreeDefinedCurrency8'} }
      it.AmountInFreeDefinedCurrency8,

      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'