get_stuck_orders โ Stuck Open Sales Orders
The open sales orders sitting unfulfilled too long โ the aging backlog.
This is a Named SQL Query (SAP
/SQLQueries) โ dynamic
aggregate SQL returning per-query rows, not a fixed Service Layer entity.Stuck-orders report โ the individual open sales orders sitting unfulfilled too long, so you
can chase the aging backlog. Returns one row per open sales order with card_code, card_name,
doc_num, doc_date, days_open (as-of date minus doc_date), open_value (the order total), and
stuck (true once days_open exceeds the threshold), most stuck first. An order is “open” when
it still has undelivered quantity.
This report is a Named SQL Query (SAP /SQLQueries) โ a dynamic aggregate over the order
header, not a fixed-shape entity read.
Try these prompts
- “stuck orders”
- “which orders are stuck?”
- “open orders older than 60 days”
- “stuck orders for C001”
ื ืกื ืื ืืขืืจืืช
- “ืืืื ืืืื ืืช ืชืงืืขืืช?”
- “ืืืื ืืช ืคืชืืืืช ืืขื 60 ืืื”
- “ืืฆื ืืืื ืืช ืฉื ืชืงืขื”
Arguments
| Arg | Required | Meaning |
|---|---|---|
card_code | optional | One customer, e.g. C001. Omit for all customers. |
days | optional | The stuck threshold in days โ an order past this many days open is flagged stuck. Default 30. |
as_of_date | optional | Compute days_open as of this date (YYYY-MM-DD). Omit for today. |
Example result
One order is badly stuck. Order 2003 (Acme Corp, $7,500) has been open 165 days โ well past the 30-day threshold.
Result columns
| Column | Type | Meaning |
|---|---|---|
card_code | text | The ordering customer’s SAP code. |
card_name | text | The ordering customer’s name. |
doc_num | number | The sales order’s document number. |
doc_date | date | When the order was placed. |
days_open | number | Days from doc_date to the as-of date. |
open_value | number | The order’s total value โ the money sitting unfulfilled. |
stuck | text | true once days_open passes the threshold. The row holds a boolean; the closed type set has none, so it is declared text โ a flag to read, not a magnitude to plot. |
Charts
- bar: x=doc_num, y=days_open, title=“Days open by order”
- bar: x=doc_num, y=open_value, title=“Value tied up by order”
Related
get_order_backlogโ item-level shortage against on-hand stock (not the individual orders).get_order_to_cash_cycleโ the average order-to-cash cycle time per customer.