DBA Data[Home] [Help]

APPS.PO_PDOI_POSTPROC_PVT dependencies on FND_API

Line 256: IF (l_header_rejected = FND_API.G_FALSE) THEN

252: IF (PO_LOG.d_stmt) THEN
253: PO_LOG.stmt(d_module, d_position, 'l_header_rejected', l_header_rejected);
254: END IF;
255:
256: IF (l_header_rejected = FND_API.G_FALSE) THEN
257: d_position := 30;
258:
259: transfer_document_check
260: ( p_doc_rec => l_doc_rec,

Line 274: IF (l_transfer_flag = FND_API.G_FALSE) THEN

270: END IF;
271:
272: d_position := 40;
273:
274: IF (l_transfer_flag = FND_API.G_FALSE) THEN
275:
276: d_position := 50;
277:
278: -- Change the draft status back to 'DRAFT' (it was set to

Line 291: p_unlock_current => FND_API.G_FALSE

287: PO_DRAFTS_PVT.lock_document
288: ( p_po_header_id => l_doc_rec.po_header_id,
289: p_role => PO_PDOI_PARAMS.g_request.role,
290: p_role_user_id => FND_GLOBAL.user_id,
291: p_unlock_current => FND_API.G_FALSE
292: );
293:
294: IF (l_submit_for_buyer_acc_flag = FND_API.G_TRUE) THEN
295: d_position := 60;

Line 294: IF (l_submit_for_buyer_acc_flag = FND_API.G_TRUE) THEN

290: p_role_user_id => FND_GLOBAL.user_id,
291: p_unlock_current => FND_API.G_FALSE
292: );
293:
294: IF (l_submit_for_buyer_acc_flag = FND_API.G_TRUE) THEN
295: d_position := 60;
296:
297: IF (PO_LOG.d_stmt) THEN
298: PO_LOG.stmt(d_module, d_position, 'launch buyer acceptance process');

Line 312: IF ( l_doc_info.has_lines_to_notify = FND_API.G_TRUE) THEN

308: l_process_code := PO_PDOI_CONSTANTS.g_PROCESS_CODE_ACCEPTED;
309: ELSE
310: d_position := 70;
311:
312: IF ( l_doc_info.has_lines_to_notify = FND_API.G_TRUE) THEN
313: l_process_code := PO_PDOI_CONSTANTS.g_PROCESS_CODE_NOTIFIED;
314:
315: -- 5149827
316: -- If the changes are to go over price tolerance acceptance

Line 390: END IF; -- if transfer_flag = FND_API.G_FALSE

386: END IF; -- if document_type = 'BLANKET'
387:
388: d_position := 160;
389:
390: END IF; -- if transfer_flag = FND_API.G_FALSE
391:
392: d_position := 170;
393: -- bug 7277317
394: IF (x_process_code = 'I' ) THEN

Line 412: IF (l_remove_draft = FND_API.G_FALSE) THEN

408: PO_LOG.stmt(d_module, d_position, 'header gets rejected');
409: END IF;
410:
411: -- bug5129752
412: IF (l_remove_draft = FND_API.G_FALSE) THEN
413:
414: -- Change the draft status back to 'DRAFT' (it was set to
415: -- 'PDOI PROCESSING' during header grouping)
416: PO_DRAFTS_PVT.update_draft_status

Line 478: -- FND_API.G_TRUE if passed

474: --IN OUT:
475: --OUT:
476: --x_header_rejected
477: -- Whether the document passed validation or not
478: -- FND_API.G_TRUE if passed
479: -- FND_API.G_FALSE otherwise
480: --End of Comments
481: ------------------------------------------------------------------------
482: PROCEDURE remove_notified_draft_lines

Line 479: -- FND_API.G_FALSE otherwise

475: --OUT:
476: --x_header_rejected
477: -- Whether the document passed validation or not
478: -- FND_API.G_TRUE if passed
479: -- FND_API.G_FALSE otherwise
480: --End of Comments
481: ------------------------------------------------------------------------
482: PROCEDURE remove_notified_draft_lines
483: ( p_draft_id IN NUMBER

Line 589: -- FND_API.G_TRUE if passed

585: --IN OUT:
586: --OUT:
587: --x_header_rejected
588: -- Whether the document passed validation or not
589: -- FND_API.G_TRUE if passed
590: -- FND_API.G_FALSE otherwise
591: --End of Comments
592: ------------------------------------------------------------------------
593: PROCEDURE process_rejected_records IS

Line 590: -- FND_API.G_FALSE otherwise

586: --OUT:
587: --x_header_rejected
588: -- Whether the document passed validation or not
589: -- FND_API.G_TRUE if passed
590: -- FND_API.G_FALSE otherwise
591: --End of Comments
592: ------------------------------------------------------------------------
593: PROCEDURE process_rejected_records IS
594:

Line 645: ) = FND_API.G_FALSE ) THEN

641:
642: IF (PO_DRAFTS_PVT.is_draft_applicable
643: ( p_po_header_id => l_po_header_id_tbl(i),
644: p_role => PO_PDOI_PARAMS.g_request.role
645: ) = FND_API.G_FALSE ) THEN
646:
647: d_position := 40;
648:
649: l_dft_to_delete_tbl.EXTEND;

Line 673: IF (l_chg_exist_tbl(i) = FND_API.G_FALSE) THEN

