1655: );
1656:
1657: /* insert the selected transactions from cn_comm_lines_api_all table */
1658: /* to the interface table jtf_tae_1001_sc_dea_trans */
1659: jty_assign_bulk_pub.collect_trans_data(
1660: p_api_version_number => 1.0
1661: , p_init_msg_list => fnd_api.g_false
1662: , p_source_id => -1001
1663: , p_trans_id => -1002
1677: , p_oic_mode => 'CLEAR'
1678: );
1679:
1680: IF (retcode <> 0) THEN
1681: debugmsg('SCA : jty_assign_bulk_pub.collect_trans_data has failed');
1682: RAISE fnd_api.g_exc_error;
1683: END IF;
1684:
1685: debugmsg('SCA : jty_assign_bulk_pub.collect_trans_data with mode CLEAR completed successfully. ');
1681: debugmsg('SCA : jty_assign_bulk_pub.collect_trans_data has failed');
1682: RAISE fnd_api.g_exc_error;
1683: END IF;
1684:
1685: debugmsg('SCA : jty_assign_bulk_pub.collect_trans_data with mode CLEAR completed successfully. ');
1686:
1687: lp_start_date := p_start_date;
1688: lp_end_date := p_end_date;
1689:
1762: END IF;
1763:
1764: /* insert the selected transactions from cn_comm_lines_api_all table */
1765: /* to the interface table jtf_tae_1001_sc_dea_trans */
1766: jty_assign_bulk_pub.collect_trans_data(
1767: p_api_version_number => 1.0
1768: , p_init_msg_list => fnd_api.g_false
1769: , p_source_id => -1001
1770: , p_trans_id => -1002
1784: , p_oic_mode => 'POST'
1785: );
1786:
1787: IF (retcode <> 0) THEN
1788: debugmsg('SCA : jty_assign_bulk_pub.collect_trans_data has failed');
1789: RAISE fnd_api.g_exc_error;
1790: END IF;
1791:
1792: debugmsg('SCA : jty_assign_bulk_pub.collect_trans_data with oic_mode '||
1788: debugmsg('SCA : jty_assign_bulk_pub.collect_trans_data has failed');
1789: RAISE fnd_api.g_exc_error;
1790: END IF;
1791:
1792: debugmsg('SCA : jty_assign_bulk_pub.collect_trans_data with oic_mode '||
1793: 'POST completed successfully');
1794: debugmsg('SCA : Populating data to WINNERS table');
1795: /* this api will apply the rules to the transactions present in jtf_tae_1001_sc_dea_trans */
1796: /* and populate the winning salesreps for each transaction in the table jtf_tae_1001_sc_winners */
1844: , p_terr_id => p_terr_id
1845: );
1846:
1847: IF (retcode <> 0) THEN
1848: debugmsg('SCA : jty_assign_bulk_pub.collect_trans_data has failed while '||
1849: ' trying to generate stats on matches table ');
1850: RAISE fnd_api.g_exc_error;
1851: END IF;
1852:
1906: );
1907:
1908:
1909: IF (retcode <> 0) THEN
1910: debugmsg('SCA : jty_assign_bulk_pub.collect_trans_data has failed while '||
1911: ' trying to generate stats on winners table ');
1912: RAISE fnd_api.g_exc_error;
1913: END IF;
1914: -- End of Addition
1911: ' trying to generate stats on winners table ');
1912: RAISE fnd_api.g_exc_error;
1913: END IF;
1914: -- End of Addition
1915: debugmsg('SCA : jty_assign_bulk_pub.generate stats on winners successful');
1916: debugmsg('SCA : jty_assign_bulk_pub.get_winners completed successfully');
1917: debugmsg('SCA : End of get_credited_txns');
1918:
1919: EXCEPTION
1912: RAISE fnd_api.g_exc_error;
1913: END IF;
1914: -- End of Addition
1915: debugmsg('SCA : jty_assign_bulk_pub.generate stats on winners successful');
1916: debugmsg('SCA : jty_assign_bulk_pub.get_winners completed successfully');
1917: debugmsg('SCA : End of get_credited_txns');
1918:
1919: EXCEPTION
1920: WHEN fnd_api.g_exc_error THEN
3445: debugmsg('SCA : CN_SCATM_TAE_PUB.get_where_clause completed successfully');
3446:
3447: /* insert the selected transactions from cn_comm_lines_api_all table */
3448: /* to the interface table jtf_tae_1001_sc_dea_trans */
3449: jty_assign_bulk_pub.collect_trans_data(
3450: p_api_version_number => 1.0
3451: , p_init_msg_list => fnd_api.g_false
3452: , p_source_id => -1001
3453: , p_trans_id => -1002
3510: p_oic_mode);
3511: /* this api will apply the rules to the transactions present in jtf_tae_1001_sc_dea_trans */
3512: /* and populate the winning salesreps for each transaction in the table jtf_tae_1001_sc_winners */
3513:
3514: jty_assign_bulk_pub.get_winners(
3515: p_api_version_number => 1.0
3516: , p_init_msg_list => fnd_api.g_false
3517: , p_source_id => -1001
3518: , p_trans_id => -1002
3533: debugmsg('SCA : CN_SCATM_TAE_PUB.batch_process_winners status '||l_return_status
3534: ||' data '||l_msg_data);
3535:
3536: IF (retcode <> 0) THEN
3537: debugmsg('SCA : jty_assign_bulk_pub.get_winners has failed');
3538: RAISE fnd_api.g_exc_error;
3539: END IF;
3540:
3541: