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
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.
Related Tools
JD Edwards F0911 General Ledger SQL Generator
Fill in schema, company, ledger type and a Julian date range to get ready-to-run SQL for F0911 detail and an account summary.
OracleJD Edwards Julian Date Converter
Turn a calendar date into the CYYDDD Julian number JDE stores in tables such as F0911 and F4801, with leap years handled.
OracleJD Edwards EnterpriseOne Core Table Reference
Searchable list of the JD Edwards EnterpriseOne tables you query most often, with column prefix and the key fields to filter on.
OracleJD Edwards System Codes Reference
Look up what each JD Edwards system code stands for and how it shows up in table, application and UDC names.
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