669: ( p_draft_id_tbl => l_dft_exist_chg_check_tbl
670: );
671:
672: FOR i IN 1..l_dft_exist_chg_check_tbl.COUNT LOOP
673: IF (l_chg_exist_tbl(i) = FND_API.G_FALSE) THEN
674: l_dft_to_delete_tbl.EXTEND;
675: l_dft_to_delete_tbl(l_dft_to_delete_tbl.COUNT) :=
676: l_dft_exist_chg_check_tbl(i);
677: END IF;

Line 713: -- FND_API.G_TRUE if passed

709: --IN OUT:
710: --OUT:
711: --x_header_rejected
712: -- Whether the document passed validation or not
713: -- FND_API.G_TRUE if passed
714: -- FND_API.G_FALSE otherwise
715: --x_remove_draft
716: -- Whether draft has been removed
717: --End of Comments

Line 714: -- FND_API.G_FALSE otherwise

710: --OUT:
711: --x_header_rejected
712: -- Whether the document passed validation or not
713: -- FND_API.G_TRUE if passed
714: -- FND_API.G_FALSE otherwise
715: --x_remove_draft
716: -- Whether draft has been removed
717: --End of Comments
718: ------------------------------------------------------------------------

Line 740: x_header_rejected := FND_API.G_FALSE;

736: IF (PO_LOG.d_proc) THEN
737: PO_LOG.proc_begin(d_module);
738: END IF;
739:
740: x_header_rejected := FND_API.G_FALSE;
741:
742: -- Check 1: If a document has errors, Reject the whole document in the
743: -- following situations
744: -- 1) Standard PO

Line 748: IF ( p_doc_info.has_errors = FND_API.G_TRUE ) THEN

744: -- 1) Standard PO
745: -- 2) Local blankets uploaded through catalog upload
746: -- 3) Quotation upload through catalog upload (bug5461177)
747:
748: IF ( p_doc_info.has_errors = FND_API.G_TRUE ) THEN
749:
750: IF (PO_PDOI_PARAMS.g_request.document_type =
751: PO_PDOI_CONSTANTS.g_doc_type_STANDARD) THEN
752:

Line 781: x_header_rejected := FND_API.G_TRUE;

777: IF (PO_LOG.d_stmt) THEN
778: PO_LOG.stmt(d_module, d_position, 'failed Check 1');
779: END IF;
780:
781: x_header_rejected := FND_API.G_TRUE;
782:
783: END IF;
784: END IF;
785:

Line 790: IF (x_header_rejected = FND_API.G_FALSE) THEN

786: d_position := 20;
787:
788: -- add more checks here
789: -- Check 2: There should at least be one line that is valid
790: IF (x_header_rejected = FND_API.G_FALSE) THEN
791: IF ( p_doc_info.number_of_valid_lines = 0 ) THEN
792: IF (PO_LOG.d_stmt) THEN
793: PO_LOG.stmt(d_module, d_position, 'failed Check 2');
794: END IF;

Line 812: x_header_rejected := FND_API.G_TRUE;

808: );
809:
810: END IF;
811:
812: x_header_rejected := FND_API.G_TRUE;
813: END IF;
814: END IF;
815:
816: x_remove_draft := FND_API.G_FALSE;

Line 816: x_remove_draft := FND_API.G_FALSE;

812: x_header_rejected := FND_API.G_TRUE;
813: END IF;
814: END IF;
815:
816: x_remove_draft := FND_API.G_FALSE;
817:
818: IF (x_header_rejected = FND_API.G_TRUE) THEN
819:
820: -- bug5129752

Line 818: IF (x_header_rejected = FND_API.G_TRUE) THEN

814: END IF;
815:
816: x_remove_draft := FND_API.G_FALSE;
817:
818: IF (x_header_rejected = FND_API.G_TRUE) THEN
819:
820: -- bug5129752
821: -- Calculate x_remove_draft flag
822:

Line 824: FND_API.G_TRUE) THEN

820: -- bug5129752
821: -- Calculate x_remove_draft flag
822:
823: IF ( PO_PDOI_PARAMS.g_docs_info(p_doc_rec.interface_header_id).new_draft =
824: FND_API.G_TRUE) THEN
825: x_remove_draft := FND_API.G_TRUE;
826: END IF;
827:
828: -- If post validation fails, since records are already in draft tables,

Line 825: x_remove_draft := FND_API.G_TRUE;

821: -- Calculate x_remove_draft flag
822:
823: IF ( PO_PDOI_PARAMS.g_docs_info(p_doc_rec.interface_header_id).new_draft =
824: FND_API.G_TRUE) THEN
825: x_remove_draft := FND_API.G_TRUE;
826: END IF;
827:
828: -- If post validation fails, since records are already in draft tables,
829: -- besides setting the interface record to 'REJECTED', we also need to

Line 867: -- FND_API.G_TRUE if transfer needs to happen

863: -- Processing status values of the document
864: --IN OUT:
865: --OUT:
866: --x_transfer_flag
867: -- FND_API.G_TRUE if transfer needs to happen
868: -- FND_API.G_FALSE otherwise
869: --x_submit_for_buyer_acc_flag
870: -- FND_API.G_TRUE if the draft is submitted for buyer acceptance
871: -- FND_API.G_FALSE otherwise

Line 868: -- FND_API.G_FALSE otherwise

