P_AssetClassByCompanyCode

DDL: P_ASSETCLASSBYCOMPANYCODE Type: view COMPOSITE

P_AssetClassByCompanyCode is a Composite CDS View in SAP S/4HANA. It reads from 4 data sources (I_AssetRedesignSwitchStatus, I_AssetRedesignSwitchStatus, P_TF_AssetClassByCompanyCode, P_TF_AssetClassByCompanyCode) and exposes 20 fields with key fields CompanyCode, AssetClass, AssetClass.

Data Sources (4)

SourceAliasJoin Type
I_AssetRedesignSwitchStatus I_AssetRedesignSwitchStatus inner
I_AssetRedesignSwitchStatus I_AssetRedesignSwitchStatus inner
P_TF_AssetClassByCompanyCode P_TF_AssetClassByCompanyCode from
P_TF_AssetClassByCompanyCode P_TF_AssetClassByCompanyCode union_all

Annotations (8)

NameValueLevelField
AbapCatalog.sqlViewName PCOMPCODEASSETCL view
AbapCatalog.preserveKey true view
AbapCatalog.compiler.compareFilter true view
VDM.viewType #COMPOSITE view
VDM.private true view
ClientHandling.algorithm #SESSION_VARIABLE view
Metadata.ignorePropagatedAnnotations true view
AccessControl.authorizationCheck #NOT_REQUIRED view

Fields (20)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode I_CompanyCodeAsset CompanyCode
KEY AssetClass I_AssetClassDepreciationArea AssetClass
FixedAssetGroup
AssetScreenLayout
AssetClassDownPaymentIsAllowed
AssetClassIsBlocked
InventoryIsCounted
FixedAssetPropertyType
PropertyClass
AreaSizeUnit
KEY AssetClass AssetClass
FixedAssetGroup FixedAssetGroup
AssetScreenLayout AssetScreenLayout
AssetClassDownPaymentIsAllowed AssetClassDownPaymentIsAllowed
AssetClassIsBlocked AssetClassIsBlocked
InventoryIsCounted InventoryIsCounted
FixedAssetPropertyType FixedAssetPropertyType
PropertyClass PropertyClass
AreaSizeUnit AreaSizeUnit
AssetAuthorizationContext AssetAuthorizationContext
@AbapCatalog: { sqlViewName: 'PCOMPCODEASSETCL', preserveKey: true, compiler.compareFilter: true }
@VDM.viewType: #COMPOSITE
@VDM.private:true
@ClientHandling.algorithm: #SESSION_VARIABLE
@Metadata.ignorePropagatedAnnotations: true
@AccessControl.authorizationCheck: #NOT_REQUIRED

define view P_AssetClassByCompanyCode
  as select distinct from   I_CompanyCodeAsset
    left outer to many join I_AssetClassDepreciationArea on I_CompanyCodeAsset.ChartOfDepreciation = I_AssetClassDepreciationArea.ChartOfDepreciation
    inner join              I_AssetRedesignSwitchStatus  on I_AssetRedesignSwitchStatus.AssetRedesignSwitchIsActive = ''
{
  key I_CompanyCodeAsset.CompanyCode,
  key I_AssetClassDepreciationArea.AssetClass,

      cast('' as anlue)                   as FixedAssetGroup,
      cast('' as faa_layout)              as AssetScreenLayout,
      cast('' as faa_downpayment_allowed) as AssetClassDownPaymentIsAllowed,
      cast('' as xspea_anka)              as AssetClassIsBlocked,
      cast('' as  inken)                  as InventoryIsCounted,
      cast('' as eigkz)                   as FixedAssetPropertyType,
      cast('' as vmgli)                   as PropertyClass,
      cast('' as feins)                   as AreaSizeUnit,
      cast('CLASSIC' as faa_authcntxt)    as AssetAuthorizationContext
}
where
  I_AssetClassDepreciationArea.AssetClassIsBlocked <> 'X'

union all select from P_TF_AssetClassByCompanyCode( P_SAPClient: $session.client )
  inner join          I_AssetRedesignSwitchStatus on I_AssetRedesignSwitchStatus.AssetRedesignSwitchIsActive = 'X'
{
  key CompanyCode,
  key AssetClass,

      FixedAssetGroup,
      AssetScreenLayout,
      AssetClassDownPaymentIsAllowed,
      AssetClassIsBlocked,
      InventoryIsCounted,
      FixedAssetPropertyType,
      PropertyClass,
      AreaSizeUnit,
      AssetAuthorizationContext
}