How to Check Order In Workflow Error and Not Bookable

By Using Following Query you can extract Order Number and Other Details which are in Work flow Error

SELECT h.order_number, h.org_id “Operating Unit ID”, h.ordered_date,
h.header_id, h.cancelled_flag, h.open_flag, h.flow_status_code,
h.creation_date, h.last_update_date,
(SELECT COUNT (1)
FROM oe_order_lines_all l
WHERE l.header_id = h.header_id AND open_flag = ‘Y’) “Order Open”
FROM oe_order_headers_all h, wf_items wi
WHERE wi.item_type = ‘OEOH’
AND wi.item_key = TO_CHAR (h.header_id)
AND h.open_flag = ‘Y’
AND NOT EXISTS (
SELECT ‘WF is pending’
FROM wf_item_activity_statuses wias
WHERE wias.item_key = TO_CHAR (h.header_id)
AND wias.item_type = ‘OEOH’)

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s