864: --IN OUT:
865: --OUT:
866: --x_transfer_flag
867: -- FND_API.G_TRUE if transfer needs to happen
868: -- FND_API.G_FALSE otherwise
869: --x_submit_for_buyer_acc_flag
870: -- FND_API.G_TRUE if the draft is submitted for buyer acceptance
871: -- FND_API.G_FALSE otherwise
872: --End of Comments

Line 870: -- FND_API.G_TRUE if the draft is submitted for buyer acceptance

866: --x_transfer_flag
867: -- FND_API.G_TRUE if transfer needs to happen
868: -- FND_API.G_FALSE otherwise
869: --x_submit_for_buyer_acc_flag
870: -- FND_API.G_TRUE if the draft is submitted for buyer acceptance
871: -- FND_API.G_FALSE otherwise
872: --End of Comments
873: ------------------------------------------------------------------------
874: PROCEDURE transfer_document_check

Line 871: -- FND_API.G_FALSE otherwise

867: -- FND_API.G_TRUE if transfer needs to happen
868: -- FND_API.G_FALSE otherwise
869: --x_submit_for_buyer_acc_flag
870: -- FND_API.G_TRUE if the draft is submitted for buyer acceptance
871: -- FND_API.G_FALSE otherwise
872: --End of Comments
873: ------------------------------------------------------------------------
874: PROCEDURE transfer_document_check
875: ( p_doc_rec IN doc_row_type,

Line 885: l_has_over_tolerance_lines VARCHAR2(1) := FND_API.G_FALSE;

881: d_api_name CONSTANT VARCHAR2(30) := 'transfer_document_check';
882: d_module CONSTANT VARCHAR2(255) := d_pkg_name || d_api_name || '.';
883: d_position NUMBER;
884:
885: l_has_over_tolerance_lines VARCHAR2(1) := FND_API.G_FALSE;
886: l_role_auth_acceptance VARCHAR2(30);
887:
888: BEGIN
889: d_position := 0;

Line 906: x_transfer_flag := FND_API.G_TRUE;

902: OR
903: PO_PDOI_PARAMS.g_request.role = PO_GLOBAL.g_role_BUYER) THEN
904:
905: d_position := 10;
906: x_transfer_flag := FND_API.G_TRUE;
907: ELSE
908: d_position := 20;
909:
910: x_transfer_flag := FND_API.G_FALSE;

Line 910: x_transfer_flag := FND_API.G_FALSE;

906: x_transfer_flag := FND_API.G_TRUE;
907: ELSE
908: d_position := 20;
909:
910: x_transfer_flag := FND_API.G_FALSE;
911:
912: -- If there is any line erroring out, or user explicitly prevents the
913: -- document to be submitted, then document will not be submitted for
914: -- buyer acceptance

Line 918: x_submit_for_buyer_acc_flag := FND_API.G_FALSE;

914: -- buyer acceptance
915: IF (p_doc_info.number_of_errored_lines > 0
916: OR NVL(PO_PDOI_PARAMS.g_request.submit_dft_flag, 'N') = 'N') THEN
917:
918: x_submit_for_buyer_acc_flag := FND_API.G_FALSE;
919: ELSE
920: x_submit_for_buyer_acc_flag := FND_API.G_TRUE;
921: END IF;
922:

Line 920: x_submit_for_buyer_acc_flag := FND_API.G_TRUE;

916: OR NVL(PO_PDOI_PARAMS.g_request.submit_dft_flag, 'N') = 'N') THEN
917:
918: x_submit_for_buyer_acc_flag := FND_API.G_FALSE;
919: ELSE
920: x_submit_for_buyer_acc_flag := FND_API.G_TRUE;
921: END IF;
922:
923: END IF; -- if not ga or ...
924:

Line 990: IF (l_need_to_create_src_rules = FND_API.G_TRUE) THEN

986: l_need_to_create_src_rules := need_to_create_sourcing_rules
987: ( p_doc_rec => p_doc_rec
988: );
989:
990: IF (l_need_to_create_src_rules = FND_API.G_TRUE) THEN
991:
992: get_lines_for_src_rules
993: ( p_doc_rec => p_doc_rec,
994: x_lines => l_lines

Line 1024: IF (l_return_status = FND_API.G_RET_STS_SUCCESS) THEN

1020: x_return_status => l_return_status
1021: );
1022: -- bug 7277317 added an if condition to check the return status of submission check
1023: -- proceed the below logic only if return status is success
1024: IF (l_return_status = FND_API.G_RET_STS_SUCCESS) THEN
1025: x_process_code := NULL;
1026: IF ( l_approval_method = PO_PDOI_CONSTANTS.g_appr_method_INIT_APPROVAL) THEN
1027: d_position := 40;
1028:

Line 1043: IF (l_need_to_create_src_rules = FND_API.G_TRUE) THEN

1039: d_position := 50;
1040:
1041: l_new_auth_status := 'APPROVED';
1042:
1043: IF (l_need_to_create_src_rules = FND_API.G_TRUE) THEN
1044:
1045: IF (PO_LOG.d_stmt) THEN
1046: PO_LOG.stmt(d_module, d_position, 'creating sourcing rules');
1047: END IF;

Line 1063: IF (l_need_to_encumber = FND_API.G_TRUE) THEN

