P_RO_SAFTFixedAsset is a Composite CDS View that provides data about "RO SAFT Fixed Asset Master Data" in SAP S/4HANA. It reads from 3 data sources (I_AssetValuationForLedger, I_FixedAsset, I_FixedAssetForLedger) and exposes 17 fields with key fields CompanyCode, MasterFixedAsset, FixedAsset. Part of development package GLO_FIN_IS_SAFT_AA_RO.
//@AbapCatalog.sqlViewName: 'PROSAFASSET'
@AbapCatalog.viewEnhancementCategory: [#NONE]@AccessControl.authorizationCheck: #NOT_REQUIRED@EndUserText.label: 'RO SAFT Fixed Asset Master Data'
@Metadata.ignorePropagatedAnnotations: true@VDM.private:true@VDM.viewType: #COMPOSITE@ObjectModel.usageType:{
serviceQuality: #D,
sizeCategory: #XXL,
dataClass: #MASTER
}defineviewentity P_RO_SAFTFixedAsset
withparameters
P_KeyDate : fagl_keydate,
P_NationalClsfctnSourceField : /ceecv/ro_sa_natl_clfn_src_fld,
P_UtilznStartDateSourceField : /ceecv/ro_sa_util_strt_src_fld,
P_AssetIdentifierSourceFields : /ceecv/ro_sa_asset_id_src_flds,
P_ReportingStartDate : srf_rpg_period_start_date,
P_AcquisitionDateSourceCode : /ceecv/ro_sa_acqn_date_src_fld,
P_AstLeadingDepreciationArea : saft_aa_ro_depr_area,
P_AstLdngDeprAreaLedger : saft_aa_ro_depr_area_ledger,
P_LeadingCompanyCode : /ceecv/ro_sa_ldng_comp_code //Later we expect to use in joins with I_RO_SAFTAssetDefinitionKey
asselectfrom I_FixedAsset as FixedAsset
innerjoin I_FixedAssetForLedger as FixedAssetForLedger on FixedAssetForLedger.CompanyCode = FixedAsset.CompanyCode
and FixedAssetForLedger.MasterFixedAsset = FixedAsset.MasterFixedAsset
and FixedAssetForLedger.FixedAsset = FixedAsset.FixedAsset
and FixedAssetForLedger.Ledger = $parameters.P_AstLdngDeprAreaLedger
innerjoin I_AssetValuationForLedger as AssetValuationForLedger on AssetValuationForLedger.CompanyCode = FixedAsset.CompanyCode
and AssetValuationForLedger.MasterFixedAsset = FixedAsset.MasterFixedAsset
and AssetValuationForLedger.FixedAsset = FixedAsset.FixedAsset
and AssetValuationForLedger.Ledger = $parameters.P_AstLdngDeprAreaLedger
and AssetValuationForLedger.AssetRealDepreciationArea = $parameters.P_AstLeadingDepreciationArea
and AssetValuationForLedger.ValidityEndDate >= $parameters.P_KeyDate
and AssetValuationForLedger.ValidityStartDate <= $parameters.P_KeyDate
{
//I_FixedAsset
key FixedAsset.CompanyCode,
key FixedAsset.MasterFixedAsset,
key FixedAsset.FixedAsset,
FixedAsset.Inventory,
FixedAsset.FixedAssetDescription,
'' as AssetAdditionalDescription,
FixedAsset.AssetClass,
FixedAsset.AssetAccountDetermination,
FixedAsset.FixedAssetOrderDate,
//Calculated fields
cast( case $parameters.P_AcquisitionDateSourceCode
when '1' then FixedAssetForLedger.AssetCapitalizationDate
when '2' then FixedAssetForLedger.AcquisitionValueDate
when '3' then AssetValuationForLedger.AssetOpgReadinessDate
when '4' then AssetValuationForLedger.DepreciationStartDate
else '' endas datum ) as AcquisitionDate,
cast( case $parameters.P_UtilznStartDateSourceField
when '1' then FixedAssetForLedger.AssetCapitalizationDate
when '2' then AssetValuationForLedger.AssetOpgReadinessDate
when '3' then AssetValuationForLedger.DepreciationStartDate
else '' endas datum ) as UtilizationStartDate,
cast( case $parameters.P_NationalClsfctnSourceField
when '0' then FixedAsset._FixedAssetCountryData.NationalClassification
when '1' then FixedAsset.Group1AssetEvaluationKey
when '2' then FixedAsset.Group2AssetEvaluationKey
when '3' then FixedAsset.Group3AssetEvaluationKey
when '4' then FixedAsset.Group4AssetEvaluationKey
when '5' then FixedAsset.Group5AssetEvaluationKey
when '6' then FixedAsset.FixedAssetGroup
else FixedAsset._FixedAssetCountryData.NationalClassification endas /ceecv/ro_sa_asset_valn_class ) as NationalClassification,
cast( case $parameters.P_AssetIdentifierSourceFields
when '2' then concat(concat(FixedAsset.CompanyCode,'_'),FixedAsset.Inventory)
else concat(concat(concat(concat(FixedAsset.CompanyCode,'_'),FixedAsset.MasterFixedAsset),'_'),FixedAsset.FixedAsset) //It is option 1 or anything else than 2
endas /ceecv/ro_sa_asset_id ) as RO_SAFTAssetID,
//I_FixedAssetForLedger
FixedAssetForLedger.AssetCapitalizationDate,
FixedAssetForLedger.AssetDeactivationDate,
FixedAssetForLedger.AcquisitionValueDate,
//I_AssetValuationForLedger
AssetValuationForLedger.PlannedUsefulLifeInYears,
AssetValuationForLedger.PlannedUsefulLifeInPeriods,
AssetValuationForLedger.DepreciationKey,
$parameters.P_LeadingCompanyCode as LeadingCompanyCode, //Parameter must be used
cast( ' ' as /ceecv/ro_sa_ast_is_invmt_supp ) as RO_SAFTAstIsInvestmentSupport //Field is currently always empty for UPA On
} where
( FixedAssetForLedger.AssetDeactivationDate >= $parameters.P_ReportingStartDate or FixedAssetForLedger.AssetDeactivationDate = '00000000' )
and FixedAssetForLedger.AssetCapitalizationDate <> '00000000'
and FixedAssetForLedger.AcquisitionValueDate <> '00000000' and FixedAssetForLedger.AcquisitionValueDate <= $parameters.P_KeyDate