P_FIXEDASSETLINEITEM

CDS View

P_FIXEDASSETLINEITEM is a CDS View in S/4HANA. It contains 2 fields. 1 CDS views read from this table.

CDS Views using this table (1)

ViewTypeJoinVDMDescription
I_FixedAssetValWithTmpPlanVal view from COMPOSITE Fixed Asset values with temp. plan values

Fields (2)

KeyField CDS FieldsUsed in Views
KEY CompanyCode CompanyCode 1
KEY Ledger Ledger 1
@AbapCatalog.sqlViewName: 'PFALINEITEMS'
@VDM.viewType: #COMPOSITE
@VDM.private: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE

define view P_FixedAssetLineItem
  with parameters
    P_FirstFiscalYear : gjahr

  as select from I_FixedAssetLineItem as lineitems
{
  key lineitems.AssetDepreciationArea,
  key lineitems.CompanyCode,
  key lineitems.FiscalYear,
  key lineitems.MasterFixedAsset,
  key lineitems.FixedAsset,
  key lineitems.Ledger,
  key lineitems.FiscalPeriod,
  key lineitems.SubLedgerAcctLineItemType,
  key lineitems.AssetAcctTransClassfctn,
  key lineitems.AccountingDocument,
  key lineitems.TransactionSubitem,
  key lineitems.DebitCreditCode,

      //      case when IsStatisticalDocument = 'X' and AssetAcctTransClassfctn = '00' then

      //      cast('1' as faa_use_val_ty)

      //      //statistical carry forward values can be planned and posted

      //      //Example: two open fiscal years, there are planned not posted depreciation from the first fiscal year,

      //      //carry forward for this depreciation is stored as a statistical line in FAAT_DOC_it

      //      else cast('0' as faa_use_val_ty)

      //      end as PlannedValueIsInclusive,


      lineitems.LedgerGroup,
      lineitems.GLAccount,
      lineitems.GroupMasterFixedAsset,
      lineitems.GroupFixedAsset,
      lineitems.FinancialAccountType,
      lineitems.ChartOfDepreciation,

      lineitems.AccountingDocumentCreationDate,
      lineitems.CreationTime,
      lineitems.JointVentureCostRecoveryCode,
      lineitems.CostCenter,
      lineitems.Plant,
      lineitems.BusinessArea,
      lineitems.PersonnelNumber,
      lineitems.Fund,
      lineitems.ProfitCenter,
      lineitems.Segment,
      lineitems.FunctionalArea,
      lineitems.AssetTransactionType,

      @Semantics.currencyCode:true
      lineitems.CompanyCodeCurrency,
      @Semantics.currencyCode:true
      lineitems.GlobalCurrency,
      @Semantics.currencyCode:true
      lineitems.FreeDefinedCurrency1,
      @Semantics.currencyCode:true
      lineitems.FreeDefinedCurrency2,
      @Semantics.currencyCode:true
      lineitems.FreeDefinedCurrency3,
      @Semantics.currencyCode:true
      lineitems.FreeDefinedCurrency4,
      @Semantics.currencyCode:true
      lineitems.FreeDefinedCurrency5,
      @Semantics.currencyCode:true
      lineitems.FreeDefinedCurrency6,
      @Semantics.currencyCode:true
      lineitems.FreeDefinedCurrency7,
      @Semantics.currencyCode:true
      lineitems.FreeDefinedCurrency8,

      @DefaultAggregation: #SUM
      @Semantics: { amount : {currencyCode: 'CompanyCodeCurrency'} }
      cast(lineitems.AmountInCompanyCodeCurrency as fins_vhcur12)  as ActualAmountInCompanyCodeCrcy,

      @DefaultAggregation: #SUM
      @Semantics: { amount : {currencyCode: 'GlobalCurrency'} }
      cast(lineitems.AmountInGlobalCurrency as fins_vhcur12)       as ActualAmountInGlobalCurrency,

      @DefaultAggregation: #SUM
      @Semantics: { amount : {currencyCode: 'FreeDefinedCurrency1'} }
      cast(lineitems.AmountInFreeDefinedCurrency1 as fins_vhcur12) as ActualAmountInFreeDfndCrcy1,

      @DefaultAggregation: #SUM
      @Semantics: { amount : {currencyCode: 'FreeDefinedCurrency2'} }
      cast(lineitems.AmountInFreeDefinedCurrency2 as fins_vhcur12) as ActualAmountInFreeDfndCrcy2,

      @DefaultAggregation: #SUM
      @Semantics: { amount : {currencyCode: 'FreeDefinedCurrency3'} }
      cast(lineitems.AmountInFreeDefinedCurrency3 as fins_vhcur12) as ActualAmountInFreeDfndCrcy3,

      @DefaultAggregation: #SUM
      @Semantics: { amount : {currencyCode: 'FreeDefinedCurrency4'} }
      cast(lineitems.AmountInFreeDefinedCurrency4 as fins_vhcur12) as ActualAmountInFreeDfndCrcy4,

      @DefaultAggregation: #SUM
      @Semantics: { amount : {currencyCode: 'FreeDefinedCurrency5'} }
      cast(lineitems.AmountInFreeDefinedCurrency5 as fins_vhcur12) as ActualAmountInFreeDfndCrcy5,

      @DefaultAggregation: #SUM
      @Semantics: { amount : {currencyCode: 'FreeDefinedCurrency6'} }
      cast(lineitems.AmountInFreeDefinedCurrency6 as fins_vhcur12) as ActualAmountInFreeDfndCrcy6,

      @DefaultAggregation: #SUM
      @Semantics: { amount : {currencyCode: 'FreeDefinedCurrency7'} }
      cast(lineitems.AmountInFreeDefinedCurrency7 as fins_vhcur12) as ActualAmountInFreeDfndCrcy7,

      @DefaultAggregation: #SUM
      @Semantics: { amount : {currencyCode: 'FreeDefinedCurrency8'} }
      cast(lineitems.AmountInFreeDefinedCurrency8 as fins_vhcur12) as ActualAmountInFreeDfndCrcy8,

      @DefaultAggregation: #SUM
      @Semantics: { amount : {currencyCode: 'CompanyCodeCurrency'} }
      cast('0' as fins_vhcur12)                                    as PlanAmountInCompanyCodeCrcy,

      @DefaultAggregation: #SUM
      @Semantics: { amount : {currencyCode: 'GlobalCurrency'} }
      cast('0' as fins_vhcur12)                                    as PlanAmountInGlobalCurrency,

      @DefaultAggregation: #SUM
      @Semantics: { amount : {currencyCode: 'FreeDefinedCurrency1'} }
      cast('0' as fins_vhcur12)                                    as PlanAmountInFreeDefinedCrcy1,

      @DefaultAggregation: #SUM
      @Semantics: { amount : {currencyCode: 'FreeDefinedCurrency2'} }
      cast('0' as fins_vhcur12)                                    as PlanAmountInFreeDefinedCrcy2,

      @DefaultAggregation: #SUM
      @Semantics: { amount : {currencyCode: 'FreeDefinedCurrency3'} }
      cast('0' as fins_vhcur12)                                    as PlanAmountInFreeDefinedCrcy3,

      @DefaultAggregation: #SUM
      @Semantics: { amount : {currencyCode: 'FreeDefinedCurrency4'} }
      cast('0' as fins_vhcur12)                                    as PlanAmountInFreeDefinedCrcy4,

      @DefaultAggregation: #SUM
      @Semantics: { amount : {currencyCode: 'FreeDefinedCurrency5'} }
      cast('0' as fins_vhcur12)                                    as PlanAmountInFreeDefinedCrcy5,

      @DefaultAggregation: #SUM
      @Semantics: { amount : {currencyCode: 'FreeDefinedCurrency6'} }
      cast('0' as fins_vhcur12)                                    as PlanAmountInFreeDefinedCrcy6,

      @DefaultAggregation: #SUM
      @Semantics: { amount : {currencyCode: 'FreeDefinedCurrency7'} }
      cast('0' as fins_vhcur12)                                    as PlanAmountInFreeDefinedCrcy7,

      @DefaultAggregation: #SUM
      @Semantics: { amount : {currencyCode: 'FreeDefinedCurrency8'} }
      cast('0' as fins_vhcur12)                                    as PlanAmountInFreeDefinedCrcy8

}
where
  (
           lineitems.FiscalYear                < $parameters.P_FirstFiscalYear
    or(
           lineitems.FiscalYear                >= $parameters.P_FirstFiscalYear
      and  lineitems.AssetAcctTransClassfctn   <>      '00'
    )
  )
  and(
           lineitems.IsStatisticalDocument     =       ''
    or(
           lineitems.IsStatisticalDocument     =       'X'
      and
      //Restrict selection to avoid duplicates

           lineitems.AssetAcctTransClassfctn   <>      '46'
      and  lineitems.AssetAcctTransClassfctn   <>      '61'
      and  lineitems.AssetAcctTransClassfctn   <>      '65'
      and  lineitems.AssetAcctTransClassfctn   <>      '66'
      or(
           //Additionaly for the transaction list of asset accounting

           lineitems.SubLedgerAcctLineItemType between '07900' and '07906'
        or lineitems.SubLedgerAcctLineItemType =       '07940'
      )
    )
  )
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_FIXEDASSETLINEITEM"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/