P_FXDASTPLANVALWITHTMPPLANVAL
P_FxdAstPlanValWithTmpPlanVal
P_FXDASTPLANVALWITHTMPPLANVAL is a CDS View in S/4HANA. P_FxdAstPlanValWithTmpPlanVal. It contains 2 fields. 1 CDS views read from this table.
CDS Views using this table (1)
| View | Type | Join | VDM | Description |
|---|---|---|---|---|
| I_FixedAssetValWithTmpPlanVal | view | union_all | COMPOSITE | Fixed Asset values with temp. plan values |
Fields (2)
| Key | Field | CDS Fields | Used in Views |
|---|---|---|---|
| KEY | Ledger | Ledger | 1 |
| PlannedValueIsInclusive | PlannedValueIsInclusive | 1 |
@AbapCatalog.sqlViewName: 'PFASSETPVALL'
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM.private: true
@VDM.viewType: #COMPOSITE
@ObjectModel: { usageType.serviceQuality: #D,
usageType.sizeCategory: #XXL,
usageType.dataClass: #MIXED }
@ClientHandling.algorithm: #SESSION_VARIABLE
define view P_FxdAstPlanValWithTmpPlanVal
with parameters
P_CreationDateTime : timestampl,
P_UserID : username,
P_FirstFiscalYear : gjahr
as select from I_FixedAssetTmpPlanVal
{
key I_FixedAssetTmpPlanVal.CompanyCode,
key I_FixedAssetTmpPlanVal.AssetDepreciationArea,
key MasterFixedAsset,
key FixedAsset,
key I_FixedAssetTmpPlanVal.Ledger,
key FiscalYear,
key FiscalPeriod,
key SubLedgerAcctLineItemType,
key AssetAcctTransClassfctn,
LedgerGroup,
I_FixedAssetTmpPlanVal.PlannedValueIsInclusive,
ChartOfDepreciation,
@Semantics.currencyCode: true
CompanyCodeCurrency,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'CompanyCodeCurrency'} }
case when AssetAcctTransClassfctn <> '00' then
cast( AmountInCompanyCodeCurrency as fins_vhcur12 )
else cast ('0' as fins_vhcur12)
end as PlanAmountInCompanyCodeCrcy,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'CompanyCodeCurrency'} }
case when AssetAcctTransClassfctn = '00' then
cast( AmountInCompanyCodeCurrency as fins_vhcur12 )
else cast ('0' as fins_vhcur12)
end as ActualAmountInCompanyCodeCrcy,
@Semantics.currencyCode: true
GlobalCurrency,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'GlobalCurrency'} }
case when AssetAcctTransClassfctn <> '00' then
cast( AmountInGlobalCurrency as fins_vhcur12 )
else cast ('0' as fins_vhcur12)
end as PlanAmountInGlobalCurrency,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'GlobalCurrency'} }
case when AssetAcctTransClassfctn = '00' then
cast( AmountInGlobalCurrency as fins_vhcur12 )
else cast ('0' as fins_vhcur12)
end as ActualAmountInGlobalCurrency,
@Semantics.currencyCode: true
FreeDefinedCurrency1,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency1'} }
case when AssetAcctTransClassfctn <> '00' then
cast( AmountInFreeDefinedCurrency1 as fins_vhcur12 )
else cast ('0' as fins_vhcur12)
end as PlanAmountInFreeDefinedCrcy1,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency1'} }
case when AssetAcctTransClassfctn = '00' then
cast( AmountInFreeDefinedCurrency1 as fins_vhcur12 )
else cast ('0' as fins_vhcur12)
end as ActualAmountInFreeDfndCrcy1,
@Semantics.currencyCode: true
FreeDefinedCurrency2,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency2'} }
case when AssetAcctTransClassfctn <> '00' then
cast( AmountInFreeDefinedCurrency2 as fins_vhcur12 )
else cast ('0' as fins_vhcur12)
end as PlanAmountInFreeDefinedCrcy2,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency2'} }
case when AssetAcctTransClassfctn = '00' then
cast( AmountInFreeDefinedCurrency2 as fins_vhcur12 )
else cast ('0' as fins_vhcur12)
end as ActualAmountInFreeDfndCrcy2,
@Semantics.currencyCode: true
FreeDefinedCurrency3,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency3'} }
case when AssetAcctTransClassfctn <> '00' then
cast( AmountInFreeDefinedCurrency3 as fins_vhcur12 )
else cast ('0' as fins_vhcur12)
end as PlanAmountInFreeDefinedCrcy3,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency3'} }
case when AssetAcctTransClassfctn = '00' then
cast( AmountInFreeDefinedCurrency3 as fins_vhcur12 )
else cast ('0' as fins_vhcur12)
end as ActualAmountInFreeDfndCrcy3,
@Semantics.currencyCode: true
FreeDefinedCurrency4,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency4'} }
case when AssetAcctTransClassfctn <> '00' then
cast( AmountInFreeDefinedCurrency4 as fins_vhcur12 )
else cast ('0' as fins_vhcur12)
end as PlanAmountInFreeDefinedCrcy4,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency4'} }
case when AssetAcctTransClassfctn = '00' then
cast( AmountInFreeDefinedCurrency4 as fins_vhcur12 )
else cast ('0' as fins_vhcur12)
end as ActualAmountInFreeDfndCrcy4,
@Semantics.currencyCode: true
FreeDefinedCurrency5,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency5'} }
case when AssetAcctTransClassfctn <> '00' then
cast( AmountInFreeDefinedCurrency5 as fins_vhcur12 )
else cast ('0' as fins_vhcur12)
end as PlanAmountInFreeDefinedCrcy5,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency5'} }
case when AssetAcctTransClassfctn = '00' then
cast( AmountInFreeDefinedCurrency5 as fins_vhcur12 )
else cast ('0' as fins_vhcur12)
end as ActualAmountInFreeDfndCrcy5,
@Semantics.currencyCode: true
FreeDefinedCurrency6,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency6'} }
case when AssetAcctTransClassfctn <> '00' then
cast( AmountInFreeDefinedCurrency6 as fins_vhcur12 )
else cast ('0' as fins_vhcur12)
end as PlanAmountInFreeDefinedCrcy6,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency6'} }
case when AssetAcctTransClassfctn = '00' then
cast( AmountInFreeDefinedCurrency6 as fins_vhcur12 )
else cast ('0' as fins_vhcur12)
end as ActualAmountInFreeDfndCrcy6,
@Semantics.currencyCode: true
FreeDefinedCurrency7,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency7'} }
case when AssetAcctTransClassfctn <> '00' then
cast( AmountInFreeDefinedCurrency7 as fins_vhcur12 )
else cast ('0' as fins_vhcur12)
end as PlanAmountInFreeDefinedCrcy7,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency7'} }
case when AssetAcctTransClassfctn = '00' then
cast( AmountInFreeDefinedCurrency7 as fins_vhcur12 )
else cast ('0' as fins_vhcur12)
end as ActualAmountInFreeDfndCrcy7,
@Semantics.currencyCode: true
FreeDefinedCurrency8,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency8'} }
case when AssetAcctTransClassfctn <> '00' then
cast( AmountInFreeDefinedCurrency8 as fins_vhcur12 )
else cast ('0' as fins_vhcur12)
end as PlanAmountInFreeDefinedCrcy8,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency8'} }
case when AssetAcctTransClassfctn = '00' then
cast( AmountInFreeDefinedCurrency8 as fins_vhcur12 )
else cast ('0' as fins_vhcur12)
end as ActualAmountInFreeDfndCrcy8
}
where
//Due values
(I_FixedAssetTmpPlanVal.PlannedValueIsInclusive = '2'
and I_FixedAssetTmpPlanVal.CreatedByUser = :P_UserID
and I_FixedAssetTmpPlanVal.CreationDateTime = :P_CreationDateTime
and I_FixedAssetTmpPlanVal.FiscalYear >= :P_FirstFiscalYear)
//Carry forward values
or (I_FixedAssetTmpPlanVal.PlannedValueIsInclusive = '1'
and I_FixedAssetTmpPlanVal.AssetAcctTransClassfctn = '00'
and I_FixedAssetTmpPlanVal.CreatedByUser = :P_UserID
and I_FixedAssetTmpPlanVal.CreationDateTime = :P_CreationDateTime
and I_FixedAssetTmpPlanVal.FiscalYear >= :P_FirstFiscalYear)
union all select from I_FixedAssetPlanValue
{
key I_FixedAssetPlanValue.CompanyCode,
key I_FixedAssetPlanValue.AssetDepreciationArea,
key MasterFixedAsset,
key FixedAsset,
key I_FixedAssetPlanValue.Ledger,
key FiscalYear,
key FiscalPeriod,
key SubLedgerAcctLineItemType,
key AssetAcctTransClassfctn,
LedgerGroup,
I_FixedAssetPlanValue.PlannedValueIsInclusive,
I_FixedAssetPlanValue.ChartOfDepreciation,
@Semantics.currencyCode: true
CompanyCodeCurrency,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'CompanyCodeCurrency'} }
AmountInCompanyCodeCurrency as PlanAmountInCompanyCodeCrcy,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'CompanyCodeCurrency'} }
cast('0' as fins_vhcur12) as ActualAmountInCompanyCodeCrcy,
@Semantics.currencyCode: true
GlobalCurrency,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'GlobalCurrency'} }
AmountInGlobalCurrency as PlanAmountInGlobalCurrency,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'GlobalCurrency'} }
cast('0' as fins_vhcur12) as ActualAmountInGlobalCurrency,
@Semantics.currencyCode: true
FreeDefinedCurrency1,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency1'} }
AmountInFreeDefinedCurrency1 as PlanAmountInFreeDefinedCrcy1,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency1'} }
cast('0' as fins_vhcur12) as ActualAmountInFreeDfndCrcy1,
@Semantics.currencyCode: true
FreeDefinedCurrency2,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency2'} }
AmountInFreeDefinedCurrency2 as PlanAmountInFreeDefinedCrcy2,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency2'} }
cast('0' as fins_vhcur12) as ActualAmountInFreeDfndCrcy2,
@Semantics.currencyCode: true
FreeDefinedCurrency3,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency3'} }
AmountInFreeDefinedCurrency3 as PlanAmountInFreeDefinedCrcy3,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency3'} }
cast('0' as fins_vhcur12) as ActualAmountInFreeDfndCrcy3,
@Semantics.currencyCode: true
FreeDefinedCurrency4,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency4'} }
AmountInFreeDefinedCurrency4 as PlanAmountInFreeDefinedCrcy4,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency4'} }
cast('0' as fins_vhcur12) as ActualAmountInFreeDfndCrcy4,
@Semantics.currencyCode: true
FreeDefinedCurrency5,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency5'} }
AmountInFreeDefinedCurrency5 as PlanAmountInFreeDefinedCrcy5,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency5'} }
cast('0' as fins_vhcur12) as ActualAmountInFreeDfndCrcy5,
@Semantics.currencyCode: true
FreeDefinedCurrency6,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency6'} }
AmountInFreeDefinedCurrency6 as PlanAmountInFreeDefinedCrcy6,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency6'} }
cast('0' as fins_vhcur12) as ActualAmountInFreeDfndCrcy6,
@Semantics.currencyCode: true
FreeDefinedCurrency7,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency7'} }
AmountInFreeDefinedCurrency7 as PlanAmountInFreeDefinedCrcy7,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency7'} }
cast('0' as fins_vhcur12) as ActualAmountInFreeDfndCrcy7,
@Semantics.currencyCode: true
FreeDefinedCurrency8,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency8'} }
AmountInFreeDefinedCurrency8 as PlanAmountInFreeDefinedCrcy8,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency8'} }
cast('0' as fins_vhcur12) as ActualAmountInFreeDfndCrcy8
}
where
I_FixedAssetPlanValue.FiscalYear < :P_FirstFiscalYear