1 package CTO_CONFIG_BOM_PK AUTHID CURRENT_USER as
2 /* $Header: CTOCBOMS.pls 120.1 2005/06/21 16:10:33 appldev ship $ */
3
4 gUserID number ;
5 gLoginId number ;
6
7
8 TYPE DROPPED_ITEM_TYPE is record (
9 PROCESS varchar2(100)
10 ,LINE_ID number
11 ,SALES_ORDER_NUM number
12 ,ERROR_MESSAGE varchar2(1000)
13 ,TOP_MODEL_NAME varchar2(1000)
14 ,TOP_MODEL_LINE_NUM varchar2(100)
15 ,TOP_CONFIG_NAME varchar2(1000)
16 ,TOP_CONFIG_LINE_NUM varchar2(100)
17 ,PROBLEM_MODEL varchar2(100)
18 ,PROBLEM_MODEL_LINE_NUM varchar2(100)
19 ,PROBLEM_CONFIG varchar2(1000)
20 ,ERROR_ORG varchar2(100)
21 ,ERROR_ORG_ID number
22 ,REQUEST_ID varchar2(100)
23 ,MFG_REL_DATE DATE
24 , NOTIFY_USER varchar2(1000) ) ;
25
26
27 TYPE t_dropped_item_type IS TABLE OF dropped_item_type INDEX BY BINARY_INTEGER;
28
29
30 g_t_dropped_item_type t_dropped_item_type ;
31
32
33
34
35 /* Add a new global variable as a part of bugfix 2524562
36 Initialized to 1 . Set to 0 inside package body if items
37 are dropped from config bill. bmccci ends with warning
38 if gDropItem = 0 */
39
40 gDropItem number := 1;
41
42 /* Added a new global variable as part of bugfix 2840801.
43 This variable has a default value of 'N'. This will be
44 set to 'Y' if any optional components are 'dropped' while
45 creating bill for config item (in CTOCBOMB.pls)
46 The var will be reset in bmccci.opp */
47
48 gApplyHold varchar2(1) := 'N';
49
50
51
52
53 function get_dit_count
54 return number ;
55
56
57
58 procedure get_dropped_components( x_t_dropped_items out NOCOPY t_dropped_item_type ) ;
59
60
61
62 procedure reset_dropped_components ;
63
64 /*-----------------------------------------------------------------+
65
66 These "_ml" functions are temporary for the testing of multilevel.
67 After system testing, they will be renamed to the names of the
68 original modules (without "_ml").
69
70 +------------------------------------------------------------------*/
71 function create_bom_ml(
72 pModelId in number,
73 pConfigId in number,
74 pOrgId in number,
75 pLineId in number,
76 xBillId out NOCOPY number,
77 xErrorMessage out NOCOPY varchar2 ,
78 xMessageName out NOCOPY varchar2 ,
79 xTableName out NOCOPY varchar2 )
80 return integer;
81
82 function create_bom_data_ml (
83 pModelId in number,
84 pConfigId in number,
85 pOrgId in number,
86 pConfigBillId in number,
87 xErrorMessage out NOCOPY VARCHAR2,
88 xMessageName out NOCOPY VARCHAR2,
89 xTableName out NOCOPY VARCHAR2)
90 return integer;
91
92 function get_model_lead_time
93 ( pModelId in number,
94 pOrgId in number,
95 pQty in number,
96 pLeadTime out NOCOPY number,
97 pErrBuf out NOCOPY varchar2
98 )
99 return integer;
100
101
102 -- Start 2307936
103
104 function inherit_op_seq_ml (
105 pLineId in oe_order_lines.line_id%TYPE := NULL,
106 pOrgId in oe_order_lines.ship_from_org_id%TYPE := NULL,
107 PModelId in bom_bill_of_materials.assembly_item_id%TYPE := NULL,
108 pConfigBillId in bom_inventory_components.bill_sequence_id%TYPE := NULL,
109 xErrorMessage out NOCOPY VARCHAR2,
110 xMessageName out NOCOPY VARCHAR2)
111 return integer;
112
113 -- End 2307936
114
115 function bmlupid_update_item_desc
116 (
117 item_id NUMBER,
118 org_id NUMBER,
119 err_buf out NOCOPY VARCHAR2
120 )
121 return integer;
122
123
124 /*-------------------------------------------------------------------
125 Name : check_bom
126
127 Description : This function checks for existence of BOM for an
128 item an the specified Org.
129
130 Requires : Item's Inventory_item_id,
131 Organization Id
132
133 Returns : TRUE if the BOM exists
134 FALSE if BOM does not exist.
135 -----------------------------------------------------------------------*/
136 function check_bom(
137 pItemId in number,
138 pOrgId in number,
139 xBillID out NOCOPY number)
140 return integer;
141
142 END CTO_CONFIG_BOM_PK;