ECC Contract Lifecycle Management, CLM Protest, SQL5

Description
Categories: Enterprise Command Center
Columns: Ecc Spec Id, Us Document Status ...
Imported from Enterprise Command Center
Dataset Key: po-clm-protest
Query Procedure: PO_CLM_ECC_UTIL_PVT.GET_ECC_DATA_LOAD_INFO
Security Procedure: PO_ECC_DATASECURITY_PKG_PUB.GetFilterAttributeValuesAwd
select
x.*
from
(
SELECT * FROM ( SELECT gt.char1 ecc_spec_id,
        msg.message_text document_status,
        msg.language_code
FROM    po_headers_all poh,
        po_session_gt gt,
        fnd_new_messages msg
WHERE   poh.po_header_id = gt.index_num2
AND     poh.clm_closeout_status IS  NULL
AND     msg.application_id = 201
AND     msg.language_code in ( 'US')
AND     msg.message_name = decode (nvl (poh.authorization_status
                                       ,'INCOMPLETE')
                                  ,'INCOMPLETE'
                                  ,'PO_STATUS_INCOMPLETE'
                                  ,'IN PROCESS'
                                  ,'PO_STATUS_IN_PROCESS'
                                  ,'PRE-APPROVED'
                                  ,'PO_STATUS_PRE_APPROVED'
                                  ,'REJECTED'
                                  ,'PO_STATUS_REJECTED'
                                  ,'APPROVED'
                                  ,'PO_STATUS_APPROVED')
AND     gt.key = 3197937 ) PIVOT ( max(document_status) as document_status
                                             FOR language_code in ( 'US' "US"))
) x
where
2=2