DBA Data[Home] [Help]

PACKAGE BODY: APPS.CCT_IKEY_UPG

Source


1 PACKAGE BODY CCT_IKEY_UPG as
2 /* $Header: cctupikb.pls 115.1 2003/08/25 18:25:36 gvasvani noship $ */
3 
4 procedure Change_CustomerID
5 IS
6     l_upgraded        NUMERIC;
7     status NUMERIC;
8     l_loop_count          INTEGER := 0;
9     BEGIN
10       BEGIN
11         SELECT Count(*) INTO l_upgraded
12         FROM cct_interaction_keys
13         WHERE interaction_key_id = 7 and interaction_key='PARTY_ID' ;
14       EXCEPTION
15 	When Others Then
16 	  status := SQLCODE;
17 	  --dbms_output.put_line('In Change_CustomerID Proc '||SQLERRM(STATUS));
18     return;
19       END;
20       if (l_upgraded > 0) THEN
21          --dbms_output.put_line('CustomerID is Already Upgraded');
22          return;
23       END IF;
24 
25     update cct_interaction_keys set interaction_key='PARTY_ID' where interaction_key_id = 7;
26     update CCT_CLASSIFICATION_RULES set key='PARTY_ID' where nvl(f_deletedflag,'N')<>'D' and key='CustomerID';
27     --Since cct_route_params also stores dynamic route's plsql param, "sequence is not null" determines
28     --that we are updating plsql params only.
29     update cct_route_params set value='PARTY_ID' where value='CustomerID' and sequence is not null and nvl(f_deletedflag,'N')<>'D';
30     update cct_route_params set param='PARTY_ID' where param='CustomerID' and sequence is not null and nvl(f_deletedflag,'N')<>'D';
31     update cct_plsql_function_params set value='PARTY_ID' where value='CustomerID' and nvl(f_deletedflag,'N')<>'D' ;
32 
33   --dbms_output.put_line(' ');
34 
35    END Change_CustomerID;
36 
37 
38 END CCT_IKEY_UPG;