1655: l_party_id NUMBER;
1656:
1657: CURSOR iby_ext_accts_cur(p_unique_ref IN NUMBER) IS
1658: SELECT temp_ext_bank_acct_id
1659: FROM iby_temp_ext_bank_accts
1660: WHERE calling_app_unique_ref1 = p_unique_ref
1661: AND status <> 'PROCESSED';
1662:
1663: ext_payee_tab iby_disbursement_setup_pub.external_payee_tab_type;
1764:
1765: IF l_return_status = fnd_api.g_ret_sts_success THEN
1766: l_ext_payee_id := ext_payee_id_tab(1).ext_payee_id;
1767:
1768: UPDATE iby_temp_ext_bank_accts
1769: SET ext_payee_id = l_ext_payee_id,
1770: account_owner_party_id = l_party_id
1771: WHERE calling_app_unique_ref1 = p_vendor_rec.vendor_interface_id;
1772:
1802: x_bank_acc_id => l_bank_acct_id,
1803: x_response => ext_response_rec);
1804:
1805: IF l_return_status = fnd_api.g_ret_sts_success THEN
1806: UPDATE iby_temp_ext_bank_accts
1807: SET status = 'PROCESSED'
1808: WHERE temp_ext_bank_acct_id = l_temp_ext_acct_id;
1809:
1810: ELSE
1807: SET status = 'PROCESSED'
1808: WHERE temp_ext_bank_acct_id = l_temp_ext_acct_id;
1809:
1810: ELSE
1811: UPDATE iby_temp_ext_bank_accts
1812: SET status = 'REJECTED'
1813: WHERE temp_ext_bank_acct_id = l_temp_ext_acct_id;
1814:
1815: IF (insert_rejections(p_batch_id,
1813: WHERE temp_ext_bank_acct_id = l_temp_ext_acct_id;
1814:
1815: IF (insert_rejections(p_batch_id,
1816: l_request_id,
1817: 'IBY_TEMP_EXT_BANK_ACCTS',
1818: p_vendor_rec.vendor_interface_id,
1819: 'AP_BANK_ACCT_CREATION',
1820: g_user_id,
1821: g_login_id,
1846:
1847: END IF; -- Bank Account Creation API
1848:
1849: ELSE
1850: UPDATE iby_temp_ext_bank_accts
1851: SET status = 'REJECTED'
1852: WHERE temp_ext_bank_acct_id = l_temp_ext_acct_id;
1853:
1854: IF (insert_rejections(p_batch_id,
1852: WHERE temp_ext_bank_acct_id = l_temp_ext_acct_id;
1853:
1854: IF (insert_rejections(p_batch_id,
1855: l_request_id,
1856: 'IBY_TEMP_EXT_BANK_ACCTS',
1857: p_vendor_rec.vendor_interface_id,
1858: 'AP_INVALID_BANK_ACCT_INFO',
1859: g_user_id,
1860: g_login_id,
2628: l_bank_acct_id NUMBER;
2629:
2630: CURSOR iby_ext_accts_cur(p_unique_ref IN NUMBER) IS
2631: SELECT temp_ext_bank_acct_id
2632: FROM iby_temp_ext_bank_accts
2633: WHERE calling_app_unique_ref2 = p_unique_ref
2634: AND nvl(status, 'NEW') <> 'PROCESSED';
2635:
2636: l_debug_info VARCHAR2(500);
2725:
2726: IF l_return_status = fnd_api.g_ret_sts_success THEN
2727: l_ext_payee_id := ext_payee_id_tab(1).ext_payee_id;
2728:
2729: UPDATE iby_temp_ext_bank_accts
2730: SET ext_payee_id = l_ext_payee_id,
2731: account_owner_party_id = ext_payee_rec.payee_party_id --bug 6753331
2732: WHERE calling_app_unique_ref2 =
2733: p_site_rec.vendor_site_interface_id;
2765: x_bank_acc_id => l_bank_acct_id,
2766: x_response => ext_response_rec);
2767:
2768: IF l_return_status = fnd_api.g_ret_sts_success THEN
2769: UPDATE iby_temp_ext_bank_accts
2770: SET status = 'PROCESSED'
2771: WHERE temp_ext_bank_acct_id = l_temp_ext_acct_id;
2772:
2773: ELSE
2799: WHERE vendor_site_interface_id =
2800: p_site_rec.vendor_site_interface_id
2801: AND sdh_batch_id = p_batch_id;
2802:
2803: UPDATE iby_temp_ext_bank_accts
2804: SET status = 'REJECTED'
2805: WHERE temp_ext_bank_acct_id = l_temp_ext_acct_id;
2806:
2807: IF (insert_rejections(p_batch_id,