Developer ToolsFree generatorPDF, Excel, Word exportIFS

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

Generated code
Download:

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.