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 P_Fclm_Flow_Analyzer_Overview.
-- 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.
-- SQL view name: PFLOWANALYSIS
-- Parameters: P_Filter_BAL : abap.char(1000), P_GroupingFilter : fclm_groupingfilter, P_PlanningLevelFilter : abap.char(1000), P_OverduePlanningLevelFilter : abap.char(1000), P_Filter_LiquidityItem : abap.char(1000), P_Filter_BankAccount : abap.char(1000), P_FilterBal_type : fclm_filterbaltype, p_BankGroup : fclm_bank_group, P_KeyDate : vdm_v_key_date, P_DisplayCurrency : vdm_v_display_currency, P_ExchangeRateType : kurst_curr, P_Cycle : syst_tabix, P_CyclePattern : fclm_cyclepattern, P_BankAccountHierarchy : hryid, P_ActualDate : datum, P_BamCur : abap.char(1), P_Language : sylangu, P_CalenderId : abap.char(10), P_htstp : timestampl, p_exchangeRateDate : datum, P_PreviousFlag : abap.char(2), P_EndofPeriod : abap.char(2), P_CountOnly : abap.char(1)
CREATE VIEW P_Fclm_Flow_Analyzer_Overview AS
SELECT
$parameters.P_KeyDate AS KeyDate,
_AggregatedCashFlow.companycode AS CompanyCode,
_AggregatedCashFlow.FiDocumentType AS FiDocumentType,
_AggregatedCashFlow.glaccount AS GLAccount,
_AggregatedCashFlow.housebank AS HouseBank,
_AggregatedCashFlow.housebankaccount AS HouseBankAccount,
_AggregatedCashFlow.bankaccountid AS BankAccountInternalID,
_AggregatedCashFlow.currency AS Currency,
_AggregatedCashFlow.cashplanninggroup AS CashPlanningGroup,
_AggregatedCashFlow.certaintylevel AS CertaintyLevel,
_AggregatedCashFlow.cashgroup AS SummarizationGroup,
_AggregatedCashFlow.cashgroupterm AS SummarizationTerm,
_AggregatedCashFlow.paymentmethod AS PaymentMethod,
_AggregatedCashFlow.planninglevel AS PlanningLevel,
_AggregatedCashFlow.overdueplanninglevel AS OverduePlanningLevel,
_AggregatedCashFlow.liquidityitem AS LiquidityItem,
_AggregatedCashFlow.Direction AS Direction,
_AggregatedCashFlow.ProfitCenter AS ProfitCenter,
_AggregatedCashFlow.Segment AS Segment,
_AggregatedCashFlow.BusinessArea AS BusinessArea,
_AggregatedCashFlow.TradingPartner AS TradingPartner,
coalesce(_BankAccount.BankAccountType,'') AS BankAccountType,
coalesce(_BankAccount.BankCountry,'') AS BankCountry,
coalesce(_BankAccount.BankAccountNumber,'') AS BankAccount,
coalesce(_BankAccount.Bank,'') AS Bank,
coalesce(_BankGroup.BankHeadquarter,'') AS BankGroupID,
coalesce(_BankGroup.BankHeadquarterName,'') AS BankGroupIDName,
coalesce(_BankGroup.CreditRating,'') AS BankRating,
_AggregatedCashFlow.bal_type AS bal_type,
$parameters.P_Cycle AS max_cycle,
$parameters.P_ExchangeRateType AS ExRateType,
$parameters.P_ActualDate AS ActualDate,
_BankGroup._CreditRating._Text[1:Language=$parameters.P_Language].CreditRatingName AS BankRatingDescription,
_BankAccount._Text[1:Language=$parameters.P_Language].BankAccountDescription AS BankAccountName,
coalesce(_BankAccount._Bank.BankName,'') AS BankName,
coalesce(_CompanyCode.CompanyCodeName,'') AS CompanyCodeName,
_PlanningLevel._Text[1:Language=$parameters.P_Language].PlanningLevelName AS PlanningLevelName,
_PlanningLevel._Text[1:Language=$parameters.P_Language].PlanningLevelDescription AS PlanningLevelDescription,
_LiquidityItem._Text[1:Language=$parameters.P_Language].LiquidityItemName AS LiquidityItemName,
_LiquidityItem._Text[1:Language=$parameters.P_Language].LongText AS LiquidityItemdDesc,
coalesce(_bankGroupInfo.BankHeadquarter,'') AS BankGroup,
coalesce(_bankGroupInfo.BankHeadquarterName,'') AS BankGroupName,
_CashPlanningGroup._Text[1:Language=$parameters.P_Language].CashPlanningGroupName AS CashPlanningGroupName,
_CashPlanningGroup._Text[1:Language=$parameters.P_Language].CashPlanningGroupDescription AS CashPlanningGroupDescription,
$parameters.P_DisplayCurrency AS Display_Currency,
$parameters.P_CyclePattern AS Cycle_Pattern,
'' AS CalendarEnd,
_AggregatedCashFlow.bal_type AS Bal_Type_Ext,
_AggregatedCashFlow.rel_status AS rel_status,
_AggregatedCashFlow.fund AS Fund,
_Fund._Text[1:Language=$parameters.P_Language].FundName AS FundName,
_AggregatedCashFlow.grantid AS GrantID,
_Grant._Text[1:Language=$parameters.P_Language].GrantName AS GrantName,
_AggregatedCashFlow.costcenter AS CostCenter,
_CostCenter._Text[1:Language=$parameters.P_Language].CostCenterName AS CostCenterName,
_AggregatedCashFlow.overdue AS overdue,
_AggregatedCashFlow.day1 AS data1,
_AggregatedCashFlow.day2 AS data2,
_AggregatedCashFlow.day3 AS data3,
_AggregatedCashFlow.day4 AS data4,
_AggregatedCashFlow.day5 AS data5,
_AggregatedCashFlow.day6 AS data6,
_AggregatedCashFlow.day7 AS data7,
_AggregatedCashFlow.day8 AS data8,
_AggregatedCashFlow.day9 AS data9,
_AggregatedCashFlow.day10 AS data10,
_AggregatedCashFlow.day11 AS data11,
_AggregatedCashFlow.day12 AS data12,
_AggregatedCashFlow.day13 AS data13,
_AggregatedCashFlow.day14 AS data14,
_AggregatedCashFlow.day15 AS data15,
_AggregatedCashFlow.day16 AS data16,
_AggregatedCashFlow.day17 AS data17,
_AggregatedCashFlow.day18 AS data18,
_AggregatedCashFlow.day19 AS data19,
_AggregatedCashFlow.day20 AS data20,
_AggregatedCashFlow.day21 AS data21,
_AggregatedCashFlow.day22 AS data22,
_AggregatedCashFlow.day23 AS data23,
_AggregatedCashFlow.day24 AS data24,
_AggregatedCashFlow.day25 AS data25,
_AggregatedCashFlow.day26 AS data26,
_AggregatedCashFlow.day27 AS data27,
_AggregatedCashFlow.day28 AS data28,
_AggregatedCashFlow.day29 AS data29,
_AggregatedCashFlow.day30 AS data30,
_AggregatedCashFlow.day31 AS data31,
_AggregatedCashFlow.day32 AS data32,
_AggregatedCashFlow.convert_overdue AS Convert_overdue,
_AggregatedCashFlow.convert_day1 AS Convert_data1,
_AggregatedCashFlow.convert_day2 AS Convert_data2,
_AggregatedCashFlow.convert_day3 AS Convert_data3,
_AggregatedCashFlow.convert_day4 AS Convert_data4,
_AggregatedCashFlow.convert_day5 AS Convert_data5,
_AggregatedCashFlow.convert_day6 AS Convert_data6,
_AggregatedCashFlow.convert_day7 AS Convert_data7,
_AggregatedCashFlow.convert_day8 AS Convert_data8,
_AggregatedCashFlow.convert_day9 AS Convert_data9,
_AggregatedCashFlow.convert_day10 AS Convert_data10,
_AggregatedCashFlow.convert_day11 AS Convert_data11,
_AggregatedCashFlow.convert_day12 AS Convert_data12,
_AggregatedCashFlow.convert_day13 AS Convert_data13,
_AggregatedCashFlow.convert_day14 AS Convert_data14,
_AggregatedCashFlow.convert_day15 AS Convert_data15,
_AggregatedCashFlow.convert_day16 AS Convert_data16,
_AggregatedCashFlow.convert_day17 AS Convert_data17,
_AggregatedCashFlow.convert_day18 AS Convert_data18,
_AggregatedCashFlow.convert_day19 AS Convert_data19,
_AggregatedCashFlow.convert_day20 AS Convert_data20,
_AggregatedCashFlow.convert_day21 AS Convert_data21,
_AggregatedCashFlow.convert_day22 AS Convert_data22,
_AggregatedCashFlow.convert_day23 AS Convert_data23,
_AggregatedCashFlow.convert_day24 AS Convert_data24,
_AggregatedCashFlow.convert_day25 AS Convert_data25,
_AggregatedCashFlow.convert_day26 AS Convert_data26,
_AggregatedCashFlow.convert_day27 AS Convert_data27,
_AggregatedCashFlow.convert_day28 AS Convert_data28,
_AggregatedCashFlow.convert_day29 AS Convert_data29,
_AggregatedCashFlow.convert_day30 AS Convert_data30,
_AggregatedCashFlow.convert_day31 AS Convert_data31,
_AggregatedCashFlow.convert_day32 AS Convert_data32
FROM P_Fclm_Flow_Analyzer_Tb
LEFT OUTER JOIN I_BankAccount AS _BankAccount ON BankAccountInternalID = _BankAccount.BankAccountInternalID -- association [1..1]
LEFT OUTER JOIN I_BankAccountWithBGN AS _BankGroup ON BankAccountInternalID = _BankGroup.BankAccountInternalID -- association [0..1]
LEFT OUTER JOIN I_LiquidityItem AS _LiquidityItem ON LiquidityItem = _LiquidityItem.LiquidityItem -- association [0..1]
LEFT OUTER JOIN I_PlanningLevel AS _PlanningLevel ON PlanningLevel = _PlanningLevel.PlanningLevel -- association [0..1]
LEFT OUTER JOIN I_BankAccountWithBGN AS _bankGroupInfo ON BankAccountInternalID = _bankGroupInfo.BankAccountInternalID -- association [0..1]
LEFT OUTER JOIN E_BankAccount AS _BankAccountExtension ON BankAccountInternalID = _BankAccountExtension.BankAccountInternalID -- association [0..1]
LEFT OUTER JOIN I_CashPlanningGroup AS _CashPlanningGroup ON CashPlanningGroup = _CashPlanningGroup.CashPlanningGroup -- association [0..1]
LEFT OUTER JOIN I_Fund AS _Fund ON Fund = _Fund.Fund AND _CompanyCode.FinancialManagementArea = _Fund.FinancialManagementArea -- association [0..1]
LEFT OUTER JOIN I_Grant AS _Grant ON GrantID = _Grant.GrantID -- association [0..1]
LEFT OUTER JOIN I_CostCenter AS _CostCenter ON CostCenter = _CostCenter.CostCenter AND _CompanyCode.ControllingArea = _CostCenter.ControllingArea AND _CostCenter.ValidityEndDate >= $session.user_date AND _CostCenter.ValidityStartDate <= $session.user_date -- association [0..1]
;