I_CN_CADEFixedAssetValueCube

DDL: I_CN_CADEFIXEDASSETVALUECUBE SQL: ICADEASTCUBE Type: view COMPOSITE

Fixed Asset Balance Cube for CADE

I_CN_CADEFixedAssetValueCube is a Composite CDS View (Cube) that provides data about "Fixed Asset Balance Cube for CADE" in SAP S/4HANA. It reads from 13 data sources and exposes 26 fields with key fields CompanyCode, AssetDepreciationArea, MasterFixedAsset, FixedAsset, Ledger. It has 1 association to related views.

Data Sources (13)

SourceAliasJoin Type
I_CN_CADEGeneralInformation AdecConfiguration left_outer
I_GlobAssetAssignment AssetUsageNew left_outer
I_FixedAssetAssgmt AssignmentByFiscalPeriodEnd left_outer
I_AssetValuationForLedger DeprAreaByFiscalPeriodEnd left_outer
I_FixedAssetForLedger FixedAsset inner
I_AssetBalanceCube I_AssetBalanceCube left_outer
I_OrdinaryDeprValAdjmtAccount OrdinaryDeprValAdjmtAccount left_outer
P_CN_CADEAssetChgDoc P_CN_CADEAssetChgDoc left_outer
P_CN_CADEAssetChgDoc P_CN_CADEAssetChgDoc left_outer
P_CN_CADEAssetQuantity P_CN_CADEAssetQuantity left_outer
P_CN_CADECalcExpiredPeriods P_CN_CADECalcExpiredPeriods left_outer
I_FiscalYearPeriodForLedger Period from
I_RevalOrdnryDeprValAdjmtAcct RevalOrdnryDeprValAdjmtAccount left_outer

Parameters (10)

NameTypeDefault
P_CurrencyRole fis_curtp
P_FiscalYear fis_gjahr
P_FromFiscalPeriod fis_period_from
P_ToFiscalPeriod fis_period_to
P_CompanyCode fis_bukrs
P_AssetDepreciationArea fis_afabe
P_AssetAccountingKeyFigureSet faa_key_figure_set
P_Ledger fis_rldnr
P_Language sylangu
P_KeyDate fagl_keydate

Associations (1)

CardinalityTargetAliasCondition
[0..*] I_AssetKeyFigureText _AssetKeyFigureText $projection.AssetAccountingKeyFigure = _AssetKeyFigureText.AssetAccountingKeyFigure

Annotations (15)

NameValueLevelField
VDM.lifecycle.contract.type #PUBLIC_LOCAL_API view
AbapCatalog.preserveKey true view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.sqlViewName ICADEASTCUBE view
Analytics.dataCategory #CUBE view
Analytics.dataExtraction.enabled false view
EndUserText.label Fixed Asset Balance Cube for CADE view
VDM.viewType #COMPOSITE view
AccessControl.authorizationCheck #CHECK view
Metadata.allowExtensions true view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.dataClass #MIXED view
ClientHandling.algorithm #SESSION_VARIABLE view
Metadata.ignorePropagatedAnnotations true view

