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_AllocationRunResult.
-- 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: IALLOCRUNRES
CREATE VIEW I_AllocationRunResult AS
SELECT
run_id AS UniversalAllocationRun,
cycle_key AS AllocationCycle,
sdate_key AS AllocationCycleStartDate,
cast( segment_key as fco_alloc_run_segment_number preserving type ) AS AllocationCycleSegment,
data_type AS AllocationRunDataCategory,
alloc_result_seqnr AS AllocationRunResultItem,
rldnr AS Ledger,
rbukrs AS CompanyCode,
cast(gjahr as fis_gjahr preserving type ) AS FiscalYear,
cast(belnr as farp_belnr_d preserving type ) AS AccountingDocument,
cast(ryear as fis_ryear preserving type ) AS LedgerFiscalYear,
rrcty AS GLRecordType,
cast(rmvct as fis_rmvct preserving type) AS FinancialTransactionType,
cast(bttype as fis_bttype preserving type) AS BusinessTransactionType,
cast(awtyp as fis_awtyp preserving type) AS ReferenceDocumentType,
cast(awsys as logsystem preserving type) AS LogicalSystem,
cast(aworg as fis_aworg preserving type) AS ReferenceDocumentContext,
awref AS ReferenceDocument,
cast( awitem as fis_awitem preserving type ) AS ReferenceDocumentItem,
cast( awitgrp as fis_awitgrp preserving type ) AS ReferenceDocumentItemGroup,
subta AS TransactionSubitem,
xreversing AS IsReversal,
xreversed AS IsReversed,
cast( aworg_rev as fis_aworg_rev preserving type ) AS ReversalReferenceDocumentCntxt,
cast( awref_rev as fis_awref_rev preserving type ) AS ReversalReferenceDocument,
xsettling AS IsSettlement,
xsettled AS IsSettled,
cast( prec_awtyp as fis_prec_awtyp preserving type ) AS PredecessorReferenceDocType,
cast( prec_aworg as fis_prec_aworg preserving type ) AS PredecessorReferenceDocCntxt,
cast( prec_awref as fis_prec_awref preserving type ) AS PredecessorReferenceDocument,
cast( prec_awitem as fis_prec_awitem preserving type ) AS PredecessorReferenceDocItem,
cast( src_awtyp as fis_src_awtyp preserving type ) AS SourceReferenceDocumentType,
cast( src_awsys as fis_src_awsys preserving type ) AS SourceLogicalSystem,
cast( src_aworg as fis_src_aworg preserving type ) AS SourceReferenceDocumentCntxt,
cast( src_awref as fis_src_awref preserving type ) AS SourceReferenceDocument,
cast( src_awitem as fis_src_awitem preserving type ) AS SourceReferenceDocumentItem,
cast( src_awsubit as fis_src_awsubit preserving type ) AS SourceReferenceDocSubitem,
cast( xcommitment as fis_xcommitment preserving type ) AS IsCommitment,
obs_reason AS JrnlEntryItemObsoleteReason,
cast(rtcur as fis_rtcur preserving type) AS BalanceTransactionCurrency,
cast(rwcur as fis_rwcur preserving type) AS TransactionCurrency,
cast(rhcur as fis_hwaer preserving type) AS CompanyCodeCurrency,
cast(rkcur as fis_rkcur preserving type) AS GlobalCurrency,
cast(rocur as fis_rocur preserving type) AS FreeDefinedCurrency1,
cast(rvcur as fis_rvcur preserving type) AS FreeDefinedCurrency2,
cast( rbcur as fis_curr3 preserving type ) AS FreeDefinedCurrency3,
cast( rccur as fis_curr4 preserving type ) AS FreeDefinedCurrency4,
cast( rdcur as fis_curr5 preserving type ) AS FreeDefinedCurrency5,
cast( recur as fis_curr6 preserving type ) AS FreeDefinedCurrency6,
cast(rfcur as fis_rfcur preserving type) AS FreeDefinedCurrency7,
cast( rgcur as fis_curr8 preserving type ) AS FreeDefinedCurrency8,
rco_ocur AS ControllingObjectCurrency,
runit AS BaseUnit,
cast(rvunit as fis_co_meinh preserving type) AS CostSourceUnit,
cast( qunit1 as fis_qunit1 preserving type ) AS AdditionalQuantity1Unit,
cast( qunit2 as fis_qunit2 preserving type ) AS AdditionalQuantity2Unit,
cast( qunit3 as fis_qunit3 preserving type ) AS AdditionalQuantity3Unit,
cast(racct as fis_racct preserving type) AS GLAccount,
cast(rcntr as fis_kostl preserving type) AS CostCenter,
cast(prctr as fis_prctr preserving type) AS ProfitCenter,
cast(rfarea as fm_farea preserving type) AS FunctionalArea,
cast(rbusa as fis_rbusa preserving type) AS BusinessArea,
cast(kokrs as fis_kokrs preserving type) AS ControllingArea,
cast(segment as fco_reporting_segment preserving type ) AS ReportingSegment,
cast(scntr as fis_skost preserving type) AS PartnerCostCenter,
cast(pprctr as fis_pprctr preserving type) AS PartnerProfitCenter,
cast(sfarea as fis_sfkber preserving type) AS PartnerFunctionalArea,
cast(sbusa as fis_pargb preserving type) AS PartnerBusinessArea,
cast(rassc as fis_rassc preserving type) AS PartnerCompany,
psegment AS PartnerSegment,
cast(tsl as fis_tsl preserving type) AS AmountInBalanceTransacCrcy,
cast(wsl as fis_wsl preserving type) AS AmountInTransactionCurrency,
cast(hsl as alloc_run_fins_vhcur12 preserving type ) AS AmountInCompanyCodeCurrency,
cast(ksl as alloc_run_fins_vkcur12 preserving type ) AS AmountInGlobalCurrency,
rfccur AS FunctionalCurrency,
cast(fcsl as fis_vfccur12 preserving type) AS AmountInFunctionalCurrency,
cast(osl as fis_osl preserving type) AS AmountInFreeDefinedCurrency1,
cast(vsl as fis_vsl preserving type) AS AmountInFreeDefinedCurrency2,
cast(bsl as fis_bsl preserving type) AS AmountInFreeDefinedCurrency3,
cast(csl as fis_csl preserving type) AS AmountInFreeDefinedCurrency4,
cast(dsl as fis_dsl preserving type) AS AmountInFreeDefinedCurrency5,
cast(esl as fis_esl preserving type) AS AmountInFreeDefinedCurrency6,
cast(fsl as fis_fsl preserving type) AS AmountInFreeDefinedCurrency7,
cast(gsl as fis_gsl preserving type) AS AmountInFreeDefinedCurrency8,
cast(kfsl as fis_kfsl preserving type) AS FixedAmountInGlobalCrcy,
cast( kfsl2 as fis_vgcur12_fix2 preserving type ) AS GrpValnFixedAmtInGlobCrcy,
cast( kfsl3 as fis_vgcur12_fix3 preserving type ) AS PrftCtrValnFxdAmtInGlobCrcy,
cast(psl as fis_psl preserving type) AS TotalPriceVarcInGlobalCrcy,
cast( psl2 as fis_vpcur12_2 preserving type ) AS GrpValnTotPrcVarcInGlobCrcy,
cast( psl3 as fis_vpcur12_3 preserving type ) AS PrftCtrValnTotPrcVarcInGlbCrcy,
cast(pfsl as fis_pfsl preserving type) AS FixedPriceVarcInGlobalCrcy,
cast( pfsl2 as fis_vpfcur12_2 preserving type ) AS GrpValnFixedPrcVarcInGlobCrcy,
cast( pfsl3 as fis_vpfcur12_3 preserving type ) AS PrftCtrValnFxdPrcVarcInGlbCrcy,
cast( co_osl as fis_vco_ocur12 preserving type ) AS AmountInObjectCurrency,
msl AS Quantity,
cast( mfsl as fis_quan1_12_fix preserving type ) AS FixedQuantity,
cast( vmsl as fis_vquan1_12 preserving type ) AS ValuationQuantity,
cast( vmfsl as fis_vquan1_12_fix preserving type ) AS ValuationFixedQuantity,
cast( quant1 as fis_quan1_l preserving type ) AS AdditionalQuantity1,
cast( quant2 as fis_quan2_l preserving type ) AS AdditionalQuantity2,
cast( quant3 as fis_quan3_l preserving type ) AS AdditionalQuantity3,
cast(drcrk as fis_shkzg preserving type) AS DebitCreditCode,
cast(poper as fins_fiscalperiod preserving type) AS FiscalPeriod,
cast(periv as fis_periv preserving type) AS FiscalYearVariant,
cast(fiscyearper as fis_jahrper_conv preserving type ) AS FiscalYearPeriod,
cast(budat as fis_budat preserving type) AS PostingDate,
cast(bldat as fis_bldat preserving type) AS DocumentDate,
cast(blart as fis_blart preserving type) AS AccountingDocumentType,
cast(buzei as fis_buzei preserving type) AS AccountingDocumentItem,
cast(zuonr as fis_zuonr preserving type) AS AssignmentReference,
cast(bschl as fis_bschl preserving type) AS PostingKey,
cast(bstat as fis_bstat preserving type) AS AccountingDocumentCategory,
cast(ktosl as fac_ktosl preserving type) AS TransactionTypeDetermination,
slalittype AS SubLedgerAcctLineItemType,
cast(usnam as fis_usnam preserving type) AS AccountingDocCreatedByUser,
cast( timestamp as fis_chng_tstamp preserving type ) AS LastChangeDateTime,
cast( timestamp as fis_crea_tstamp preserving type ) AS CreationDateTime,
cast( eprctr as fis_eprctr preserving type ) AS EliminationProfitCenter,
cast(rhoart as fis_hoart preserving type) AS OriginObjectType,
glaccount_type AS GLAccountType,
cast(ktopl as fis_ktopl preserving type) AS ChartOfAccounts,
cast(lokkt as fis_altkt_skb1 preserving type) AS AlternativeGLAccount,
cast(ktop2 as fis_ktop2 preserving type) AS CountryChartOfAccounts,
cast( xsplitmod as xsplitmod_acd preserving type ) AS ItemIsSplit,
cast(rebzg as fis_rebzg preserving type) AS InvoiceReference,
cast(rebzj as fis_rebzj preserving type) AS InvoiceReferenceFiscalYear,
cast(rebzz as fis_rebzz preserving type) AS InvoiceItemReference,
cast( rebzt as fis_rebzt preserving type ) AS FollowOnDocumentType,
cast(rbest as fis_refbtyp preserving type) AS ReferencePurchaseOrderCategory,
cast(ebeln as fis_ebeln preserving type) AS PurchasingDocument,
cast(ebelp as fis_ebelp preserving type) AS PurchasingDocumentItem,
cast( zekkn as fis_dzekkn preserving type ) AS AccountAssignmentNumber,
cast(sgtxt as farp_sgtxt preserving type) AS DocumentItemText,
cast(kdauf as vdm_sales_order preserving type) AS SalesOrder,
cast(kdpos as posnr_va preserving type) AS SalesDocumentItem,
matnr AS Material,
werks AS Plant,
cast(lifnr as md_supplier preserving type) AS Supplier,
cast(kunnr as kunnr preserving type) AS Customer,
fbuda AS ServicesRenderedDate,
coco_num AS ConditionContract,
cast(koart as farp_koart preserving type) AS FinancialAccountType,
cast(umskz as fac_umskz preserving type) AS SpecialGLCode,
cast(mwskz as fis_mwskz preserving type) AS TaxCode,
cast(hbkid as farp_hbkid preserving type) AS HouseBank,
cast(hktid as fac_hktid preserving type) AS HouseBankAccount,
cast(xopvw as fis_xopvw preserving type) AS IsOpenItemManaged,
cast(augdt as fis_augdt preserving type) AS ClearingDate,
cast(augbl as fis_augbl preserving type) AS ClearingAccountingDocument,
cast(auggj as fis_auggj preserving type) AS ClearingDocFiscalYear,
cast(afabe as fis_afabe_d preserving type) AS AssetDepreciationArea,
cast(anln1 as fis_anln1 preserving type) AS MasterFixedAsset,
cast(anln2 as fis_anln2 preserving type) AS FixedAsset,
bzdat AS AssetValueDate,
anbwa AS AssetTransactionType,
movcat AS AssetAcctTransClassfctn,
cast(depr_period as fis_peraf preserving type) AS DepreciationFiscalPeriod,
cast(anlgr as fis_anlgr preserving type) AS GroupMasterFixedAsset,
cast(anlgr2 as fis_anlgr2 preserving type) AS GroupFixedAsset,
anlkl AS AssetClass,
cast(kalnr as fis_kalnr preserving type) AS CostEstimate,
cast( kzbws as fis_inventoryspclstockvalntype preserving type ) AS InventorySpecialStockValnType,
cast( sobkz as fis_inventoryspecialstocktype preserving type ) AS InventorySpecialStockType,
cast( mat_kdauf as fis_mlmat_kdauf preserving type ) AS InventorySpclStkSalesDocument,
cast( mat_kdpos as fis_mlmat_kdpos preserving type ) AS InventorySpclStkSalesDocItm,
cast( mat_pspnr as fis_invspstock_wbsint_no_conv preserving type ) AS InvtrySpclStockWBSElmntIntID,
cast( mat_ps_posid as fis_invspstock_wbs_no_conv preserving type ) AS InventorySpclStockWBSElement,
cast(mat_lifnr as fis_mlmat_lifnr preserving type) AS InventorySpecialStockSupplier,
cast( bwtar as fis_bwtar_d preserving type ) AS InventoryValuationType,
bwkey AS ValuationArea,
cast( bukrs_sender as fis_bukrs_sender preserving type ) AS SenderCompanyCode,
racct_sender AS SenderGLAccount,
cast( accas_sender as fis_accas_sender preserving type ) AS SenderAccountAssignment,
cast( accasty_sender as fis_accasty_sender preserving type ) AS SenderAccountAssignmentType,
cast( objnr as fis_objnr preserving type) AS ControllingObject,
hkgrp AS CostOriginGroup,
cast( uspob as fis_uspob preserving type) AS OriginSenderObject,
cast( co_belkz as fis_co_belkz preserving type ) AS ControllingDebitCreditCode,
cast( beltp as fis_bp_inout preserving type ) AS ControllingObjectDebitType,
muvflg AS QuantityIsIncomplete,
cast(gkont as fis_gkont preserving type) AS OffsettingAccount,
cast( gkoar as fis_gkoar preserving type ) AS OffsettingAccountType,
cast(erlkz as fis_kblerlkz preserving type) AS LineItemIsCompleted,
pernr AS PersonnelNumber,
cast( scope as alloc_run_scope_cv preserving type ) AS ControllingObjectClass,
cast( pbukrs as fis_pbukrs preserving type ) AS PartnerCompanyCode,
cast( pscope as alloc_run_partner_obj_class preserving type ) AS PartnerControllingObjectClass,
cast(ukostl as fis_usp_kostl preserving type) AS OriginCostCenter,
cast(ulstar as fins_usp_lstar preserving type) AS OriginCostCtrActivityType,
uprctr AS OriginProfitCenter,
accas AS AccountAssignment,
cast(accasty as fis_accasty preserving type) AS AccountAssignmentType,
lstar AS CostCtrActivityType,
cast(aufnr as fis_aufnr preserving type) AS OrderID,
autyp AS OrderCategory,
cast( ps_psp_pnr as fis_wbsint_no_conv preserving type ) AS WBSElementInternalID,
cast( ps_posid as fis_wbs preserving type ) AS WBSElement,
cast( ps_posid as fis_wbsext_no_conv preserving type ) AS WBSElementExternalID,
cast( ps_prj_pnr as fis_projectint_no_conv preserving type ) AS ProjectInternalID,
cast( ps_pspid as fis_project preserving type ) AS Project,
nplnr AS ProjectNetwork,
nplnr_vorgn AS RelatedNetworkActivity,
prznr AS BusinessProcess,
kstrg AS CostObject,
cast(bemot as fis_bemot preserving type ) AS BillableControl,
cast(rsrce as fis_co_resource preserving type ) AS CostAnalysisResource,
cast( qmnum as fis_qmnum preserving type ) AS CustomerServiceNotification,
service_doc_type AS ServiceDocumentType,
service_doc_id AS ServiceDocument,
service_doc_item_id AS ServiceDocumentItem,
service_contract_type AS ServiceContractType,
service_contract_id AS ServiceContract,
service_contract_item_id AS ServiceContractItem,
cast(solution_order_id as crms4_solo_object_id preserving type ) AS BusinessSolutionOrder,
cast(solution_order_item_id as crms4_solo_number_int preserving type ) AS BusinessSolutionOrderItem,
cast( vtkey as fis_vtkey_kk preserving type ) AS CAProviderContract,
cast( vtpos as fis_vtpos_kk preserving type ) AS CAProviderContractItemNumber,
overtimecat AS TimeSheetOvertimeCategory,
cast( ps_posid as /cpd/plan_item_id ) AS WorkPackage,
work_item_id AS WorkItem,
erkrs AS OperatingConcern,
cast(paccas as fis_paccas preserving type) AS PartnerAccountAssignment,
cast(paccasty as fins_paccasty preserving type) AS PartnerAccountAssignmentType,
cast(plstar as fis_par_lstar preserving type) AS PartnerCostCtrActivityType,
cast(paufnr as fis_par_aufnr preserving type) AS PartnerOrder,
cast(pautyp as fis_par_auftyp preserving type) AS PartnerOrderCategory,
cast( pps_psp_pnr as fis_partner_wbsint_no_conv preserving type ) AS PartnerWBSElementInternalID,
cast( pps_posid as fis_partner_wbs preserving type ) AS PartnerWBSElement,
cast( pps_prj_pnr as fis_part_projectint_no_conv preserving type ) AS PartnerProjectInternalID,
cast( pps_pspid as fis_part_project_no_conv preserving type ) AS PartnerProject,
cast(pkdauf as fis_par_kdauf preserving type) AS PartnerSalesDocument,
cast(pkdpos as fis_par_kdpos preserving type) AS PartnerSalesDocumentItem,
cast( pnplnr as fis_par_npln preserving type ) AS PartnerProjectNetwork,
cast( pnplnr_vorgn as fis_par_vornr_auf preserving type ) AS PartnerProjectNetworkActivity,
cast( pprznr as fis_par_prznr preserving type ) AS PartnerBusinessProcess,
pkstrg AS PartnerCostObject,
fkart AS BillingDocumentType,
vkorg AS SalesOrganization,
vtweg AS DistributionChannel,
spart AS OrganizationDivision,
cast (matnr_copa as fins_matnr_pa preserving type) AS SoldProduct,
cast (matkl as productgroup preserving type) AS SoldProductGroup,
kdgrp AS CustomerGroup,
cast( land1 as fis_land1_gp preserving type ) AS CustomerSupplierCountry,
cast( brsch as fis_brsch preserving type ) AS CustomerSupplierIndustry,
bzirk AS SalesDistrict,
kunre AS BillToParty,
kunwe AS ShipToParty,
cast( konzs as fis_konzs preserving type ) AS CustomerSupplierCorporateGroup,
cast('A000' as fikrs preserving type ) AS FinancialManagementArea,
cast(fistl as farp_fistl preserving type) AS FundsCenter,
measure AS FundedProgram,
rfund AS Fund,
rgrant_nbr AS GrantID,
rbudget_pd AS BudgetPeriod,
sfund AS PartnerFund,
sgrant_nbr AS PartnerGrant,
cast( sbudget_pd as fis_fm_pbudget_period preserving type ) AS PartnerBudgetPeriod,
vname AS JointVenture,
cast( egrup as jv_egroup_cds preserving type ) AS JointVentureEquityGroup,
cast( recid as jv_recind_cds preserving type ) AS JointVentureCostRecoveryCode,
cast( vptnr as jv_part_cds preserving type ) AS JointVenturePartner,
cast( btype as jv_bilind_cds preserving type ) AS JointVentureBillingType,
cast( etype as jv_etype_cds preserving type ) AS JointVentureEquityType,
cast( prodper as jv_prodper_cds preserving type ) AS JointVentureProductionDate,
cast( billm as jv_billm_cds preserving type ) AS JointVentureBillingDate,
cast( pom as jv_pom_cds preserving type ) AS JointVentureOperationalDate,
cast( cbrunid as jv_cbrunid_cds preserving type ) AS CutbackRun,
cast( jvactivity as jv_activity_cds preserving type ) AS JointVentureAccountingActivity,
cast( pvname as fco_alloc_run_partner_venture preserving type ) AS PartnerVenture,
cast( pegrup as jv_pegrup_cds preserving type ) AS PartnerEquityGroup,
cast( s_recind as jv_srecind_cds preserving type ) AS SenderCostRecoveryCode,
cast( cbracct as jv_cbracct_cds preserving type ) AS CutbackAccount,
cast( cbobjnr as jv_cbobjnr_cds preserving type ) AS CutbackCostObject,
cast(swenr as rebdvdmbeno preserving type ) AS REBusinessEntity,
cast(sgenr as rebdvdmbuno preserving type ) AS RealEstateBuilding,
cast(sgrnr as rebdvdmprno preserving type ) AS RealEstateProperty,
cast(smenr as rebdvdmrono preserving type ) AS RERentalObject,
cast(recnnr as recnvdmcnnr preserving type ) AS RealEstateContract,
cast(snksl as rescvdmsckey preserving type ) AS REServiceChargeKey,
cast(sempsl as rescvdmsuid preserving type ) AS RESettlementUnitID,
cast( dabrz as fis_dabrbez preserving type ) AS SettlementReferenceDate,
cast(pswenr as rebdvdmpbeno preserving type ) AS REPartnerBusinessEntity,
cast(psgenr as rebdvdmpbuno preserving type ) AS RealEstatePartnerBuilding,
cast(psgrnr as rebdvdmpprno preserving type ) AS RealEstatePartnerProperty,
cast(psmenr as rebdvdmprono preserving type ) AS REPartnerRentalObject,
cast(precnnr as recnvdmpcnnr preserving type ) AS RealEstatePartnerContract,
cast(psnksl as rescvdmpsckey preserving type ) AS REPartnerServiceChargeKey,
cast(psempsl as rescvdmpsuid preserving type ) AS REPartnerSettlementUnitID,
cast(pdabrz as fins_par_dabrbez preserving type ) AS PartnerSettlementReferenceDate,
vrgng AS ControllingBusTransacType,
prec_bukrs AS PrdcssrJournalEntryCompanyCode,
cast(prec_gjahr as fins_prec_gjahr_gfc_no_conv preserving type ) AS PrdcssrJournalEntryFiscalYear,
prec_belnr AS PredecessorJournalEntry,
prec_docln AS PredecessorJournalEntryItem,
orgl_change AS OrganizationalChange,
rgm_ocur AS GrantCurrency,
gm_osl AS AmountInGrantCurrency,
cast( rrunit as fis_ref_qty_uom preserving type ) AS ReferenceQuantityUnit,
rmsl AS ReferenceQuantity,
cast(kdauf as vbeln_va preserving type) AS SalesDocument,
cast (matnr as productnumber preserving type ) AS Product,
perop_beg AS PerformancePeriodStartDate,
perop_end AS PerformancePeriodEndDate,
tax_country AS TaxCountry,
valut AS ValueDate,
co_beknz AS OriginCtrlgDebitCreditCode,
cast(umatnr as fis_origin_matnr preserving type) AS OriginProduct,
cast(varc_uacct as fis_varc_origin_acct preserving type) AS VarianceOriginGLAccount,
cast( pservice_doc_type as fis_psrvdoc_type preserving type ) AS PartnerServiceDocumentType,
cast( pservice_doc_id as fis_psrvdoc_id preserving type ) AS PartnerServiceDocument,
cast( pservice_doc_item_id as fis_psrvdoc_item_id preserving type ) AS PartnerServiceDocumentItem,
re_bukrs AS CashLedgerCompanyCode,
re_account AS CashLedgerAccount,
bdgt_account AS PubSecBudgetAccount,
bdgt_account_cocode AS PubSecBudgetAccountCoCode,
bdgt_cnsmpn_date AS PubSecBudgetCnsmpnDate,
bdgt_cnsmpn_period AS PubSecBudgetCnsmpnFsclPeriod,
bdgt_cnsmpn_year AS PubSecBudgetCnsmpnFsclYear,
bdgt_relevant AS PubSecBudgetIsRelevant,
bdgt_cnsmpn_type AS PubSecBudgetCnsmpnType,
bdgt_cnsmpn_amount_type AS PubSecBudgetCnsmpnAmtType,
rsponsored_prog AS SponsoredProgram,
rsponsored_class AS SponsoredClass,
stagr AS StatisticalKeyFigure,
category AS AllocationCycleCategory,
cyctxt AS AllocationCycleNameText,
cast(substring(cycle, 3, 8) as fco_alloc_cycle preserving type ) AS AllocationCycleName,
seqname AS SegmentName,
seqtxt AS SegmentNameDescription,
_Run.AllocationActualPlanVariant AS AllocationActualPlanVariant,
_Run.AllocationPostingType AS AllocationPostingType,
_Run.AllocationType AS AllocationType,
_Run.AllocationRunType AS AllocationRunType
FROM alloc_run_res
LEFT OUTER JOIN I_AllocationRun AS _Run ON UniversalAllocationRun = _Run.UniversalAllocationRun -- association [0..1]
;