query templates

production-ready query templates for the most common SAP data scenarios. each template generates correct SQL and ABAP with proper MANDT handling, deletion indicators, and join logic. copy, customize, and run.

20
templates
4
free
16
paid

create your own

drag tables onto a canvas and build your query visually

open purchase orders with gr/ir status

Free

the most common procurement report. shows all purchase orders with their goods receipt and invoice receipt history. essential for tracking po fulfillment, identifying gr/ir mismatches, and reconciling open commitments.

MMFI
intermediate3 tables

purchase order to invoice reconciliation

Free

audit staple: traces every purchase order through to its invoice verification documents. shows po line items alongside their matched invoices from logistics invoice verification (miro). essential for three-way match audits, duplicate invoice detection, and ap reconciliation.

MMFI
advanced4 tables

sales order to delivery to billing

Paid

core order-to-cash (otc) reporting. traces every sales order item through delivery and billing, showing the complete fulfillment lifecycle. essential for revenue recognition, delivery performance analysis, and order backlog reporting.

SD
advanced6 tables

open sales orders (not delivered or billed)

Paid

pipeline visibility: shows all sales order items with their downstream document flow status. identifies items not yet delivered, not yet billed, or partially fulfilled. essential for order backlog analysis, revenue pipeline tracking, and delivery planning.

SD
intermediate3 tables

material master with stock and valuation

Paid

complete inventory picture: combines material master data with current stock quantities and valuation prices across plant and storage location levels. the go-to query for inventory analysis, stock valuation audits, and slow-moving inventory identification.

MM
intermediate5 tables

vendor open items (ap aging report)

Paid

ap essentials: shows all open (unpaid) vendor invoices with aging analysis. combines vendor master data with open line items from the secondary index. the foundation for cash flow planning, payment prioritization, and vendor relationship management.

FIMM
intermediate3 tables

customer open items (ar aging report)

Paid

ar essentials: shows all open (unpaid) customer invoices with aging analysis. combines customer master data with open receivables. the foundation for collections management, bad debt provisioning, and dso (days sales outstanding) calculation.

FISD
intermediate3 tables

fi document with line items

Paid

general ledger analysis: shows accounting document headers with their line items and g/l account details. the fundamental fi query for journal entry analysis, account reconciliation, and audit trail reporting.

FI
intermediate3 tables

goods movements by material

Paid

warehouse and logistics analysis: shows all inventory movements (goods receipts, goods issues, transfers, scrapping) with material details. essential for inventory transaction auditing, movement type analysis, and supply chain traceability.

MM
intermediate4 tables

production order with components and operations

Paid

manufacturing reporting: shows production orders with their header data, produced items, and bom components. essential for production planning analysis, component availability checks, and manufacturing cost tracking.

PP
advanced4 tables

fi document journal

Free

complete fi document journal listing all accounting documents with header and line item details. joins bkpf (document headers) to bseg (line items) with full filtering by company code, fiscal year, document type, posting date range, and account type. essential for auditors, accountants, and anyone needing a full ledger extract.

FI
beginner2 tables

tax data extract

Paid

extracts tax-relevant data from fi documents by joining bkpf (document headers), bseg (line items), and bset (tax data line items). provides tax base amounts, tax amounts by tax code, and jurisdiction details needed for vat/gst reporting and tax reconciliation.

FI
intermediate3 tables

vendor payment run history

Paid

traces automatic payment program (f110) results by joining reguh (payment headers per vendor), regup (individual items settled in each payment), and payr (issued payment media/checks). provides a complete view of what was paid, when, by which payment method, and check/transfer details.

FI
advanced3 tables

purchase requisition status & conversion to po

Free

shows the status of purchase requisitions (prs) and their conversion to purchase orders. joins eban (pr line items) to ekpo (po line items) via the pr-to-po assignment fields. useful for procurement monitoring: which prs are still open, which converted to pos, and at what price variance.

MM
beginner2 tables

material movement history

Paid

extracts material movement history by joining mkpf (material document headers) with mseg (material document items). filterable by movement type (bwart) to isolate goods receipts (101), goods issues (261), transfer postings (301), returns, scrapping, etc. core report for inventory analysis, consumption tracking, and logistics auditing.

MM
intermediate2 tables

open sales order backlog

Paid

reports on open (unfulfilled) sales orders by joining vbak (sales order headers), vbap (sales order items), and vbup (item-level status). filters for items not yet fully delivered or billed, giving a clear picture of outstanding customer commitments, backlog value, and aging.

SD
intermediate3 tables

on-time delivery analysis

Paid

measures delivery performance by comparing scheduled delivery dates from vbep (sales order schedule lines) against actual goods issue dates from likp (delivery headers). joins through lips (delivery items) back to the sales order for traceability. calculates on-time vs. late metrics per customer, material, and plant.

SD
advanced5 tables

billing revenue by customer & material

Paid

extracts billing document revenue data by joining vbrk (billing headers), vbrp (billing items), kna1 (customer master), and mara (material master). provides revenue amounts with customer name and material details for revenue analysis, commission calculations, and financial reporting.

SDFI
intermediate4 tables

internal order cost summary

Paid

summarizes actual costs posted to internal orders by joining aufk (order master data) with coep (co line items — actual postings). shows total actual costs per order, cost element, and period. useful for project cost tracking, marketing spend analysis, and investment monitoring against budgets.

CO
intermediate2 tables

full procure-to-pay trace

Paid

end-to-end p2p trace for a single purchase order: from purchase requisition (eban) through po header/items (ekko/ekpo), goods receipt/history (ekbe), invoice receipt (rseg/rbkp), to the final fi accounting document (bkpf/bseg). traces the complete lifecycle of a procurement transaction for audit, reconciliation, and dispute resolution.

MMFI
advanced8 tables