1 PACKAGE CTO_OSS_SOURCE_PK AUTHID CURRENT_USER AS
2 /*$Header: CTOOSSPS.pls 115.8 2004/03/03 01:01:25 rekannan noship $ */
3 /*============================================================================+
4 | Copyright (c) 1999 Oracle Corporation Belmont, California, USA |
5 | All rights reserved. |
6 | Oracle Manufacturing |
7 +=============================================================================+
8 | |
9 | FILE NAME : CTOOSSPS.pls |
10 | DESCRIPTION: |
11 | Contains all pkgs procedure definition for |
12 | Option specific sourcing module. This file will also |
13 | contains all the ncessary pkg. variable declaration and |
14 | pl/sql records definition. |
15 | HISTORY : |
16 | 25-Aug-2003 : Renga Kannan Initial version |
17 =============================================================================*/
18
19
20 /* General package name constant declaration */
21
22 g_pkg_name CONSTANT VARCHAR2(30) := 'CTO_OSS_SOURCE_PK';
23
24
25
26 /* This is the record type used to send the list of orgs where bom should be created,
27 during Auto create config item process
28 */
29
30 TYPE bom_list_tab_rec is RECORD (
31 Line_id Number,
32 Inventory_item_id Number,
33 Org_id Number);
34 TYPE Orgs_list is Table of Number;
35
36 TYPE bom_org_list_tab is TABLE Of bom_list_tab_rec index by binary_integer;
37
38
39 /* The following procedure will be called during Auto create config
40 process. This will have one input parameter, which is top ato line id.
41 This will return the list of orgs where bom should be created for each
42 OSS config as record structrue
43 */
44
45 Procedure Process_Oss_configurations(
46 p_ato_line_id IN Number,
47 p_mode IN Varchar2 DEFAULT 'ACC',
48 x_return_status OUT NOCOPY Varchar2,
49 x_msg_count OUT NOCOPY Number,
50 x_msg_data OUT NOCOPY Varchar);
51
52 TYPE number_arr IS TABLE OF Number index by binary_integer;
53 TYPE Char30_arr IS TABLE of Varchar2(30) index by binary_integer;
54 TYPE Char1_arr IS TABLE of Varchar2(1);
55
56 /*
57 TYPE OSS_ORGS_LIST_REC_TYPE is RECORD (
58 Line_id Number_arr := number_arr(),
59 Inventory_item_id Number_arr := Number_arr(),
60 Org_id Number_arr := Number_arr(),
61 Vendor_id Number_arr := Number_arr(),
62 Vendor_site Char30_arr := Char30_arr());
63 */
64 TYPE OSS_ORGS_LIST_REC_TYPE is RECORD (
65 Line_id Number_arr ,
66 ato_line_id Number_arr,
67 Inventory_item_id Number_arr ,
68 Org_id Number_arr ,
69 Vendor_id Number_arr ,
70 Vendor_site Char30_arr ,
71 Make_flag Char1_arr);
72
73 /* This is the procedure that is called during ATP. Match api will
74 call this procedure.
75 */
76 Procedure Get_OSS_Orgs_list(
77 x_oss_orgs_list OUT NOCOPY CTO_OSS_SOURCE_PK.oss_orgs_list_rec_type,
78 x_return_status OUT NOCOPY Varchar2,
79 x_msg_data OUT NOCOPY Varchar2,
80 x_msg_count OUT NOCOPY Number);
81
82
83 Procedure update_oss_in_bcol(
84 p_ato_line_id IN Number,
85 x_oss_exists OUT NOCOPY Varchar2,
86 x_return_status OUT NOCOPY Varchar2,
87 x_msg_data OUT NOCOPY Varchar2,
88 x_msg_count OUT NOCOPY Number) ;
89
90
91
92 /* This procedure will be called during populate_src_orgs. This API will get the
93 sourcing orgs for OSS models
94 */
95
96 PROCEDURE query_oss_sourcing_org(
97 p_line_id IN NUMBER,
98 p_inventory_item_id IN NUMBER,
99 p_organization_id IN NUMBER,
100 x_sourcing_rule_exists OUT NOCOPY varchar2,
101 x_source_type OUT NOCOPY NUMBER,
102 x_t_sourcing_info OUT NOCOPY CTO_MSUTIL_PUB.SOURCING_INFO,
103 x_exp_error_code OUT NOCOPY NUMBER,
104 x_return_status OUT NOCOPY varchar2,
105 x_msg_data OUT NOCOPY Varchar2,
106 x_msg_count OUT NOCOPY Number);
107
108 Procedure Create_oss_sourcing_rules(
109 p_ato_line_id IN Number,
110 p_mode IN Varchar2 DEFAULT 'ACC',
111 p_changed_src IN Varchar2 DEFAULT null,
112 x_return_status OUT NOCOPY Varchar2,
113 x_msg_count OUT NOCOPY Number,
114 x_msg_data OUT NOCOPY Varchar2
115 );
116
117 Procedure get_oss_bom_orgs(
118 p_line_id IN Number,
119 x_orgs_list OUT NOCOPY CTO_OSS_SOURCE_PK.orgs_list,
120 x_return_status OUT NOCOPY Varchar2,
121 x_msg_data OUT NOCOPY Varchar2,
122 x_msg_count OUT NOCOPY Number);
123
124
125 END CTO_OSS_SOURCE_PK;