1059: ( p_doc_rec => p_doc_rec,
1060: p_new_auth_status => l_new_auth_status
1061: );
1062:
1063: IF (l_need_to_encumber = FND_API.G_TRUE) THEN
1064: d_position := 80;
1065:
1066: -- bug4907624
1067: -- Removed the code that sets the document to PRE-APPROVED status

Line 1082: IF (l_fund_reserve_result = FND_API.G_FALSE) THEN

1078: ( p_doc_rec => p_doc_rec,
1079: x_result => l_fund_reserve_result
1080: );
1081:
1082: IF (l_fund_reserve_result = FND_API.G_FALSE) THEN
1083:
1084:
1085: IF (PO_LOG.d_stmt) THEN
1086: PO_LOG.stmt(d_module, d_position, 'Fund reservation was not done correctly');

Line 1193: IF (l_need_to_create_src_rules = FND_API.G_TRUE) THEN

1189: l_need_to_create_src_rules := need_to_create_sourcing_rules
1190: ( p_doc_rec => p_doc_rec
1191: );
1192:
1193: IF (l_need_to_create_src_rules = FND_API.G_TRUE) THEN
1194: d_position := 20;
1195: get_lines_for_src_rules
1196: ( p_doc_rec => p_doc_rec,
1197: x_lines => l_lines

Line 1213: IF (l_doc_info.has_lines_to_notify = FND_API.G_TRUE) THEN

1209: IF (PO_LOG.d_stmt) THEN
1210: PO_LOG.stmt(d_module, d_position, 'Called transfer draft to txn');
1211: END IF;
1212:
1213: IF (l_doc_info.has_lines_to_notify = FND_API.G_TRUE) THEN
1214: -- set header level process code to NOTIFIED
1215: UPDATE po_headers_interface
1216: SET process_code = 'NOTIFIED'
1217: WHERE interface_header_id = p_doc_rec.interface_header_id;

Line 1258: IF (l_return_status = FND_API.G_RET_STS_SUCCESS) THEN

1254: );
1255:
1256: -- bug 7277317 added an if condition to check the return status of submission check
1257: -- proceed the below logic only if return status is success
1258: IF (l_return_status = FND_API.G_RET_STS_SUCCESS) THEN
1259: x_process_code := NULL;
1260: IF ( l_approval_method = PO_PDOI_CONSTANTS.g_appr_method_INIT_APPROVAL) THEN
1261: d_position := 50;
1262:

Line 1274: IF (l_need_to_create_src_rules = FND_API.G_TRUE) THEN

1270:
1271: ELSIF (l_approval_method = PO_PDOI_CONSTANTS.g_appr_method_AUTO_APPROVE) THEN
1272: l_new_auth_status := 'APPROVED';
1273:
1274: IF (l_need_to_create_src_rules = FND_API.G_TRUE) THEN
1275: d_position := 60;
1276: process_sourcing_rules
1277: ( p_doc_rec => p_doc_rec,
1278: p_approval_status => l_new_auth_status,

Line 1375: IF (l_need_to_create_src_rules = FND_API.G_TRUE) THEN

1371: l_need_to_create_src_rules := need_to_create_sourcing_rules
1372: ( p_doc_rec => p_doc_rec
1373: );
1374:
1375: IF (l_need_to_create_src_rules = FND_API.G_TRUE) THEN
1376: d_position := 20;
1377: get_lines_for_src_rules
1378: ( p_doc_rec => p_doc_rec,
1379: x_lines => l_lines

Line 1401: IF (l_need_to_create_src_rules = FND_API.G_TRUE) THEN

1397: PO_LOG.stmt(d_module, d_position, 'l_approval_method', l_approval_method);
1398: END IF;
1399:
1400: IF (l_approval_method = PO_PDOI_CONSTANTS.g_appr_method_AUTO_APPROVE) THEN
1401: IF (l_need_to_create_src_rules = FND_API.G_TRUE) THEN
1402: d_position := 50;
1403:
1404: IF (PO_LOG.d_stmt) THEN
1405: PO_LOG.stmt(d_module, d_position, 'creating sourcing rules');

Line 1488: IF (l_need_to_create_src_rules = FND_API.G_TRUE) THEN

1484: l_need_to_create_src_rules := need_to_create_sourcing_rules
1485: ( p_doc_rec => p_doc_rec
1486: );
1487:
1488: IF (l_need_to_create_src_rules = FND_API.G_TRUE) THEN
1489: d_position := 30;
1490: get_lines_for_src_rules
1491: ( p_doc_rec => p_doc_rec,
1492: x_lines => l_lines

Line 1504: IF (l_doc_info.has_lines_to_notify = FND_API.G_TRUE) THEN

1500:
1501: d_position := 40;
1502: transfer_draft_to_txn (p_doc_rec => p_doc_rec);
1503:
1504: IF (l_doc_info.has_lines_to_notify = FND_API.G_TRUE) THEN
1505: d_position := 10;
1506:
1507: -- set header level process code to NOTIFIED
1508: UPDATE po_headers_interface

Line 1546: IF (l_need_to_create_src_rules = FND_API.G_TRUE) THEN

1542: PO_LOG.stmt(d_module, d_position, 'l_approval_method', l_approval_method);
1543: END IF;
1544:
1545: IF (l_approval_method = PO_PDOI_CONSTANTS.g_appr_method_AUTO_APPROVE) THEN
1546: IF (l_need_to_create_src_rules = FND_API.G_TRUE) THEN
1547: d_position := 60;
1548:
1549: IF (PO_LOG.d_stmt) THEN
1550: PO_LOG.stmt(d_module, d_position, 'Creating Sourcing rules');

Line 1634: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS ) THEN

1630: ( p_doc_rec => p_doc_rec,
1631: x_return_status => l_return_status
1632: );
1633:
1634: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS ) THEN
1635: d_position := 30;
1636:
1637: -- change document status to 'INCOMPLETE'
1638: update_document_status

Line 1660: IF (p_return_status = FND_API.G_RET_STS_SUCCESS) THEN

1656: x_return_status => p_return_status
1657: );
1658: -- bug 7277317 added an if condition to check the return status of submission check
1659: -- proceed the below logic only if return status is success
1660: IF (p_return_status = FND_API.G_RET_STS_SUCCESS) THEN
1661: x_process_code := NULL;
1662: IF ( l_approval_method = PO_PDOI_CONSTANTS.g_appr_method_INIT_APPROVAL) THEN
1663: d_position := 60;
1664:

