IFS Applications Oracle SQL Query Generator (Shop Orders, Stock, Orders)
IFS data sits in an Oracle database and is exposed through views per logical unit. This generator produces three common read-only queries for shop orders, stock and customer order lines that you can adapt to your own reports.
Fill in
Shop orders for a part
SELECT order_no, release_no, sequence_no, part_no, contract, state,
revised_qty_due, qty_complete, revised_due_date
FROM shop_ord
WHERE contract = 'SITE1'
AND part_no = 'PN-48213'
AND revised_due_date BETWEEN TO_DATE('2026-10-01', 'YYYY-MM-DD')
AND TO_DATE('2026-12-31', 'YYYY-MM-DD')
ORDER BY revised_due_date;Stock on hand for a part
SELECT contract, part_no, location_no, lot_batch_no, serial_no,
qty_onhand, qty_reserved
FROM inventory_part_in_stock
WHERE contract = 'SITE1'
AND part_no = 'PN-48213'
AND qty_onhand <> 0
ORDER BY location_no;Customer order lines for a part
SELECT order_no, line_no, rel_no, line_item_no, catalog_no,
buy_qty_due, qty_shipped, planned_due_date, state
FROM customer_order_line
WHERE contract = 'SITE1'
AND catalog_no = 'PN-48213'
AND planned_due_date BETWEEN TO_DATE('2026-10-01', 'YYYY-MM-DD')
AND TO_DATE('2026-12-31', 'YYYY-MM-DD')
ORDER BY planned_due_date;IFS exposes business data through views named after the logical unit, with the _TAB tables beneath. Use views for reporting because they apply decoding and security. View and column names vary between IFS Applications and IFS Cloud releases, so confirm them in the Oracle data dictionary or the model before use. Run on a reporting or test database and keep queries read-only.
Want IFS answers without writing SQL?
Optional: a short review of a read-only question layer for your IFS data.
Optional. The tool and every export work without this. No spam.
How to use it
Enter your site (called the contract in IFS), a part number and a date range. Copy the query you need into SQL Developer, or into a report or data source tool connected with a read-only account. Start with the stock query because it returns the fewest rows. Then widen the date range on the shop order and customer order queries. Export the result to Excel from your SQL client when you need to share it.
Views versus tables
IFS follows a layered model: each logical unit has a base table with a _TAB suffix and a view that adds client-side logic, decoded state names and security. Use the view in reports, because the state column then shows the readable value instead of an internal code. Reading _TAB directly is sometimes needed for performance, but it skips the logic in the view, so test the results against what users see on screen.
Reading the output
In the shop order query, compare revised quantity with quantity complete to see what is outstanding. In the stock query, reserved quantity shows what is already promised. The customer order query shows the planned due date against the shipped quantity. Combining the three for one part gives a compact picture of supply and demand without opening several screens.
Common mistakes
Forgetting the contract filter returns every site. Using date literals without TO_DATE leads to format errors. Assuming the same column names across releases causes ORA-00904 invalid identifier errors. Writing to IFS tables directly instead of using the supported APIs bypasses business logic and is not supported, so keep to read-only SELECTs.
Frequently Asked Questions
Why use views and not tables?
Views apply the logic that IFS users see, such as decoded status values and access rules. They are the safer default for reports. Move to the base table only for a measured performance reason and verify the results.
What is contract in IFS?
Contract is the IFS name for the site. Most inventory, production and order views filter on it, and it is a good first condition for any query to keep result sets small.
Will column names match my version?
Most core names are stable, but they can change between releases and with customisation. Check the view definition in the database before relying on a column, and adjust the query if you see ORA-00904.
Can I update data with these?
No, and you should not. Changes should go through supported IFS interfaces so that business rules, history and security are applied. These queries are for reading only.
If you want a natural language layer on top of IFS data with the SQL shown, we can scope it with you.
Related Tools
IFS Cloud Go-Live Readiness Checklist
A grouped checklist of what must be true before you switch an IFS Cloud implementation live, with critical items flagged.
ERP Migration & SelectionERP Data Migration Load Planner Worksheet
List each data object to migrate with record counts, cleansing progress and an estimated load time to plan trial loads and cutover.
Developer ToolsQAD Progress 4GL Query Generator
Fill in domain, site and a part prefix to get ready-to-run, read-only Progress 4GL queries against common QAD EE tables.
MES & Shop FloorPlex Cloud MES Readiness Assessment
Ten questions to gauge whether your plant is ready to run on a cloud manufacturing platform such as Plex.
More Developer Tools tools
See all- SAP Sales Order ABAP SELECT Generator (VBAK, VBAP, VBFA)
- SAP Sales Order Create BAPI ABAP Generator (BAPI_SALESORDER_CREATEFROMDAT2)
- SAP ABAP Open Items SELECT Generator
- SAP ACDOCA SQL Query Generator
- SAP QM Inspection Lot ABAP SELECT Generator
- SAP Quality Notification Pareto SQL Query Generator
- SAP QM Usage Decision BAPI Skeleton
- ABAP Custom Exception Class Generator
- ABAP Unit Test Class Generator