Developer ToolsFree generatorPDF, Excel, Word exportOracle JD Edwards EnterpriseOneManufacturing

JD Edwards F4801 Work Order SQL Query Generator

The F4801 work order master is where JD Edwards manufacturing and maintenance orders live. This generator builds queries for open orders, the parts list and the routing, with Julian date conversion included.

Fill in

Generated code
Download:

Open work orders by branch plant and status

SELECT WADOCO AS wo_number,
       WADCTO AS order_type,
       LTRIM(WAMCU) AS branch_plant,
       WALITM AS item_number,
       WADL01 AS description,
       WASRST AS status,
       WAUORG AS qty_ordered_raw,
       WASOQS AS qty_completed_raw,
       DATEADD(DAY, (WADRQJ % 1000) - 1, DATEFROMPARTS(1900 + WADRQJ / 1000, 1, 1)) AS request_date,
       WAANPA AS supervisor
FROM PRODDTA.F4801
WHERE LTRIM(WAMCU) = 'M30'
  AND WADCTO = 'WO'
  AND WASRST BETWEEN '10' AND '40'
  AND WADRQJ > 0
  AND WADRQJ <= 126365
ORDER BY WADRQJ, WADOCO;

Parts list for one work order

SELECT WMDOCO AS wo_number,
       WMCPIT AS component_short_item,
       WMLITM AS component_item,
       WMUORG AS qty_required_raw,
       WMTRQT AS qty_issued_raw
FROM PRODDTA.F3111
WHERE WMDOCO = 412345
ORDER BY WMCPIT;

Operations (routing) for the same order

SELECT WLDOCO AS wo_number,
       WLOPSQ AS operation_seq,
       WLOPHD AS description,
       WLMCU AS work_center
FROM PRODDTA.F3112
WHERE WLDOCO = 412345
ORDER BY WLOPSQ;

Written for SQL Server. Quantity columns carry implied decimals defined by the data dictionary, so the _raw aliases are left unscaled; check the display decimals for UORG, SOQS and TRQT in your release. Status values such as 10 and 40 are examples, because work order status codes come from UDC 00/SS and are set per site. Column names are standard but verify them in your release, then test on a copy.

Work order questions answered in plain English

Optional: see a read-only assistant answer shop floor questions from JDE data.

Optional. The tool and every export work without this. No spam.

How to use it

Enter your branch plant, order type and the status range you consider open, along with the request date cutoff in Julian form. The first block lists work orders; the second and third show components and operations for one order number. Paste into your SQL client against a reporting copy of the database.

Tables behind a work order

F4801 is the header with order number WADOCO, type WADCTO, branch WAMCU, item WAITM and status WASRST. F3111 is the parts list, keyed by order number and component, and F3112 is the routing with operation sequence. Related tables hold the order text and the hours and quantities posted by shop floor reporting.

  • WASRST is the status; the codes are site defined
  • WATRDJ is the order date and WASTRT the start date
  • WADRQJ is the requested completion date
  • WAANPA is the supervisor address number

Using the results

Late orders show a request date earlier than today with a status short of complete. Compare the quantity ordered against completed for scrap and short shipment trends, and join the parts list to inventory in F41021 to see shortages. Keep joins on the short item number WAITM and not the 25 character item number.

Common mistakes

Treating status as numeric when it is a character field, ignoring zero dates (WADRQJ of 0 means none), mixing manufacturing and maintenance order types, and assuming quantity columns already contain decimals.

Frequently Asked Questions

Where are work order status codes defined?

They come from a user defined code list (system 00, type SS) and are customised per company. Look at your own UDC values, not a generic list, before you decide which codes are open.

Why do I get zero rows for a branch plant?

Business unit values are right justified and padded, so an equality test with an untrimmed column fails. Apply LTRIM on the column as in the generated SQL.

Can I use item number WALITM for joins?

You can, but the short item number WAITM is the numeric key used across inventory tables and is faster and safer. WALITM is the user facing second item number.

Does the query change any data?

No. All blocks are SELECT only. Use JDE applications or business functions to change orders so status history, inventory commitments and costing stay consistent.

If planners ask for custom work order lists every week, we can build a read-only assistant over your JDE shop floor data with approvals on any write-back.