Line 1687: IF ( l_need_to_encumber = FND_API.G_TRUE) THEN

1683: IF (PO_LOG.d_stmt) THEN
1684: PO_LOG.stmt(d_module, d_position, 'l_need_to_encumber', l_need_to_encumber);
1685: END IF;
1686:
1687: IF ( l_need_to_encumber = FND_API.G_TRUE) THEN
1688: d_position := 80;
1689: -- Temporarily setting the status to PRE-APPROVED
1690: update_document_status
1691: ( p_doc_rec => p_doc_rec,

Line 1703: IF (l_fund_reserve_result = FND_API.G_FALSE) THEN

1699: ( p_doc_rec => p_doc_rec,
1700: x_result => l_fund_reserve_result
1701: );
1702:
1703: IF (l_fund_reserve_result = FND_API.G_FALSE) THEN
1704: d_position := 100;
1705: IF (PO_LOG.d_stmt) THEN
1706: PO_LOG.stmt(d_module, d_position, 'failed fund reservation');
1707: END IF;

Line 1728: IF (l_fund_reserve_result = FND_API.G_FALSE) AND (l_new_auth_status = 'PRE-APPROVED') THEN

1724:
1725: /*6851752 Start
1726: Launch Approval, when it fails funds check and the Authrization status is PRE-APPROVED*/
1727:
1728: IF (l_fund_reserve_result = FND_API.G_FALSE) AND (l_new_auth_status = 'PRE-APPROVED') THEN
1729:
1730: IF (PO_LOG.d_stmt) THEN
1731: PO_LOG.stmt(d_module, d_position, 'launching approval workflow');
1732: END IF;

Line 1833: IF (l_return_status = FND_API.G_RET_STS_SUCCESS ) THEN

1829: ( p_doc_rec => p_doc_rec,
1830: x_return_status => l_return_status
1831: );
1832:
1833: IF (l_return_status = FND_API.G_RET_STS_SUCCESS ) THEN
1834:
1835: d_position := 30;
1836:
1837: get_approval_method

Line 1852: IF (p_return_status = FND_API.G_RET_STS_SUCCESS) THEN

1848: x_return_status => p_return_status
1849: );
1850: -- bug 7277317 added an if condition to check the return status of submission check
1851: -- proceed the below logic only if return status is success
1852: IF (p_return_status = FND_API.G_RET_STS_SUCCESS) THEN
1853: x_process_code := NULL;
1854: IF ( l_approval_method = PO_PDOI_CONSTANTS.g_appr_method_INIT_APPROVAL) THEN
1855: d_position := 40;
1856: IF (PO_LOG.d_stmt) THEN

Line 1866: l_update_auth_status := FND_API.G_TRUE;

