DBA Data[Home] [Help]

APPS.CN_SCA_CREDITS_ONLINE_PUB dependencies on CN_SCA_HEADERS_INTERFACE

Line 10: -- + cn_sca_headers_interface_GTT and cn_sca_lines_interface_GTT Global +

6: -- + For the transaction passed in identify winning rule using dynamic pkg +
7: -- + get allocation percentages and distribute and return the sales credit +
8: -- + +
9: -- + Based on the p_batch_id, API will get the data from +
10: -- + cn_sca_headers_interface_GTT and cn_sca_lines_interface_GTT Global +
11: -- + Temporary tables. After processing, this API will keep the data in +
12: -- + cn_sca_lines_output_GTT table. +
13: -- +=========================================================================+
14: PROCEDURE get_sales_credits(

Line 31: l_trx_source cn_sca_headers_interface_gtt.transaction_source%TYPE;

27: l_org_id NUMBER := NULL;
28: l_found_rule_flag VARCHAR2(1);
29: l_limit_rows NUMBER := 1 ;
30: l_count number;
31: l_trx_source cn_sca_headers_interface_gtt.transaction_source%TYPE;
32: l_rev_not_100_flag VARCHAR2(1) := 'N';
33:
34: --+
35: --+ PL/SQL Tables and Records

Line 39: IS TABLE OF cn_sca_headers_interface.sca_headers_interface_id%type;

35: --+ PL/SQL Tables and Records
36: --+
37:
38: TYPE interface_id_tbl_type
39: IS TABLE OF cn_sca_headers_interface.sca_headers_interface_id%type;
40:
41: TYPE credit_rule_id_tbl_type
42: IS TABLE OF cn_sca_credit_rules.sca_credit_rule_id%type;
43:

Line 45: IS TABLE OF cn_sca_headers_interface.process_status%type;

41: TYPE credit_rule_id_tbl_type
42: IS TABLE OF cn_sca_credit_rules.sca_credit_rule_id%type;
43:
44: TYPE process_status_tbl_type
45: IS TABLE OF cn_sca_headers_interface.process_status%type;
46:
47: TYPE rounding_tbl_type IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
48:
49: TYPE lines_output_id_tbl_type

Line 70: FROM cn_sca_headers_interface_gtt

66: --+ need notadd org_id as filter condition for the statement.
67: --+
68: CURSOR get_trans_src_cr IS
69: SELECT DISTINCT transaction_source
70: FROM cn_sca_headers_interface_gtt
71: WHERE sca_batch_id = x_batch_id;
72:
73: -- codeCheck: Though cn_sca_winning_rules_gtt has processed_date column,
74: -- dynamic SQL is not populating this column. That is why I had to refer

Line 75: -- cn_sca_headers_interface_gtt table here. In future this table reference

71: WHERE sca_batch_id = x_batch_id;
72:
73: -- codeCheck: Though cn_sca_winning_rules_gtt has processed_date column,
74: -- dynamic SQL is not populating this column. That is why I had to refer
75: -- cn_sca_headers_interface_gtt table here. In future this table reference
76: -- need to be eliminated.
77:
78: CURSOR rounding_cur IS
79: SELECT ROUND(MAX(NVL(csad.rev_split_pct,0)) - SUM(NVL(l.allocation_percentage,0)),4),

Line 82: FROM cn_sca_headers_interface_gtt cshi,

78: CURSOR rounding_cur IS
79: SELECT ROUND(MAX(NVL(csad.rev_split_pct,0)) - SUM(NVL(l.allocation_percentage,0)),4),
80: MIN(l.sca_lines_output_id) sca_lines_output_id,
81: w.sca_headers_interface_id
82: FROM cn_sca_headers_interface_gtt cshi,
83: cn_sca_winning_rules_gtt w,
84: cn_sca_lines_output_gtt l,
85: cn_sca_alloc_details csad,
86: cn_sca_allocations csa

Line 102: FROM cn_sca_headers_interface_gtt cshi,

98: CURSOR rounding1_cur IS
99: SELECT ROUND(MAX(NVL(csad.nonrev_split_pct,0)) - SUM(NVL(l.allocation_percentage,0)),4),
100: MIN(l.sca_lines_output_id) sca_lines_output_id,
101: w.sca_headers_interface_id
102: FROM cn_sca_headers_interface_gtt cshi,
103: cn_sca_winning_rules_gtt w,
104: cn_sca_lines_output_gtt l,
105: cn_sca_alloc_details csad,
106: cn_sca_allocations csa

Line 245: cn_sca_headers_interface_gtt cshig,

241: sca_headers_interface_id
242: FROM cn_sca_winning_rules_gtt
243: WHERE sca_batch_id = :x_batch_id2
244: GROUP BY SCA_HEADERS_INTERFACE_ID ) cswrg,
245: cn_sca_headers_interface_gtt cshig,
246: (SELECT count(distinct RESOURCE_ID) count_of_resources ,
247: role_id,
248: sca_headers_interface_id
249: FROM cn_sca_lines_interface_gtt cslig

Line 333: UPDATE cn_sca_headers_interface_gtt cshig set

329:
330:
331:
332: -- copy the status from output to headers table
333: UPDATE cn_sca_headers_interface_gtt cshig set
334: PROCESS_STATUS = (SELECT distinct status
335: FROM cn_sca_lines_output_gtt cslog
336: WHERE cslog.sca_headers_interface_id = cshig.sca_headers_interface_id
337: AND sca_batch_id =x_batch_id

Line 351: UPDATE cn_sca_headers_interface_gtt cshig set

347: -- AND revenue_type = 'REVENUE');
348:
349: -- if no output was created then
350: -- update headers to unallocated
351: UPDATE cn_sca_headers_interface_gtt cshig set
352: PROCESS_STATUS = 'NOT ALLOCATED'
353: WHERE sca_batch_id = x_batch_id
354: AND NOT EXISTS (SELECT 'X'
355: FROM cn_sca_lines_output_gtt cslog

Line 361: UPDATE cn_sca_headers_interface_gtt cshig set

357: AND revenue_type = 'REVENUE');
358:
359: -- if no output was created then
360: -- update headers to unallocated
361: UPDATE cn_sca_headers_interface_gtt cshig set
362: PROCESS_STATUS = 'NO RULE'
363: WHERE sca_batch_id = x_batch_id
364: AND NOT EXISTS (SELECT 'X'
365: FROM cn_sca_winning_rules_gtt cswr