Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started
Root-Cause Underreported Capitalized Costs
00:00
5 left

Root-Cause Underreported Capitalized Costs

HardSQL · PostgreSQL

Problem

Your spend dashboard undercounts capitalized costs; how do you root-cause the issue using SAP/BW data?

Use the supplied SAP FI, asset-posting, and BW spend data. Reconcile posted, non-reversed capitalized amounts by company code and fiscal period, then identify whether each discrepancy is caused by missing BW records, invalid BW inclusions, or both.

Output

  1. One row per company code and fiscal year-period present in either source.
  2. Include the SAP amount, BW amount, variance, missing-BW count and amount, BW-only count and amount, root-cause label, and the prior-period variance.
  3. Sort by company code, fiscal year, and fiscal period ascending.

Schema

sap_fi_documents
ColumnTypeDescription
sap_doc_idPKINTSAP FI document identifier
company_codeVARCHAR(10)SAP company code
fiscal_yearINTFiscal year
fiscal_periodINTFiscal period from 1 through 12
doc_typeCHAR(2)SAP FI document type
posting_dateDATEFI posting date
reversal_doc_idINTReversal document identifier when the document was reversed
sap_asset_postings
ColumnTypeDescription
asset_posting_idPKINTAsset posting identifier
sap_doc_idINTRelated SAP FI document
asset_idINTFixed asset identifier
capitalization_amountNUMERIC(14,2)Amount posted to the asset
posting_statusVARCHAR(20)Asset posting status
bw_spend_fact
ColumnTypeDescription
bw_row_idPKINTBW fact row identifier
sap_doc_idINTSAP document identifier loaded into BW
company_codeVARCHAR(10)BW company code
fiscal_yearINTFiscal year
fiscal_periodINTFiscal period
cost_centerINTBW cost center
amountNUMERIC(14,2)Spend amount loaded into BW
capitalization_flagCHAR(1)BW indicator for capitalized spend
Tablessap_fi_documentssap_asset_postingsbw_spend_fact
Interviewer

Your question is Root-Cause Underreported Capitalized Costs. Start with the requirements and the three tables in the Question tab.

Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.

You need to log in / sign up to run or submit.
CodePostgreSQL
You need to log in / sign up to run or submit.Ln 1
Run your query to see results here.