/* Formatted on 4/14/2023 10:41:12 AM (QP5 v5.336) */
DECLARE
l_return_status VARCHAR2 (1000);
l_msg_data VARCHAR2 (1000);
CURSOR c1 IS
(SELECT *
FROM po_headers_all
WHERE segment1 IN ('22729')
AND type_lookup_code = 'STANDARD'
AND ( authorization_status != 'APPROVED'
OR authorization_status IS NULL));
BEGIN
mo_global.init ('PO');
fnd_global.apps_initialize (1337, 51017, 201);
FOR i IN c1
LOOP
po_document_action_pvt.do_approve (
p_document_id => i.po_header_id,
p_document_type => 'PO',
p_document_subtype => 'STANDARD',
p_note => '', --– Your comments that need to be displayed in action History,
p_approval_path_id => 0, --SELECT * FROM po_action_history where creation_date like sysdate;
x_return_status => l_return_status,
x_exception_msg => l_msg_data);
DBMS_OUTPUT.put_line (l_return_status);
COMMIT;
END LOOP;
END;
No comments:
Post a Comment