Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.
-- Derived SQL interpretation of CDS view I_IL_AssetBalanceCube.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.
-- Parameters: P_AssetAccountingKeyFigureSet : faa_key_figure_set, P_FiscalYear : fis_gjahr, P_FiscalPeriod : fis_period_to, P_KeyDate : fagl_keydate, P_CurrentDepreciationArea : glofaa_gb_depr_area_cur, P_Ledger : fins_ledger
CREATE VIEW I_IL_AssetBalanceCube AS
SELECT
CompanyCode,
MasterFixedAsset,
FixedAsset,
Ledger,
FiscalYear,
FiscalPeriod,
SubLedgerAcctLineItemType,
AssetAcctTransClassfctn,
AssetAccountingKeyFigure,
AssetAccountingKeyFigureSet,
AccountingDocument,
LedgerGLLineItem,
TransactionSubitem,
DebitCreditCode,
CurrencyRole,
substring (I_AssetBalanceCube.AssetDeactivationDate,1,6) AS IL_DeactivationIndexYearMonth,
substring (I_AssetBalanceCube.AcquisitionValueDate,1,6) AS IL_AcquisitionIndexYearMonth,
concat($parameters.P_FiscalYear,substring ($parameters.P_FiscalPeriod,2,2)) AS IL_CurrentPeriodIndexYearMonth,
AssetClass,
_FixedAsset.FixedAssetDescription AS FixedAssetDescription,
I_AssetBalanceCube.AcquisitionValueDate AS AcquisitionValueDate,
I_AssetBalanceCube.AssetDeactivationDate AS AssetDeactivationDate,
I_AssetBalanceCube.AssetCapitalizationDate AS AssetCapitalizationDate,
DepreciationStartDate,
PlannedUsefulLifeInYears,
PlannedUsefulLifeInPeriods,
AssetTransactionType,
AssetValueDate,
CostCenter,
AssetCostCenter,
Group1AssetEvaluationKey,
Group2AssetEvaluationKey,
Group3AssetEvaluationKey,
Group4AssetEvaluationKey,
Group5AssetEvaluationKey,
InvestmentSupportMeasure,
AssetBusinessArea,
BusinessArea,
_FixedAsset.InvestmentReason AS InvestmentReason,
_FixedAsset.AssetAccountDetermination AS AssetAccountDetermination,
_FixedAsset.FixedAssetGroup AS FixedAssetGroup,
_FixedAsset.Inventory AS Inventory,
_FixedAsset.AssetManufacturerName AS AssetManufacturerName,
_FixedAsset.AssetAdditionalDescription AS AssetAdditionalDescription,
_FixedAsset.LastRetirementValueDate AS LastRetirementValueDate,
_FixedAsset.OriginalAcquisitionFiscalYear AS OriginalAcquisitionFiscalYear,
DisplayCurrency,
case when ( AssetAccountingKeyFigure = '0000700601' ) then AmountInDisplayCurrency else cast( 0 as abap.curr(23,2) ) end as AccumulatedSpecialDeprAmount AS curr232endasAccumulatedSpecialDeprAmount,
case when ( AssetAccountingKeyFigure = '0007700501' ) then AmountInDisplayCurrency else cast( 0 as abap.curr(23,2) ) end as PlannedOrdinaryDeprAmount AS curr232endasPlannedOrdinaryDeprAmount,
case when ( AssetAccountingKeyFigure = '0007701600' ) then AmountInDisplayCurrency else cast( 0 as abap.curr(23,2) ) end as SpecialDepreciationAmount AS curr232endasSpecialDepreciationAmount,
case when ( AssetAccountingKeyFigure = '0007701700' ) then AmountInDisplayCurrency else cast( 0 as abap.curr(23,2) ) end as UnplannedDepreciationAmount AS curr232endasUnplannedDepreciationAmount,
case when ( AssetAccountingKeyFigure = '0007700701' ) then AmountInDisplayCurrency else cast( 0 as abap.curr(23,2) ) end as PlannedUnplannedDeprAmount AS curr232endasPlannedUnplannedDeprAmount,
case when ( AssetAccountingKeyFigure = '0007700601' ) then AmountInDisplayCurrency else cast( 0 as abap.curr(23,2) ) end as PlannedSpecialDeprAmount AS curr232endasPlannedSpecialDeprAmount,
case when ( AssetAccountingKeyFigure = '0001700000' or AssetAccountingKeyFigure = '0009790100' or AssetAccountingKeyFigure ='0005700000') then AmountInDisplayCurrency else cast( 0 as abap.curr(23,2) ) end as AcquisitionProductionAmount AS curr232endasAcquisitionProductionAmount,
case when ( AssetAccountingKeyFigure = '0003700000' or AssetAccountingKeyFigure = '0003710200' or AssetAccountingKeyFigure = '0003720200' ) then AmountInDisplayCurrency else cast( 0 as abap.curr(23,2) ) end as TransferAmtInDspCrcy AS curr232endasTransferAmtInDspCrcy,
case when ( AssetAccountingKeyFigure = '0002700000' ) then AmountInDisplayCurrency else cast( 0 as abap.curr(23,2) ) end as RetirementCostsAmtInDspCrcy AS curr232endasRetirementCostsAmtInDspCrcy,
case when ( AssetAccountingKeyFigure = '0000700110' ) then AmountInDisplayCurrency else cast( 0 as abap.curr(23,2) ) end as AccmltdAcqnProductionAmount AS curr232endasAccmltdAcqnProductionAmount,
case when ( AssetAccountingKeyFigure = '0000700301' ) then AmountInDisplayCurrency else cast( 0 as abap.curr(23,2) ) end as AccumulatedRevaluationAmount AS curr232endasAccumulatedRevaluationAmount,
case when ( AssetAccountingKeyFigure = '0007700302' ) then AmountInDisplayCurrency else cast( 0 as abap.curr(23,2) ) end as RevaluationAmount AS curr232endasRevaluationAmount,
case when ( AssetAccountingKeyFigure = '0007700802' ) then AmountInDisplayCurrency else cast( 0 as abap.curr(23,2) ) end as PlannedTransferOfReservesAmt AS curr232endasPlannedTransferOfReservesAmt,
case when ( AssetAccountingKeyFigure = '0008700500' ) then AmountInDisplayCurrency else cast( 0 as abap.curr(23,2) ) end as OrdinaryDeprWriteUpAmount AS curr232endasOrdinaryDeprWriteUpAmount,
case when ( AssetAccountingKeyFigure = '0008700700' ) then AmountInDisplayCurrency else cast( 0 as abap.curr(23,2) ) end as UnplannedDeprWriteUpAmount AS curr232endasUnplannedDeprWriteUpAmount,
case when ( AssetAccountingKeyFigure = '0009790050' or AssetAccountingKeyFigure = '0009790800' or AssetAccountingKeyFigure = '0009792050') then AmountInDisplayCurrency else cast( 0 as abap.curr(23,2) ) end as AccmltdOrdnryDeprValAdjmtAmt AS curr232endasAccmltdOrdnryDeprValAdjmtAmt,
case when ( AssetAccountingKeyFigure = '0009790070' ) then AmountInDisplayCurrency else cast( 0 as abap.curr(23,2) ) end as AccmltdUnplndDeprValAdjmtAmt AS curr232endasAccmltdUnplndDeprValAdjmtAmt,
case when ( AssetAccountingKeyFigure = '0007701800' ) then AmountInDisplayCurrency else cast( 0 as abap.curr(23,2) ) end as ManualTransferOfReservesAmt AS curr232endasManualTransferOfReservesAmt,
case when ( AssetAccountingKeyFigure = '0002700900' ) then AmountInDisplayCurrency else cast( 0 as abap.curr(23,2) ) end as RetirementRevenue AS curr232endasRetirementRevenue,
case when ( AssetAccountingKeyFigure = '0002700901' or AssetAccountingKeyFigure = '0009791070') then AmountInDisplayCurrency else cast( 0 as abap.curr(23,2) ) end as RetirementCost AS curr232endasRetirementCost
FROM I_AssetBalanceCube
;