Need to get the order entry error messages.
Customer is asking us to capture order entry errors, we thought of using the below query for messages
SELECT mt.MESSAGE_TEXT, msg.*
FROM oe_processing_msgs msg,
oe_order_headers hdr,
oe_order_lines lin,
oe_processing_msgs_tl mt
WHERE hdr.header_id(+) = msg.header_id
AND lin.line_id(+) = msg.line_id
AND msg.transaction_id = mt.transaction_id(+)
AND mt.source_lang(+) = USERENV ('LANG')
AND msg.TYPE = 'ERROR'
But the customer specified their criteria as below
Qty-open-ord" <> 0
And Order-date" > ( getdate() )
OR Request-date" < Order-date"
OR Request-date" > getdate() + 365
OR Promise-date" IS NULL
OR Promise-date" < Request-date"
OR Promise-date" = Order-date"