1862: );
1863:
1864: ELSIF (l_approval_method = PO_PDOI_CONSTANTS.g_appr_method_AUTO_APPROVE) THEN
1865: d_position := 50;
1866: l_update_auth_status := FND_API.G_TRUE;
1867: l_new_auth_status := 'APPROVED';
1868:
1869: l_need_to_encumber := need_to_encumber
1870: ( p_doc_rec => p_doc_rec,

Line 1878: IF (l_need_to_encumber = FND_API.G_TRUE) THEN

1874: IF (PO_LOG.d_stmt) THEN
1875: PO_LOG.stmt(d_module, d_position, 'l_need_to_encumber', l_need_to_encumber);
1876: END IF;
1877:
1878: IF (l_need_to_encumber = FND_API.G_TRUE) THEN
1879: d_position := 60;
1880: -- reserve document
1881: reserve_fund
1882: ( p_doc_rec => p_doc_rec,

Line 1886: IF (l_fund_reserve_result = FND_API.G_FALSE) THEN

1882: ( p_doc_rec => p_doc_rec,
1883: x_result => l_fund_reserve_result
1884: );
1885:
1886: IF (l_fund_reserve_result = FND_API.G_FALSE) THEN
1887: d_position := 70;
1888: IF (PO_LOG.d_stmt) THEN
1889: PO_LOG.stmt(d_module, d_position, 'l_approval_method', l_approval_method);
1890: END IF;

Line 1894: l_update_auth_status := FND_API.G_FALSE;

1890: END IF;
1891:
1892: -- No need to set the authorziation_status because transfer program
1893: -- should have handled the approval status properly
1894: l_update_auth_status := FND_API.G_FALSE;
1895: END IF;
1896: END IF;
1897:
1898: IF (l_update_auth_status = FND_API.G_TRUE) THEN

Line 1898: IF (l_update_auth_status = FND_API.G_TRUE) THEN

1894: l_update_auth_status := FND_API.G_FALSE;
1895: END IF;
1896: END IF;
1897:
1898: IF (l_update_auth_status = FND_API.G_TRUE) THEN
1899: d_position := 80;
1900: update_document_status
1901: ( p_doc_rec => p_doc_rec,
1902: p_auth_status => l_new_auth_status,

Line 2139: RETURN FND_API.G_TRUE;

2135: END IF;
2136:
2137: IF ( NVL(p_doc_rec.load_sourcing_rules_flag,
2138: PO_PDOI_PARAMS.g_request.create_sourcing_rules_flag) = 'Y') THEN
2139: RETURN FND_API.G_TRUE;
2140: ELSE
2141: RETURN FND_API.G_FALSE;
2142: END IF;
2143:

Line 2141: RETURN FND_API.G_FALSE;

2137: IF ( NVL(p_doc_rec.load_sourcing_rules_flag,
2138: PO_PDOI_PARAMS.g_request.create_sourcing_rules_flag) = 'Y') THEN
2139: RETURN FND_API.G_TRUE;
2140: ELSE
2141: RETURN FND_API.G_FALSE;
2142: END IF;
2143:
2144: EXCEPTION
2145: WHEN OTHERS THEN

Line 2299: p_init_msg_list => FND_API.G_FALSE,

2295: END IF;
2296:
2297: PO_CREATE_SR_ASL.create_sourcing_rules_asl
2298: ( p_api_version => 1.0,
2299: p_init_msg_list => FND_API.G_FALSE,
2300: p_commit => FND_API.G_FALSE,
2301: x_return_status => l_return_status,
2302: x_msg_count => l_msg_count,
2303: x_msg_data => l_msg_data,

Line 2300: p_commit => FND_API.G_FALSE,

2296:
2297: PO_CREATE_SR_ASL.create_sourcing_rules_asl
2298: ( p_api_version => 1.0,
2299: p_init_msg_list => FND_API.G_FALSE,
2300: p_commit => FND_API.G_FALSE,
2301: x_return_status => l_return_status,
2302: x_msg_count => l_msg_count,
2303: x_msg_data => l_msg_data,
2304: p_interface_header_id => p_doc_rec.interface_header_id,

Line 2327: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

2323: p_interface_error_code => 'PO_DOCS_OPEN_INTERFACE',
2324: x_header_processable_flag => l_header_processable_flag
2325: );
2326:
2327: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2328: d_position := 40;
2329: IF (PO_LOG.d_stmt) THEN
2330: PO_LOG.stmt(d_module, d_position, 'Sourcing rule creation failed' ||
2331: ' with status: ' || l_return_status || '. Continue to ' ||

Line 2386: l_delete_processed_draft := FND_API.G_TRUE;

2382: -- Delete draft if buyer initiates PDOI or document is not GA
2383: IF (PO_PDOI_PARAMS.g_request.role = PO_GLOBAL.g_role_BUYER
2384: OR
2385: p_doc_rec.ga_flag <> 'Y') THEN
2386: l_delete_processed_draft := FND_API.G_TRUE;
2387: ELSE
2388: l_delete_processed_draft := FND_API.G_FALSE;
2389: END IF;
2390:

Line 2388: l_delete_processed_draft := FND_API.G_FALSE;

2384: OR
2385: p_doc_rec.ga_flag <> 'Y') THEN
2386: l_delete_processed_draft := FND_API.G_TRUE;
2387: ELSE
2388: l_delete_processed_draft := FND_API.G_FALSE;
2389: END IF;
2390:
2391: d_position := 10;
2392:

Line 2395: p_init_msg_list => FND_API.G_FALSE,

2391: d_position := 10;
2392:
2393: PO_DRAFTS_PVT.transfer_draft_to_txn
2394: ( p_api_version => 1.0,
2395: p_init_msg_list => FND_API.G_FALSE,
2396: p_draft_id => p_doc_rec.draft_id,
2397: p_po_header_id => p_doc_rec.po_header_id,
2398: p_delete_processed_draft => l_delete_processed_draft,
2399: p_acceptance_action => NULL,

Line 2403: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

2399: p_acceptance_action => NULL,
2400: x_return_status => l_return_status
2401: );
2402:
2403: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2404: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2405: END IF;
2406:
2407: -- bug4907624

Line 2404: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

2400: x_return_status => l_return_status
2401: );
2402:
2403: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2404: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2405: END IF;
2406:
2407: -- bug4907624
2408: -- Commit txn table changes once transfer is done

Line 2563: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

2559: x_msg_count => l_msg_count,
2560: x_msg_data => l_msg_data
2561: );
2562:
2563: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2564: d_position := 20;
2565: IF (PO_LOG.d_stmt) THEN
2566: PO_LOG.stmt(d_module, d_position, 'Archiving failed');
2567: END IF;

Line 2568: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

2564: d_position := 20;
2565: IF (PO_LOG.d_stmt) THEN
2566: PO_LOG.stmt(d_module, d_position, 'Archiving failed');
2567: END IF;
2568: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2569: END IF;
2570:
2571: IF (PO_LOG.d_proc) THEN
2572: PO_LOG.proc_end(d_module);

Line 2629: l_approved_date := FND_API.G_MISS_DATE;

2625: l_approved_flag := NULL;
2626: l_approved_date := NULL;
2627: ELSIF (p_auth_status = 'REQUIRES_REAPPROVAL') THEN
2628: l_approved_flag := 'R';
2629: l_approved_date := FND_API.G_MISS_DATE;
2630: ELSIF (p_auth_status = 'PRE-APPROVED') THEN
2631: l_approved_flag := 'N';
2632: l_approved_date := FND_API.G_MISS_DATE;
2633: ELSIF (p_auth_status = 'APPROVED') THEN

Line 2632: l_approved_date := FND_API.G_MISS_DATE;

2628: l_approved_flag := 'R';
2629: l_approved_date := FND_API.G_MISS_DATE;
2630: ELSIF (p_auth_status = 'PRE-APPROVED') THEN
2631: l_approved_flag := 'N';
2632: l_approved_date := FND_API.G_MISS_DATE;
2633: ELSIF (p_auth_status = 'APPROVED') THEN
2634: l_approved_flag := 'Y';
2635: l_approved_date := SYSDATE;
2636: ELSE

Line 2637: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

2633: ELSIF (p_auth_status = 'APPROVED') THEN
2634: l_approved_flag := 'Y';
2635: l_approved_date := SYSDATE;
2636: ELSE
2637: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2638: END IF;
2639:
2640: ELSIF (PO_PDOI_PARAMS.g_request.document_type =
2641: PO_PDOI_CONSTANTS.g_DOC_TYPE_QUOTATION) THEN

Line 2658: FND_API.G_MISS_DATE, approved_date,

2654: UPDATE po_headers_all
2655: SET authorization_status = p_auth_status,
2656: approved_flag = l_approved_flag,
2657: approved_date = DECODE(l_approved_date,
2658: FND_API.G_MISS_DATE, approved_date,
2659: l_approved_date),
2660: last_update_date = SYSDATE,
2661: last_updated_by = FND_GLOBAL.user_id,
2662: last_update_login = FND_GLOBAL.login_id

Line 2729: -- FND_API.G_TRUE if successful. FND_API.G_FALSE otherwise

2725: -- Some attribute values of the document
2726: --IN OUT:
2727: --OUT:
2728: --x_result
2729: -- FND_API.G_TRUE if successful. FND_API.G_FALSE otherwise
2730: --End of Comments
2731: ------------------------------------------------------------------------
2732: PROCEDURE reserve_fund
2733: ( p_doc_rec IN doc_row_type,

Line 2756: x_result := FND_API.G_TRUE; -- bug4907624

2752: IF (PO_LOG.d_proc) THEN
2753: PO_LOG.proc_begin(d_module);
2754: END IF;
2755:
2756: x_result := FND_API.G_TRUE; -- bug4907624
2757:
2758: d_position := 10;
2759: PO_PDOI_UTL.get_processing_doctype_info
2760: ( x_doc_type => l_doc_type,

Line 2788: IF (l_return_status IN (FND_API.G_RET_STS_ERROR,

2784: x_po_return_code => l_po_return_code,
2785: x_online_report_id => l_online_report_id
2786: );
2787:
2788: IF (l_return_status IN (FND_API.G_RET_STS_ERROR,
2789: FND_API.G_RET_STS_UNEXP_ERROR)) THEN
2790: d_position := 30;
2791: IF (PO_LOG.d_stmt) THEN
2792: PO_LOG.stmt(d_module, d_position, 'Encumbrance returned system error');

Line 2789: FND_API.G_RET_STS_UNEXP_ERROR)) THEN

2785: x_online_report_id => l_online_report_id
2786: );
2787:
2788: IF (l_return_status IN (FND_API.G_RET_STS_ERROR,
2789: FND_API.G_RET_STS_UNEXP_ERROR)) THEN
2790: d_position := 30;
2791: IF (PO_LOG.d_stmt) THEN
2792: PO_LOG.stmt(d_module, d_position, 'Encumbrance returned system error');
2793: END IF;

Line 2795: x_result := FND_API.G_FALSE; -- bug4907624

2791: IF (PO_LOG.d_stmt) THEN
2792: PO_LOG.stmt(d_module, d_position, 'Encumbrance returned system error');
2793: END IF;
2794:
2795: x_result := FND_API.G_FALSE; -- bug4907624
2796: ELSE
2797: IF (l_po_return_code IN (PO_DOCUMENT_FUNDS_PVT.g_return_SUCCESS,
2798: PO_DOCUMENT_FUNDS_PVT.g_return_WARNING)) THEN
2799:

Line 2810: x_result := FND_API.G_FALSE; -- bug4907624

2806: d_position := 50;
2807: IF (PO_LOG.d_stmt) THEN
2808: PO_LOG.stmt(d_module, d_position, 'Fund Reservation failed');
2809: END IF;
2810: x_result := FND_API.G_FALSE; -- bug4907624
2811: END IF;
2812:
2813: END IF;
2814:

Line 2853: l_check_encumbrance_setting VARCHAR2(1) := FND_API.G_FALSE;

2849: d_api_name CONSTANT VARCHAR2(30) := 'need_to_encumber';
2850: d_module CONSTANT VARCHAR2(255) := d_pkg_name || d_api_name || '.';
2851: d_position NUMBER;
2852:
2853: l_check_encumbrance_setting VARCHAR2(1) := FND_API.G_FALSE;
2854: l_need_to_encumber VARCHAR2(1);
2855:
2856: BEGIN
2857: d_position := 0;

Line 2873: l_need_to_encumber := FND_API.G_TRUE;

2869:
2870: IF (PO_PDOI_PARAMS.g_sys.po_encumbrance_flag = 'Y' AND
2871: p_new_auth_status = 'APPROVED') THEN
2872:
2873: l_need_to_encumber := FND_API.G_TRUE;
2874: ELSE
2875: l_need_to_encumber := FND_API.G_FALSE;
2876: END IF;
2877:

Line 2875: l_need_to_encumber := FND_API.G_FALSE;

2871: p_new_auth_status = 'APPROVED') THEN
2872:
2873: l_need_to_encumber := FND_API.G_TRUE;
2874: ELSE
2875: l_need_to_encumber := FND_API.G_FALSE;
2876: END IF;
2877:
2878: ELSIF (PO_PDOI_PARAMS.g_request.document_type =
2879: PO_PDOI_CONSTANTS.g_DOC_TYPE_BLANKET ) THEN

Line 2887: l_need_to_encumber := FND_API.G_TRUE;

2883: p_doc_rec.action <> PO_PDOI_CONSTANTS.g_ACTION_UPDATE AND
2884: p_doc_rec.encumbrance_required_flag = 'Y' AND
2885: p_new_auth_status = 'APPROVED') THEN
2886:
2887: l_need_to_encumber := FND_API.G_TRUE;
2888: ELSE
2889: l_need_to_encumber := FND_API.G_FALSE;
2890: END IF;
2891: ELSE

