P_ML_COCODE_LEDGER_BCF

CDS View

P_ML_COCODE_LEDGER_BCF is a CDS View in S/4HANA. 1 CDS views read from this table.

CDS Views using this table (1)

ViewTypeJoinVDMDescription
P_ML_Balance_Bcf view from COMPOSITE
@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #NOT_REQUIRED
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.usageType:{
  serviceQuality: #X,
  sizeCategory: #S,
  dataClass: #MIXED
}
@VDM: {
  viewType: #COMPOSITE,
  private:true }

define view entity P_ML_CoCode_Ledger_BCF 
   with parameters
    P_CalendarDate : calendardate
  as select from            I_LedgerCompanyCodeCrcyRoles as f
   

    left outer to one join  I_Distinct_Postingdate       as dp      on  dp.FiscalYearVariant = f.FiscalYearVariant
                                                                    and dp.CalendarDate      = $parameters.P_CalendarDate
                                                                    and dp.IsSpecialPeriod = ' '

    left outer to one join  I_LastBalanceCarryForward    as bcf     on  bcf.CompanyCode = f.CompanyCode
                                                                    and bcf.Ledger      = f.Ledger

    left outer to many join I_MatlLedgerValnCrcyRoleName as _CurtpH on  f.CompanyCode             = _CurtpH.CompanyCode
                                                                    and f.CompanyCodeCurrencyRole = _CurtpH.CurrencyRole
                                                                    and f.Ledger                  = _CurtpH.Ledger

    left outer to many join I_MatlLedgerValnCrcyRoleName as _CurtpK on  f.CompanyCode        = _CurtpK.CompanyCode
                                                                    and f.GlobalCurrencyRole = _CurtpK.CurrencyRole
                                                                    and f.Ledger             = _CurtpK.Ledger

    left outer to many join I_MatlLedgerValnCrcyRoleName as _CurtpO on  f.CompanyCode              = _CurtpO.CompanyCode
                                                                    and f.FreeDefinedCurrency1Role = _CurtpO.CurrencyRole
                                                                    and f.Ledger                   = _CurtpO.Ledger

    left outer to many join I_MatlLedgerValnCrcyRoleName as _CurtpV on  f.CompanyCode              = _CurtpV.CompanyCode
                                                                    and f.FreeDefinedCurrency2Role = _CurtpV.CurrencyRole
                                                                    and f.Ledger                   = _CurtpV.Ledger

    left outer to many join I_MatlLedgerValnCrcyRoleName as _CurtpB on  f.CompanyCode              = _CurtpB.CompanyCode
                                                                    and f.FreeDefinedCurrency3Role = _CurtpB.CurrencyRole
                                                                    and f.Ledger                   = _CurtpB.Ledger

    left outer to many join I_MatlLedgerValnCrcyRoleName as _CurtpC on  f.CompanyCode              = _CurtpC.CompanyCode
                                                                    and f.FreeDefinedCurrency4Role = _CurtpC.CurrencyRole
                                                                    and f.Ledger                   = _CurtpC.Ledger
    
    left outer to many join I_MatlLedgerValnCrcyRoleName as _CurtpD on  f.CompanyCode              = _CurtpD.CompanyCode
                                                                    and f.FreeDefinedCurrency5Role = _CurtpD.CurrencyRole
                                                                    and f.Ledger                   = _CurtpD.Ledger

    left outer to many join I_MatlLedgerValnCrcyRoleName as _CurtpE on  f.CompanyCode              = _CurtpE.CompanyCode
                                                                    and f.FreeDefinedCurrency6Role = _CurtpE.CurrencyRole
                                                                    and f.Ledger                   = _CurtpE.Ledger

    left outer to many join I_MatlLedgerValnCrcyRoleName as _CurtpF on  f.CompanyCode              = _CurtpF.CompanyCode
                                                                    and f.FreeDefinedCurrency7Role = _CurtpF.CurrencyRole
                                                                    and f.Ledger                   = _CurtpF.Ledger

    left outer to many join I_MatlLedgerValnCrcyRoleName as _CurtpG on  f.CompanyCode              = _CurtpG.CompanyCode
                                                                    and f.FreeDefinedCurrency8Role = _CurtpG.CurrencyRole
                                                                    and f.Ledger                   = _CurtpG.Ledger
{
  key f.CompanyCode,
  key f.Ledger,
      f.FiscalYearVariant,
      
      _CurtpH.CurrencyRole as CompanyCodeCurrencyRole,
      _CurtpK.CurrencyRole as GlobalCurrencyRole,
      _CurtpO.CurrencyRole as FreeDefinedCurrency1Role,
      _CurtpV.CurrencyRole as FreeDefinedCurrency2Role,
      _CurtpB.CurrencyRole as FreeDefinedCurrency3Role,
      _CurtpC.CurrencyRole as FreeDefinedCurrency4Role,
      _CurtpD.CurrencyRole as FreeDefinedCurrency5Role,
      _CurtpE.CurrencyRole as FreeDefinedCurrency6Role,
      _CurtpF.CurrencyRole as FreeDefinedCurrency7Role,
      _CurtpG.CurrencyRole as FreeDefinedCurrency8Role,

      case
        when bcf.BalanceCarryforwardToYear is null
          then '0000'
        when dp.FiscalYear is null
          then bcf.BalanceCarryforwardToYear
        when bcf.BalanceCarryforwardToYear > dp.FiscalYear
          then dp.FiscalYear
        else bcf.BalanceCarryforwardToYear
      end                  as FromFiscalYear
}
where _CurtpH.CurrencyRole is not null
   or _CurtpK.CurrencyRole is not null
   or _CurtpO.CurrencyRole is not null
   or _CurtpV.CurrencyRole is not null
   or _CurtpB.CurrencyRole is not null
   or _CurtpC.CurrencyRole is not null
   or _CurtpD.CurrencyRole is not null
   or _CurtpE.CurrencyRole is not null
   or _CurtpF.CurrencyRole is not null
   or _CurtpG.CurrencyRole is not null
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_DISTINCT_POSTINGDATE",
"I_LASTBALANCECARRYFORWARD",
"I_LEDGERCOMPANYCODECRCYROLES",
"I_MATLLEDGERVALNCRCYROLENAME"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/