[Home] [Help]
PACKAGE BODY: APPS.BOM_CONFIG_EXPLOSIONS_PKG
Source
1 PACKAGE BODY BOM_CONFIG_EXPLOSIONS_PKG as
2 /* $Header: OEXCBCEB.pls 115.1 99/07/16 08:11:42 porting ship $ */
3
4 PROCEDURE Insert_Row(X_Rowid IN OUT VARCHAR2,
5 X_Top_Bill_Sequence_Id NUMBER,
6 X_Organization_Id NUMBER,
7 X_Group_Id NUMBER,
8 X_Effectivity_Date DATE,
9 X_Header_Id NUMBER,
10 X_Line_Id NUMBER,
11 X_Sort_Order VARCHAR2,
12 X_Select_Flag VARCHAR2,
13 X_Select_Quantity NUMBER,
14 X_Price_List_Id NUMBER,
15 X_List_Price NUMBER,
16 X_Selling_Price NUMBER,
17 X_Required_For_Revenue NUMBER,
18 X_Session_Id NUMBER,
19 X_Context VARCHAR2,
20 X_Attribute1 VARCHAR2,
21 X_Attribute2 VARCHAR2,
22 X_Attribute3 VARCHAR2,
23 X_Attribute4 VARCHAR2,
24 X_Attribute5 VARCHAR2,
25 X_Attribute6 VARCHAR2,
26 X_Attribute7 VARCHAR2,
27 X_Attribute8 VARCHAR2,
28 X_Attribute9 VARCHAR2,
29 X_Attribute10 VARCHAR2,
30 X_Attribute11 VARCHAR2,
31 X_Attribute12 VARCHAR2,
32 X_Attribute13 VARCHAR2,
33 X_Attribute14 VARCHAR2,
34 X_Attribute15 VARCHAR2,
35 X_Pricing_Context VARCHAR2 DEFAULT NULL,
36 X_Pricing_attribute1 VARCHAR2 DEFAULT NULL,
37 X_Pricing_attribute2 VARCHAR2 DEFAULT NULL,
38 X_Pricing_attribute3 VARCHAR2 DEFAULT NULL,
39 X_Pricing_attribute4 VARCHAR2 DEFAULT NULL,
40 X_Pricing_attribute5 VARCHAR2 DEFAULT NULL,
41 X_Pricing_attribute6 VARCHAR2 DEFAULT NULL,
42 X_Pricing_attribute7 VARCHAR2 DEFAULT NULL,
43 X_Pricing_attribute8 VARCHAR2 DEFAULT NULL,
44 X_Pricing_attribute9 VARCHAR2 DEFAULT NULL,
45 X_Pricing_attribute10 VARCHAR2 DEFAULT NULL,
46 X_Pricing_attribute11 VARCHAR2 DEFAULT NULL,
47 X_Pricing_attribute12 VARCHAR2 DEFAULT NULL,
48 X_Pricing_attribute13 VARCHAR2 DEFAULT NULL,
49 X_Pricing_attribute14 VARCHAR2 DEFAULT NULL,
50 X_Pricing_attribute15 VARCHAR2 DEFAULT NULL
51 ) IS
52 CURSOR C IS SELECT rowid FROM BOM_CONFIG_EXPLOSIONS
53 WHERE group_id = X_Group_Id
54 AND sort_order = X_Sort_Order;
55
56 BEGIN
57
58
59 INSERT INTO bom_config_explosions(
60 top_bill_sequence_id,
61 bill_sequence_id,
62 organization_id,
63 explosion_type,
64 component_sequence_id,
65 component_item_id,
66 plan_level,
67 extended_quantity,
68 sort_order,
69 creation_date,
70 created_by,
71 last_update_date,
72 last_updated_by,
73 group_id,
74 session_id,
75 select_flag,
76 select_quantity,
77 top_item_id,
78 context,
79 attribute1,
80 attribute2,
81 attribute3,
82 attribute4,
83 attribute5,
84 attribute6,
85 attribute7,
86 attribute8,
87 attribute9,
88 attribute10,
89 attribute11,
90 attribute12,
91 attribute13,
92 attribute14,
93 attribute15,
94 header_id,
95 line_id,
96 list_price,
97 selling_price,
98 component_quantity,
99 so_basis,
100 optional,
101 mutually_exclusive_options,
102 check_atp,
103 shipping_allowed,
104 required_to_ship,
105 required_for_revenue,
106 include_on_ship_docs,
107 include_on_bill_docs,
108 low_quantity,
109 high_quantity,
110 pick_components,
111 primary_uom_code,
112 primary_unit_of_measure,
113 base_item_id,
114 atp_components_flag,
115 atp_flag,
116 bom_item_type,
117 pick_components_flag,
118 replenish_to_order_flag,
119 shippable_item_flag,
120 customer_order_flag,
121 internal_order_flag,
122 customer_order_enabled_flag,
123 internal_order_enabled_flag,
124 so_transactions_flag,
125 description,
126 assembly_item_id,
127 configurator_flag,
128 price_list_id,
129 rounding_factor,
130 pricing_context,
131 pricing_attribute1,
132 pricing_attribute2,
133 pricing_attribute3,
134 pricing_attribute4,
135 pricing_attribute5,
136 pricing_attribute6,
137 pricing_attribute7,
138 pricing_attribute8,
139 pricing_attribute9,
140 pricing_attribute10,
141 pricing_attribute11,
142 pricing_attribute12,
143 pricing_attribute13,
144 pricing_attribute14,
145 pricing_attribute15,
146 component_code,
147 loop_flag,
148 parent_bom_item_type,
149 operation_seq_num,
150 item_num,
151 effectivity_date,
152 disable_date,
153 implementation_date,
154 rexplode_flag,
155 common_bill_sequence_id,
156 comp_bill_seq_id,
157 comp_common_bill_seq_id,
158 num_col1,
159 num_col2,
160 num_col3,
161 date_col1,
162 date_col2,
163 date_col3,
164 char_col1,
165 char_col2,
166 char_col3 )
167 SELECT
168
169 X_Top_Bill_Sequence_Id,
170 Bill_Sequence_Id,
171 X_Organization_Id,
172 'OPTIONAL',
173 Component_Sequence_Id,
174 Component_Item_Id,
175 Plan_Level,
176 Extended_Quantity,
177 X_Sort_Order,
178 SYSDATE,
179 1,
180 SYSDATE,
181 1,
182 X_Group_Id,
183 X_Session_Id,
184 X_Select_Flag,
185 X_Select_Quantity,
186 Top_Item_Id,
187 X_Context,
188 X_Attribute1,
189 X_Attribute2,
190 X_Attribute3,
191 X_Attribute4,
192 X_Attribute5,
193 X_Attribute6,
194 X_Attribute7,
195 X_Attribute8,
196 X_Attribute9,
197 X_Attribute10,
198 X_Attribute11,
199 X_Attribute12,
200 X_Attribute13,
201 X_Attribute14,
202 X_Attribute15,
203 X_Header_Id,
204 X_Line_Id,
205 X_List_Price,
206 X_Selling_Price,
207 Component_Quantity,
208 So_Basis,
209 Optional,
210 Mutually_Exclusive_Options,
211 Check_Atp,
212 Shipping_Allowed,
213 Required_To_Ship,
214 X_Required_For_Revenue,
215 Include_On_Ship_Docs,
216 Include_On_Bill_Docs,
217 Low_Quantity,
218 High_Quantity,
219 Pick_Components,
220 Primary_Uom_Code,
221 Primary_Unit_Of_Measure,
222 Base_Item_Id,
223 Atp_Components_Flag,
224 Atp_Flag,
225 Bom_Item_Type,
226 Pick_Components_Flag,
227 Replenish_To_Order_Flag,
228 Shippable_Item_Flag,
229 Customer_Order_Flag,
230 Internal_Order_Flag,
231 Customer_Order_Enabled_Flag,
232 Internal_Order_Enabled_Flag,
233 So_Transactions_Flag,
234 Description,
235 Assembly_Item_Id,
236 NULL,
237 X_Price_List_Id,
238 NULL,
239 X_Pricing_context,
240 X_Pricing_attribute1,
241 X_Pricing_attribute2,
242 X_Pricing_attribute3,
243 X_Pricing_attribute4,
244 X_Pricing_attribute5,
245 X_Pricing_attribute6,
246 X_Pricing_attribute7,
247 X_Pricing_attribute8,
248 X_Pricing_attribute9,
249 X_Pricing_attribute10,
250 X_Pricing_attribute11,
251 X_Pricing_attribute12,
252 X_Pricing_attribute13,
253 X_Pricing_attribute14,
254 X_Pricing_attribute15,
255 Component_Code,
256 Loop_Flag,
257 Parent_Bom_Item_Type,
258 Operation_Seq_Num,
259 Item_Num,
260 Effectivity_Date,
261 Disable_Date,
262 Implementation_Date,
263 Rexplode_Flag,
264 Common_Bill_Sequence_Id,
265 Comp_Bill_Seq_Id,
266 Comp_Common_Bill_Seq_Id,
267 Num_Col1,
268 Num_Col2,
269 Num_Col3,
270 Date_Col1,
271 Date_Col2,
272 Date_Col3,
273 Char_Col1,
274 Char_Col2,
275 Char_Col3
276 FROM SO_CONFIG_COMPONENTS_V
277 WHERE TOP_BILL_SEQUENCE_ID = X_Top_Bill_Sequence_Id
278 AND ORGANIZATION_ID = X_Organization_Id
279 AND EXPLOSION_TYPE = 'OPTIONAL'
280 AND SORT_ORDER = X_Sort_Order
281 AND EFFECTIVITY_DATE <= X_Effectivity_Date
282 AND DISABLE_DATE > X_Effectivity_Date ;
283
284 OPEN C;
285 FETCH C INTO X_Rowid;
286 if (C%NOTFOUND) then
287 CLOSE C;
288 Raise NO_DATA_FOUND;
289 end if;
290 CLOSE C;
291
292 END Insert_Row;
293
294 PROCEDURE Update_Row(X_Rowid VARCHAR2,
295 X_Select_Flag VARCHAR2,
296 X_Select_Quantity NUMBER
297
298 ) IS
299 BEGIN
300 UPDATE bom_config_explosions
301 SET
302 select_flag = X_Select_Flag,
303 select_quantity = X_Select_Quantity
304 WHERE rowid = X_Rowid;
305
306 if (SQL%NOTFOUND) then
307 Raise NO_DATA_FOUND;
308 end if;
309 END Update_Row;
310
311 END BOM_CONFIG_EXPLOSIONS_PKG;