Line 2889: l_need_to_encumber := FND_API.G_FALSE;

2885: p_new_auth_status = 'APPROVED') THEN
2886:
2887: l_need_to_encumber := FND_API.G_TRUE;
2888: ELSE
2889: l_need_to_encumber := FND_API.G_FALSE;
2890: END IF;
2891: ELSE
2892: -- for other documents, we do not need to encumber
2893: l_need_to_encumber := FND_API.G_FALSE;

Line 2893: l_need_to_encumber := FND_API.G_FALSE;

2889: l_need_to_encumber := FND_API.G_FALSE;
2890: END IF;
2891: ELSE
2892: -- for other documents, we do not need to encumber
2893: l_need_to_encumber := FND_API.G_FALSE;
2894: END IF;
2895:
2896: IF (PO_LOG.d_stmt) THEN
2897: PO_LOG.stmt(d_module, d_position, 'l_need_to_encumber', l_need_to_encumber);

Line 3077: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

3073: IF (PO_LOG.d_stmt) THEN
3074: PO_LOG.stmt(d_module, d_position, 'Supply creation failed');
3075: END IF;
3076:
3077: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3078: END IF;
3079:
3080: IF (PO_LOG.d_proc) THEN
3081: PO_LOG.proc_end(d_module);

Line 3138: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