Fields (26)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode FixedAssetValue CompanyCode
KEY AssetDepreciationArea FixedAssetValue AssetDepreciationArea
KEY MasterFixedAsset I_FixedAssetForLedger MasterFixedAsset
KEY FixedAsset I_FixedAssetForLedger FixedAsset
KEY Ledger FixedAssetValue Ledger
KEY FiscalYear FixedAssetValue FiscalYear
KEY FiscalPeriod
KEY SubLedgerAcctLineItemType FixedAssetValue SubLedgerAcctLineItemType
KEY AssetAcctTransClassfctn FixedAssetValue AssetAcctTransClassfctn
KEY AssetAccountingKeyFigure FixedAssetValue AssetAccountingKeyFigure
KEY AssetAccountingKeyFigureSet FixedAssetValue AssetAccountingKeyFigureSet
KEY FiscalYearPeriod I_FiscalYearPeriodForLedger FiscalYearPeriod
PostingFiscalPeriod I_FiscalYearPeriodForLedger FiscalPeriod
AssetAccountDetermination FixedAssetValue AssetAccountDetermination
ChartOfAccounts FixedAssetValue ChartOfAccounts
ChartOfDepreciation ChartOfDepreciation
AssetAccountingSortedKeyFigure AssetAccountingSortedKeyFigure
CurrencyShortName
AssetClassName
DisplayCurrency DisplayCurrency
AmountInDisplayCurrency AmountInDisplayCurrency
AcqnProdnCostGLAccount
OrdinaryDeprValAdjmtGLAccount
RevalOrdnryDeprValAdjmtGLAcct
AssetClass FixedAssetValue AssetClass
FixedAssetDescription
@VDM.lifecycle.contract.type: #PUBLIC_LOCAL_API
@AbapCatalog.preserveKey: true
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.sqlViewName: 'ICADEASTCUBE'
@Analytics: { dataCategory: #CUBE, dataExtraction.enabled: false }
@EndUserText.label: 'Fixed Asset Balance Cube for CADE'
@VDM.viewType: #COMPOSITE
@AccessControl.authorizationCheck: #CHECK
@Metadata.allowExtensions:true
@ObjectModel: { usageType.serviceQuality: #D,
                usageType.sizeCategory: #XXL,
                usageType.dataClass: #MIXED }
@ClientHandling.algorithm: #SESSION_VARIABLE
@Metadata.ignorePropagatedAnnotations: true
define view I_CN_CADEFixedAssetValueCube
  with parameters
    P_CurrencyRole                : fis_curtp,
    P_FiscalYear                  : fis_gjahr,
    P_FromFiscalPeriod            : fis_period_from,
    P_ToFiscalPeriod              : fis_period_to,
    P_CompanyCode                 : fis_bukrs,
    P_AssetDepreciationArea       : fis_afabe,
    P_AssetAccountingKeyFigureSet : faa_key_figure_set,
    P_Ledger                      : fis_rldnr,
    @Environment.systemField: #SYSTEM_LANGUAGE
    P_Language                    : sylangu,
    @Environment.systemField: #SYSTEM_DATE
    P_KeyDate                     : fagl_keydate
  as select from    I_FiscalYearPeriodForLedger                                                                    as Period
    inner join      I_FixedAssetForLedger                                                                             as FixedAsset                  on  FixedAsset.CompanyCode             = Period.CompanyCode
                                                                                                                                                     and (
                                                                                                                                                        FixedAsset.AssetDeactivationDate    > Period.FiscalPeriodEndDate
                                                                                                                                                        or FixedAsset.AssetDeactivationDate =  '00000000'
                                                                                                                                                      )
                                                                                                                                                     and FixedAsset.AssetCapitalizationDate <= Period.FiscalPeriodEndDate
                                                                                                                                                     and FixedAsset.AssetCapitalizationDate <> '00000000'
    left outer join I_AssetBalanceCube
                    (P_AssetAccountingKeyFigureSet: :P_AssetAccountingKeyFigureSet, P_FiscalYear: :P_FiscalYear,
                    P_FiscalPeriod: :P_ToFiscalPeriod, P_KeyDate: :P_KeyDate) as FixedAssetValue             on  FixedAssetValue.CompanyCode      =  FixedAsset.CompanyCode
                                                                                                                                                     and FixedAssetValue.Ledger           =  FixedAsset.Ledger
                                                                                                                                                     and Period.Ledger                    =  FixedAssetValue.Ledger
                                                                                                                                                     and FixedAssetValue.MasterFixedAsset =  FixedAsset.MasterFixedAsset
                                                                                                                                                     and FixedAssetValue.FixedAsset       =  FixedAsset.FixedAsset
                                                                                                                                                     and Period.FiscalYear                =  FixedAssetValue.FiscalYear
                                                                                                                                                     and (
                                                                                                                                                        Period.FiscalPeriod               >= FixedAssetValue.FiscalPeriod
                                                                                                                                                        or FixedAssetValue.FiscalPeriod   =  '000'
                                                                                                                                                      )
                                                                                                                                                     and FixedAssetValue.CurrencyRole = $parameters.P_CurrencyRole
    left outer join I_FixedAssetAssgmt                                                                                as AssignmentByFiscalPeriodEnd on  FixedAsset.CompanyCode                        = AssignmentByFiscalPeriodEnd.CompanyCode
                                                                                                                                                     and FixedAsset.MasterFixedAsset                   = AssignmentByFiscalPeriodEnd.MasterFixedAsset
                                                                                                                                                     and FixedAsset.FixedAsset                         = AssignmentByFiscalPeriodEnd.FixedAsset
                                                                                                                                                     and AssignmentByFiscalPeriodEnd.ValidityStartDate <= Period.FiscalPeriodEndDate
                                                                                                                                                     and AssignmentByFiscalPeriodEnd.ValidityEndDate   >= Period.FiscalPeriodEndDate
    left outer join I_AssetValuationForLedger                                                                         as DeprAreaByFiscalPeriodEnd   on  FixedAsset.CompanyCode                              = DeprAreaByFiscalPeriodEnd.CompanyCode
                                                                                                                                                     and FixedAsset.Ledger                              = DeprAreaByFiscalPeriodEnd.Ledger
                                                                                                                                                     and DeprAreaByFiscalPeriodEnd.ValidityStartDate         <= Period.FiscalPeriodEndDate
                                                                                                                                                     and DeprAreaByFiscalPeriodEnd.ValidityEndDate           >= Period.FiscalPeriodEndDate
                                                                                                                                                     and FixedAsset.MasterFixedAsset                         = DeprAreaByFiscalPeriodEnd.MasterFixedAsset
                                                                                                                                                     and FixedAsset.FixedAsset                               = DeprAreaByFiscalPeriodEnd.FixedAsset
                                                                                                                                                     and DeprAreaByFiscalPeriodEnd.AssetRealDepreciationArea = FixedAssetValue.AssetDepreciationArea
    left outer join P_CN_CADECalcExpiredPeriods(P_FiscalYear: :P_FiscalYear,  P_CompanyCode: :P_CompanyCode,  P_Ledger: :P_Ledger)          as ExpiredPeriods              on  ExpiredPeriods.CalendarDate     = DeprAreaByFiscalPeriodEnd.DepreciationStartDate
                                                                                                                                                     and ExpiredPeriods.FiscalYearPeriod = Period.FiscalYearPeriod
                                                                                                                                                     and ExpiredPeriods.CompanyCode      = :P_CompanyCode
    left outer join I_OrdinaryDeprValAdjmtAccount                                                                     as OrdinaryDeprValAdjmtAccount         on  OrdinaryDeprValAdjmtAccount.CompanyCode               = :P_CompanyCode
                                                                                                                                                     and OrdinaryDeprValAdjmtAccount.AssetAccountDetermination = FixedAssetValue.AssetAccountDetermination
                                                                                                                                                     and OrdinaryDeprValAdjmtAccount.AssetRealDepreciationArea = :P_AssetDepreciationArea
    left outer join I_RevalOrdnryDeprValAdjmtAcct                                                                     as RevalOrdnryDeprValAdjmtAccount      on  RevalOrdnryDeprValAdjmtAccount.CompanyCode               = :P_CompanyCode
                                                                                                                                                     and RevalOrdnryDeprValAdjmtAccount.AssetAccountDetermination = FixedAssetValue.AssetAccountDetermination
                                                                                                                                                     and RevalOrdnryDeprValAdjmtAccount.AssetRealDepreciationArea = :P_AssetDepreciationArea

    left outer join I_CN_CADEGeneralInformation                                                                       as AdecConfiguration           on  AdecConfiguration.CompanyCode              = :P_CompanyCode
                                                                                                                                                     and AdecConfiguration.CN_CADENatlStdRelVersion = 'CN24589'
    left outer join P_CN_CADEAssetChgDoc(P_FiscalYear : :P_FiscalYear, P_CompanyCode: :P_CompanyCode)                 as AssetQuantityOld           on  FixedAssetValue.MasterFixedAsset              = AssetQuantityOld.MasterFixedAsset
                                                                                                                                                     and FixedAssetValue.FixedAsset                    = AssetQuantityOld.FixedAsset
                                                                                                                                                     and AssetQuantityOld.FiscalYearPeriod            = Period.FiscalYearPeriod
                                                                                                                                                     and AssetQuantityOld.ChangeDocDatabaseTableField = 'MENGE'
                                                                                                                                                     and AssetQuantityOld.CompanyCode                 = :P_CompanyCode
    left outer join P_CN_CADEAssetQuantity(P_FiscalYear : :P_FiscalYear, P_FromFiscalPeriod: :P_FromFiscalPeriod, P_ToFiscalPeriod: :P_ToFiscalPeriod,
                                           P_CompanyCode: :P_CompanyCode, P_Ledger: :P_Ledger)                        as AssetQuantityNew            on FixedAssetValue.MasterFixedAsset              = AssetQuantityNew.MasterFixedAsset
                                                                                                                                                     and FixedAssetValue.FixedAsset                   = AssetQuantityNew.FixedAsset
                                                                                                                                                     and AssetQuantityNew.CompanyCode                 = :P_CompanyCode
                                                                                                                                                     and FixedAsset.Ledger                       = AssetQuantityNew.Ledger
                                                                                                                                                     and Period.FiscalYear                            =  AssetQuantityNew.FiscalYear
                                                                                                                                                     and Period.FiscalPeriod                          =  AssetQuantityNew.FiscalPeriod
    left outer join P_CN_CADEAssetChgDoc(P_FiscalYear : :P_FiscalYear, P_CompanyCode: :P_CompanyCode)                 as AssetUsageOld               on  FixedAssetValue.MasterFixedAsset           = AssetUsageOld.MasterFixedAsset
                                                                                                                                                     and FixedAssetValue.FixedAsset                 = AssetUsageOld.FixedAsset
                                                                                                                                                     and AssetUsageOld.FiscalYearPeriod            = Period.FiscalYearPeriod
                                                                                                                                                     and AssetUsageOld.CompanyCode                 = :P_CompanyCode
                                                                                                                                                     and AssetUsageOld.ChangeDocDatabaseTableField = concat(
      'ORD4', AdecConfiguration.AssetEvaluationGroup
    )
    left outer join I_GlobAssetAssignment                                                                             as AssetUsageNew               on FixedAssetValue.MasterFixedAsset           = AssetUsageNew.MasterFixedAsset
                                                                                                                                                     and FixedAssetValue.FixedAsset                 = AssetUsageNew.FixedAsset
                                                                                                                                                     and AssetUsageNew.ValidityEndDate              >= Period.FiscalPeriodEndDate
                                                                                                                                                     and AssetUsageNew.ValidityStartDate            <= Period.FiscalPeriodEndDate
                                                                                                                                                     and AssetUsageNew.CompanyCode                  = :P_CompanyCode

    association [0..*] to I_AssetKeyFigureText as _AssetKeyFigureText on $projection.AssetAccountingKeyFigure = _AssetKeyFigureText.AssetAccountingKeyFigure
{

      @ObjectModel.foreignKey.association: '_CompanyCode'
  key FixedAssetValue.CompanyCode,
      @ObjectModel.foreignKey.association: '_DepreciationArea'
  key FixedAssetValue.AssetDepreciationArea,
  key FixedAsset.MasterFixedAsset,
  key FixedAsset.FixedAsset,
      @ObjectModel.foreignKey.association: '_Ledger'
  key FixedAssetValue.Ledger,
      @ObjectModel.foreignKey.association: '_FiscalYear'
  key FixedAssetValue.FiscalYear,
  key ltrim(Period.FiscalPeriod,'0')                                                                                                                                                                                                                                                                 as FiscalPeriod,
      @ObjectModel.foreignKey.association: '_SubledgerAccLineItemType'
  key FixedAssetValue.SubLedgerAcctLineItemType,
      @ObjectModel.foreignKey.association: '_AssetAcctTransClassfctn'
  key FixedAssetValue.AssetAcctTransClassfctn,
      @ObjectModel.foreignKey.association: '_AssetKeyFigure'
  key FixedAssetValue.AssetAccountingKeyFigure,
      @ObjectModel.foreignKey.association: '_AssetKeyFigureSet'
  key FixedAssetValue.AssetAccountingKeyFigureSet,

  key Period.FiscalYearPeriod,

      Period.FiscalPeriod                                                                                                                                                                                                                                                                            as PostingFiscalPeriod,

      //      @ObjectModel.foreignKey.association: '_AssetAccountDetermination'

      FixedAssetValue.AssetAccountDetermination                                                                                                                                                                                                                                                      as AssetAccountDetermination,

      //      @ObjectModel.foreignKey.association: '_ChartOfAccounts'

      FixedAssetValue.ChartOfAccounts                                                                                                                                                                                                                                                                as ChartOfAccounts,
      @ObjectModel.foreignKey.association: '_ChartOfDepreciation'
      ChartOfDepreciation,

      @ObjectModel.foreignKey.association: '_AssetSortedKeyFigureSetSpec'
      AssetAccountingSortedKeyFigure,

      FixedAssetValue._Currency._Text[1:Language = $parameters.P_Language].CurrencyShortName,
      FixedAssetValue._AssetClass._Text[1:Language = $parameters.P_Language].AssetClassName,

      @Semantics.currencyCode:true
      DisplayCurrency,

      @DefaultAggregation:#SUM
      @Semantics.amount.currencyCode: 'DisplayCurrency'
      AmountInDisplayCurrency,


      @DefaultAggregation:#SUM
      @Semantics.amount.currencyCode: 'DisplayCurrency'
      case FixedAssetValue.AssetAccountingKeyFigure
        when '0010700110' then AmountInDisplayCurrency //APC at Reporting Date

        else 0
      end                                                                                                                                                                                                                                                                                            as AcqnProdnAmtInDspCrcy,

      @DefaultAggregation:#SUM
      @Semantics.amount.currencyCode: 'DisplayCurrency'
      case when ( FixedAssetValue.AssetAcctTransClassfctn = '' or FixedAssetValue.AssetAcctTransClassfctn = '00' or
                  FixedAssetValue.AssetAcctTransClassfctn = '06' or FixedAssetValue.AssetAcctTransClassfctn = '46'
                  or FixedAssetValue.AssetAcctTransClassfctn = 'C7' or FixedAssetValue.AssetAcctTransClassfctn = 'M2'
                  or FixedAssetValue.AssetAcctTransClassfctn = '12')
          and ( FixedAssetValue.AssetAccountingKeyFigure = '0010700400' or //Revaluation Ordinary Depreciation at Reporting Date, Posted

          FixedAssetValue.AssetAccountingKeyFigure = '0010700402' or //Revaluation Ordinary Depreciation at Reporting Date, to be Posted

          FixedAssetValue.AssetAccountingKeyFigure = '0010700500' or //Ordinary Depreciation at Reporting Date, Posted

          FixedAssetValue.AssetAccountingKeyFigure = '0010700502' or //Ordinary Depreciation at Reporting Date, to be Posted

          FixedAssetValue.AssetAccountingKeyFigure = '0010700600' or //Special Depreciation at Reporting Date, Posted

          FixedAssetValue.AssetAccountingKeyFigure = '0010700602' or //Special Depreciation at Reporting Date, to be Posted

          FixedAssetValue.AssetAccountingKeyFigure = '0010700700' or //Unplanned Depreciation at Reporting Date, Posted

          FixedAssetValue.AssetAccountingKeyFigure = '0010700702' or //Unplanned Depreciation at Reporting Date, to be Posted

          FixedAssetValue.AssetAccountingKeyFigure = '0010700800' or //Transfer of Reserves at Reporting Date, Posted 

          FixedAssetValue.AssetAccountingKeyFigure = '0010700802' or //Transfer of Reserves at Reporting Date, to be Posted

          FixedAssetValue.AssetAccountingKeyFigure = '0009790700'  ) //Depreciation generated by retirement 

        then AmountInDisplayCurrency //Transfer of Reserves at Reporting Date, Posted

        else 0
      end                                                                                                                                                                                                                                                                                            as CumulativeDepreciationAmount,

      @DefaultAggregation:#SUM
      @Semantics.amount.currencyCode: 'DisplayCurrency'
      case when ( FixedAssetValue.AssetAcctTransClassfctn = '' or FixedAssetValue.AssetAcctTransClassfctn = '06' or FixedAssetValue.AssetAcctTransClassfctn = '46')
          and FixedAssetValue.FiscalPeriod = Period.FiscalPeriod and (
          FixedAssetValue.AssetAccountingKeyFigure = '0010700400' or //Revaluation Ordinary Depreciation at Reporting Date, Posted

          FixedAssetValue.AssetAccountingKeyFigure = '0010700402' or //Revaluation Ordinary Depreciation at Reporting Date, to be Posted

          FixedAssetValue.AssetAccountingKeyFigure = '0010700500' or //Ordinary Depreciation at Reporting Date, Posted

          FixedAssetValue.AssetAccountingKeyFigure = '0010700502' or //Ordinary Depreciation at Reporting Date, to be Posted

          FixedAssetValue.AssetAccountingKeyFigure = '0010700600' or //Special Depreciation at Reporting Date, Posted

          FixedAssetValue.AssetAccountingKeyFigure = '0010700602' or //Special Depreciation at Reporting Date, to be Posted

          FixedAssetValue.AssetAccountingKeyFigure = '0010700700' or //Unplanned Depreciation at Reporting Date, Posted

          FixedAssetValue.AssetAccountingKeyFigure = '0010700702' or //Unplanned Depreciation at Reporting Date, to be Posted

          FixedAssetValue.AssetAccountingKeyFigure = '0010700800' or //Transfer of Reserves at Reporting Date, Posted

          FixedAssetValue.AssetAccountingKeyFigure = '0010700802' //Transfer of Reserves at Reporting Date, to be Posted

        ) then AmountInDisplayCurrency
        else 0
      end                                                                                                                                                                                                                                                                                            as OrdinaryDeprAmtInDspCrcy,

      @DefaultAggregation:#SUM
      @Semantics.amount.currencyCode: 'DisplayCurrency'
      case FixedAssetValue.AssetAccountingKeyFigure
        when '0010700300' then AmountInDisplayCurrency //Revaluation APC  at Reporting Date, Posted

        when '0010700302' then AmountInDisplayCurrency //Revaluation APC  at Reporting Date, to be Posted

        else 0
      end                                                                                                                                                                                                                                                                                            as RevaluationAmountInDspCrcy,

      @DefaultAggregation:#SUM
      @Semantics.amount.currencyCode: 'DisplayCurrency'
      case FixedAssetValue.AssetAccountingKeyFigure
        when '0010790400' then AmountInDisplayCurrency //Net Book Value at Reporting Date, Posted

        when '0010790401' then AmountInDisplayCurrency //Net Book Value at Reporting Date, to be Posted

        else cast( 0 as fis_dr_hsl )
      end                                                                                                                                                                                                                                                                                            as NetBookValueAmtInDspCrcy,

      ltrim(AcqnProdnCostGLAccount,'0')                                                                                                                                                                                                                                                              as AcqnProdnCostGLAccount,

      //Asset Value Adjustment GL Accounts

      ltrim( OrdinaryDeprValAdjmtAccount.OrdinaryDeprValAdjmtGLAccount,'0')                                                                                                                                                                                                                               as OrdinaryDeprValAdjmtGLAccount,
      ltrim( RevalOrdnryDeprValAdjmtAccount.RevalOrdnryDeprValAdjmtGLAcct,'0')                                                                                                                                                                                                                               as RevalOrdnryDeprValAdjmtGLAcct,

      //ltrim(FixedAssetValue.AssetClass,'0')                                                                                                                                                                                                                                                          as AssetClass,

     FixedAssetValue.AssetClass  as AssetClass,
      //Asset Master Data

      FixedAsset._FixedAsset.FixedAssetDescription,

      @Semantics: { quantity : {unitOfMeasure: 'BaseUnit'} }
      case when AdecConfiguration.ABAPObjectActivationState = 'X'
        then AssetQuantityNew.Quantity
        else AssetQuantityOld.ChangeDocNewFieldValue
      end               as Quantity,

      AssetQuantityOld.ChangeDocNewFieldValue,

      @Semantics.unitOfMeasure: true
      @ObjectModel.foreignKey.association: '_UnitOfMeasure'
      FixedAssetValue.BaseUnit,

      FixedAsset.AssetCapitalizationDate                                                                                                                                                                                                                                                             as AssetCapitalizationDate,

      FixedAssetValue.DepreciationStartDate                                                                                                                                                                                                                                                          as DepreciationStartDate,

      FixedAssetValue.AssetDeactivationDate,
      FixedAssetValue.AssetTransactionType,

      FixedAssetValue.Inventory                                                                                                                                                                                                                                                                      as Inventory,

      case when FixedAssetValue.AssetSerialNumber = ''
        then FixedAssetValue.Inventory
        else FixedAssetValue.AssetSerialNumber
      end                                                                                                                                                                                                                                                                                            as AssetSerialNumber,
      FixedAsset._FixedAsset.FixedAssetExternalID,

      case when AdecConfiguration.ABAPObjectActivationState = 'X'
        then cast( AssetUsageNew.CN_CADEFixedAssetUsage as  ordtx )
        else cast( AssetUsageOld.ChangeDocNewFieldValue as  ordtx )
      end                                                                                                                                                                                                                              as CN_CADEFixedAssetUsage,

      //Asset Assignment in Current Period

      AssignmentByFiscalPeriodEnd.CostCenter                                                                                                                                                                                                                                                         as AssetCostCenter,

      @DefaultAggregation:#MAX
      division( DeprAreaByFiscalPeriodEnd.AcqnProdnCostScrapPercent, 100, 2 )                                                                                                                                                                                                                      as AcqnProdnCostScrapPercent,

      ltrim( cast(cast(DeprAreaByFiscalPeriodEnd.PlannedUsefulLifeInYears as abap.int4) * 12 + cast(DeprAreaByFiscalPeriodEnd.PlannedUsefulLifeInPeriods as abap.int4) as abap.char(12 ) ),'0')                                                                                                      as PlannedUsefulLifeInPeriods,

      ltrim( cast( ExpiredPeriods.ExpiredUsefulLifeInPerds as abap.char(12) ) , '0')