Submit PO Output for Communication from Back end
Introduction:
Script to Submit the PO Output for Communication Report from the back end.
Cause of the issue:
In PO data Migration from one unit to another unit, for the migrated the POs the user can’t create an Invoice for it.
How do we solve:
To Overcome the above issue we submit the PO Output for Communication Report from back end with the respective Parameters for all the migrated POs.
Script:
DECLARE
p_org_id NUMBER := 100; — org ID
l_request_id NUMBER;
po_header_id NUMBER := 145678; — po_header_ID
BEGIN
apps.mo_global.init (‘PO’);
apps.mo_global.set_policy_context (‘S’, p_org_id);
apps.fnd_global.apps_initialize (user_id => 100,
resp_id => 52125,
resp_appl_id => 200
);
l_request_id :=
fnd_request.submit_request (‘PO’,
‘POXPOPDF’,
NULL,
NULL,
FALSE,
‘R’, –P_report_type
NULL, –P_agend_id
NULL, –P_po_num_from
NULL, –P_po_num_to
NULL, –P_relaese_num_from
NULL, –P_release_num_to
NULL, –P_date_from
NULL, –P_date_to
NULL, –P_approved_flag
‘N’, –P_test_flag
NULL, –P_print_releases
NULL, –P_sortby
NULL, –P_user_id
NULL, –P_fax_enable
NULL, –P_fax_number
NULL, –P_BLANKET_LINES
‘View’, –View_or_Communicate,
‘Y’, –P_WITHTERMS
‘Y’, –P_storeFlag
‘N’, –P_PRINT_FLAG
po_header_id, –P_DOCUMENT_ID
-1, — P_DRAFT_ID
0, –P_REVISION_NUM
‘IN PROCESS’, –P_AUTHORIZATION_STATUS
‘STANDARD’, –P_DOCUMENT_TYPE
0,
–P_max_zip_size, <PO Attachment Support 11i.11>
NULL, — P_PO_TEMPLATE_CODE
NULL, — P_CONTRACT_TEMPLATE_CODE
fnd_global.local_chr (0),
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL
);
COMMIT;
fnd_file.put_line (fnd_file.output, ‘Request_id: ‘ || l_request_id);
EXCEPTION
WHEN OTHERS
THEN
fnd_file.put_line (fnd_file.output, SQLCODE || ‘ Error :’ || SQLERRM);
END;