3134: p_line_id => NULL,
3135: p_line_location_id => NULL
3136: );
3137:
3138: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
3139: d_position := 10;
3140: IF (PO_LOG.d_stmt) THEN
3141: PO_LOG.stmt(d_module, d_position, 'create delivery record failed');
3142: END IF;

Line 3143: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

3139: d_position := 10;
3140: IF (PO_LOG.d_stmt) THEN
3141: PO_LOG.stmt(d_module, d_position, 'create delivery record failed');
3142: END IF;
3143: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3144: END IF;
3145:
3146: IF (PO_LOG.d_proc) THEN
3147: PO_LOG.proc_end(d_module);

Line 3216: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

3212: IF (PO_LOG.d_stmt) THEN
3213: PO_LOG.stmt(d_module, d_position, 'PO Closing failed');
3214: END IF;
3215:
3216: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3217: END IF;
3218:
3219: IF (PO_LOG.d_proc) THEN
3220: PO_LOG.proc_end(d_module);

Line 3322: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

3318: p_calling_program => 'PDOI',
3319: x_return_status => x_return_status
3320: );
3321:
3322: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
3323: -- handle tax calculation error
3324: -- 1. insert warning to error interface table
3325: PO_PDOI_ERR_UTL.add_warning
3326: (

Line 3411: x_return_status := FND_API.G_RET_STS_SUCCESS;

3407: , x_msg_data => x_msg_data
3408: , x_online_report_id => x_online_report_id
3409: );
3410: else
3411: x_return_status := FND_API.G_RET_STS_SUCCESS;
3412: end if;
3413:
3414: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS OR x_online_report_id IS NOT null) THEN
3415: -- write the error into log

Line 3414: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS OR x_online_report_id IS NOT null) THEN

3410: else
3411: x_return_status := FND_API.G_RET_STS_SUCCESS;
3412: end if;
3413:
3414: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS OR x_online_report_id IS NOT null) THEN
3415: -- write the error into log
3416: PO_LOG.stmt(d_module, d_position,'Submission Check Failed');
3417: x_count := 0;
3418:

Line 3442: x_return_status := FND_API.G_RET_STS_ERROR;

3438: p_status_lookup_code => NULL
3439: );
3440: END IF;
3441: if x_count > 0 then
3442: x_return_status := FND_API.G_RET_STS_ERROR;
3443: end if;
3444: END IF;
3445:
3446: IF (PO_LOG.d_proc) THEN