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_RABusinessReconciliation.
-- 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.
CREATE VIEW I_RABusinessReconciliation AS
SELECT
company_code AS CompanyCode,
acct_principle AS AccountingPrinciple,
cast(contract_id as farr_cds_contract_id preserving type) AS RevenueAccountingContract,
cast(pob_id as farr_cds_pob_id preserving type) AS PerformanceObligation,
cast(condition_type as farr_cond_type preserving type) AS ConditionType,
cast(acct_period as fis_jahrper_conv preserving type) AS FiscalYearPeriod,
exec_type AS RABusinessRecnclnViewType,
cast(header_id as farr_operational_doc preserving type) AS RevnAcctgOperationalDocument,
cast(item_id as farr_item_id preserving type) AS RAOperationalDocumentItem,
cast(op_cond_price as farr_cds_op_cond_price preserving type) AS OplContractualPrcInSlsDocCrcy,
cast(op_cond_cost as farr_cds_op_cond_cost preserving type) AS RAOplCostAmtInSlsDocCrcy,
cast(operation_curr as waers preserving type) AS TransactionCurrency,
cast(invoice_amount as farr_opl_invoiced_amt preserving type) AS TotalInvoicedAmtInSlsDocCrcy,
cast(invoice_currency as farr_invoice_currency preserving type) AS InvoiceCurrency,
cast(cost_amount as farr_cds_cost_price preserving type) AS RAOplCostPriceAmtInSlsDocCrcy,
cast(cost_currency as farr_cost_currency preserving type) AS CostCurrency,
cast(material as matnr preserving type) AS Material,
cast(mat_desc as maktx preserving type) AS MaterialName,
waers AS SalesDocumentCurrency,
trx_price AS ContractualPrcInSlsDocCrcy,
cast(cost_amt as farr_cost_total preserving type) AS RAPerfOblgnCostAmtInSlsDocCrcy,
cast(ssp as farr_cds_standalone_price preserving type) AS SSPriceInSalesDocCrcy,
alloc_amt AS AllocatedPriceInSalesDocCrcy,
cast(sched_rv as farr_recog_amt preserving type) AS RARecognizedRevnInSlsDocCrcy,
cast(sched_co as farr_recog_cost preserving type) AS RARecgdCostAmountInSlsDocCrcy,
cast(sched_ic as farr_invoiced_amt preserving type) AS PerPerdInvoicedAmtInSlsDocCrcy,
cast(post_rv as farr_cds_posted_rv preserving type) AS PostedRevnInSlsDocCrcy,
cast(post_ic as farr_cds_posted_ic preserving type) AS PostedInvoiceAmtInSlsDocCrcy,
cast(post_co as farr_cds_posted_co preserving type) AS RAPostedCostInSlsDocCrcy,
cast(post_ur as farr_cds_posted_ur preserving type) AS RAPostedUnbilldRblsAmount,
cast(post_dr as farr_cds_posted_dr preserving type) AS RADeferredRevenueInSlsDocCrcy,
cast(post_ca as farr_cds_posted_ca preserving type) AS RAContractAssetsAmount,
cast(post_cl as farr_cds_posted_cl preserving type) AS RAContrLiabilitiesAmount,
cast(post_cj as farr_cds_posted_cj preserving type) AS PostdDfrrdCostAmtInSlsDocCrcy,
cast(suspended_revenue as farr_cds_suspended_revenue preserving type) AS SuspendedRevnAmtInSlsDocCrcy,
cast(suspended_cost as farr_cds_suspended_cost preserving type) AS SuspendedCostAmtInSlsDocCrcy,
local_curk1 AS CompanyCodeCurrency,
cast(post_rv_lc1 as farr_cds_posted_rv_lc1 preserving type) AS RAPostedRevenueAmtInCoCodeCrcy,
cast(post_ic_lc1 as farr_cds_posted_ic_lc1 preserving type) AS RAPostedInvoiceAmtInCoCodeCrcy,
cast(post_co_lc1 as farr_cds_posted_co_lc1 preserving type) AS RAPostedCostAmountInCoCodeCrcy,
cast(post_ur_lc1 as farr_cds_posted_ur_lc1 preserving type) AS PostdUnbilldRblAmtInCoCodeCrcy,
cast(post_dr_lc1 as farr_cds_posted_dr_lc1 preserving type) AS PostedDfrrdRevnAmtInCoCodeCrcy,
cast(post_ca_lc1 as farr_cds_posted_ca_lc1 preserving type) AS RAPostdContrAstAmtInCoCodeCrcy,
cast(post_cl_lc1 as farr_cds_posted_cl_lc1 preserving type) AS PostdContrLbltyAmtInCoCodeCrcy,
cast(post_cj_lc1 as farr_cds_posted_cj_lc1 preserving type) AS PostdDfrrdCostAmtInCoCodeCrcy,
local_curk2 AS AdditionalCurrency1,
cast(post_rv_lc2 as farr_cds_posted_rv_lc2 preserving type) AS RAPostedRevenueAmtInAddlCrcy1,
cast(post_ic_lc2 as farr_cds_posted_ic_lc2 preserving type) AS RAPostedInvoiceAmtInAddlCrcy1,
cast(post_co_lc2 as farr_cds_posted_co_lc2 preserving type) AS RAPostedCostAmountInAddlCrcy1,
cast(post_ur_lc2 as farr_cds_posted_ur_lc2 preserving type) AS PostedUnbilldRblAmtInAddlCrcy1,
cast(post_dr_lc2 as farr_cds_posted_dr_lc2 preserving type) AS RAPostdDfrrdRevnAmtInAddlCrcy1,
cast(post_ca_lc2 as farr_cds_posted_ca_lc2 preserving type) AS RAPostedContrAstAmtInAddlCrcy1,
cast(post_cl_lc2 as farr_cds_posted_cl_lc2 preserving type) AS PostedContrLbltyAmtInAddlCrcy1,
cast(post_cj_lc2 as farr_cds_posted_cj_lc2 preserving type) AS RAPostdDfrrdCostAmtInAddlCrcy1,
local_curk3 AS AdditionalCurrency2,
cast(post_rv_lc3 as farr_cds_posted_rv_lc3 preserving type) AS RAPostedRevenueAmtInAddlCrcy2,
cast(post_ic_lc3 as farr_cds_posted_ic_lc3 preserving type) AS RAPostedInvoiceAmtInAddlCrcy2,
cast(post_co_lc3 as farr_cds_posted_co_lc3 preserving type) AS RAPostedCostAmountInAddlCrcy2,
cast(post_ur_lc3 as farr_cds_posted_ur_lc3 preserving type) AS PostedUnbilldRblAmtInAddlCrcy2,
cast(post_dr_lc3 as farr_cds_posted_dr_lc3 preserving type) AS RAPostdDfrrdRevnAmtInAddlCrcy2,
cast(post_ca_lc3 as farr_cds_posted_ca_lc3 preserving type) AS RAPostedContrAstAmtInAddlCrcy2,
cast(post_cl_lc3 as farr_cds_posted_cl_lc3 preserving type) AS PostedContrLbltyAmtInAddlCrcy2,
cast(post_cj_lc3 as farr_cds_posted_cj_lc3 preserving type) AS RAPostdDfrrdCostAmtInAddlCrcy2,
cast(status as farr_cds_pob_status preserving type) AS RevnAcctgPerfOblgnStatus,
cast(gl_acc_ic_cc as farr_cds_acc_ic_cc preserving type) AS RAGenLdgrCorrectionAccount,
cast(gl_acc_rv_co as farr_cds_acc_rv_co preserving type) AS RAGenLdgrRecognitionAccount,
cast(trx_price_org as farr_contractual_price_org preserving type) AS DeltaEffectiveAmtInSlsDocCrcy,
actual_cost AS RADeltaRecgdCostInSlsDocCrcy,
cast(op_quantity as farr_operational_quantity preserving type) AS OperationalDocItemQty,
cast(quantity as farr_order_quantity preserving type) AS PerfOblgnContractualQuantity,
quantity_unit AS CARevnRecgnQtyUnit,
cast(freeze as farr_cds_pob_is_frozen preserving type) AS RAPerfOblgnIsFrozen,
sched_rv_cumltv AS SrceRecgdRevnAmtInSlsDocCrcy,
sched_co_cumltv AS SrceRecgdCostAmtInSlsDocCrcy,
sched_ic_cumltv AS SrceRecgdInvcAmtInSlsDocCrcy,
dv_timestamp AS ValidationDateTime,
uname AS BusRecnclnItemCreatedByUser,
timestamp AS BusRecnclnItmCreatedDateTime
FROM farr_d_biz_recon
LEFT OUTER JOIN I_RAPerformanceObligation AS _RAPerformanceObligation ON RevenueAccountingContract = _RAPerformanceObligation.RevenueAccountingContract AND PerformanceObligation = _RAPerformanceObligation.PerformanceObligation -- association [1..1]
LEFT OUTER JOIN I_RevenueAccountingContract AS _Contract ON RevenueAccountingContract = _Contract.RevenueAccountingContract -- association [1..1]
LEFT OUTER JOIN I_RevenueAccountingMapping AS _Mapping ON RevenueAccountingContract = _Mapping.RevenueAccountingContract AND PerformanceObligation = _Mapping.PerformanceObligation -- association [1..*]
LEFT OUTER JOIN I_RevenueAccountingMapping AS _SenderComponentMapping ON RevenueAccountingContract = _SenderComponentMapping.RevenueAccountingContract AND PerformanceObligation = _SenderComponentMapping.PerformanceObligation AND RevnAcctgOperationalDocument = _SenderComponentMapping.RevnAcctgOperationalDocument -- association [1..*]
LEFT OUTER JOIN I_CompanyCode AS _CompanyCode ON CompanyCode = _CompanyCode.CompanyCode -- association [1..1]
LEFT OUTER JOIN I_AccountingPrinciple AS _AccountingPrinciple ON AccountingPrinciple = _AccountingPrinciple.AccountingPrinciple -- association [1..1]
;