DBA Data[Home] [Help]

PACKAGE BODY: APPS.IGC_CC_PO_HEADERS_ALL_PVT

Source


1 PACKAGE BODY IGC_CC_PO_HEADERS_ALL_PVT AS
2 /*$Header: IGCCPHDB.pls 120.3.12000000.2 2007/12/06 14:58:57 bmaddine ship $*/
3 
4   G_PKG_NAME CONSTANT VARCHAR2(30):= 'IGC_CC_PO_HEADERS_ALL_PVT';
5 
6   -- The flag determines whether to print debug information or not.
7   g_debug_flag        VARCHAR2(1) := 'N' ;
8 
9 
10 /*=======================================================================+
11  |                       PROCEDURE Insert_Row                            |
12  +=======================================================================*/
13 PROCEDURE Insert_Row
14 (
15   p_api_version               IN       NUMBER,
16   p_init_msg_list             IN       VARCHAR2 := FND_API.G_FALSE,
17   p_commit                    IN       VARCHAR2 := FND_API.G_FALSE,
18   p_validation_level          IN       NUMBER   := FND_API.G_VALID_LEVEL_FULL,
19   x_return_status             OUT NOCOPY      VARCHAR2,
20   x_msg_count                 OUT NOCOPY      NUMBER,
21   x_msg_data                  OUT NOCOPY      VARCHAR2,
22   ----------------------------------------------
23   p_po_headers_rec            IN       po_headers_all%ROWTYPE
24 )
25 IS
26 
27 	l_api_name            CONSTANT VARCHAR2(30)   := 'Insert_Row';
28 	l_api_version         CONSTANT NUMBER         :=  1.0;
29 
30 BEGIN
31 	SAVEPOINT Insert_Row_Pvt ;
32 
33 	IF NOT FND_API.Compatible_API_Call ( l_api_version,
34                                              p_api_version,
35                                              l_api_name,
36                                              G_PKG_NAME )
37 	THEN
38 		RAISE FND_API.G_EXC_UNEXPECTED_ERROR ;
39 	END IF;
40 
41 	IF FND_API.to_Boolean ( p_init_msg_list )
42 	THEN
43 		FND_MSG_PUB.initialize ;
44 	END IF;
45 
46 	x_return_status := FND_API.G_RET_STS_SUCCESS ;
47 
48 
49 	INSERT INTO po_headers_all (
50  	po_header_id               ,
51   	agent_id                   ,
52   	type_lookup_code           ,
53   	last_update_date           ,
54   	last_updated_by            ,
55   	segment1                   ,
56   	summary_flag               ,
57   	enabled_flag               ,
58   	segment2                   ,
59   	segment3                   ,
60   	segment4                   ,
61   	segment5                   ,
62   	start_date_active          ,
63   	end_date_active            ,
64   	last_update_login          ,
65   	creation_date              ,
66   	created_by                 ,
67   	vendor_id                  ,
68   	vendor_site_id             ,
69   	vendor_contact_id          ,
70   	ship_to_location_id        ,
71   	bill_to_location_id        ,
72   	terms_id                   ,
73   	ship_via_lookup_code       ,
74   	fob_lookup_code            ,
75   	freight_terms_lookup_code  ,
76   	status_lookup_code         ,
77   	currency_code              ,
78   	rate_type                  ,
79   	rate_date                  ,
80   	rate                       ,
81   	from_header_id             ,
82   	from_type_lookup_code      ,
83   	start_date                 ,
84   	end_date                   ,
85   	blanket_total_amount       ,
86   	authorization_status       ,
87   	revision_num               ,
88   	revised_date               ,
89   	approved_flag              ,
90   	approved_date              ,
91   	amount_limit               ,
92  	min_release_amount         ,
93   	note_to_authorizer         ,
94   	note_to_vendor             ,
95   	note_to_receiver           ,
96   	print_count                ,
97   	printed_date               ,
98   	vendor_order_num           ,
99   	confirming_order_flag      ,
100   	comments                   ,
101   	reply_date                 ,
102   	reply_method_lookup_code   ,
103   	rfq_close_date             ,
104   	quote_type_lookup_code     ,
105   	quotation_class_code       ,
106   	quote_warning_delay_unit   ,
107   	quote_warning_delay        ,
108   	quote_vendor_quote_number  ,
109   	acceptance_required_flag   ,
110  	 acceptance_due_date        ,
111   	closed_date                ,
112   	user_hold_flag             ,
113   	approval_required_flag     ,
114   	cancel_flag                ,
115         firm_status_lookup_code    ,
116         firm_date                  ,
117         frozen_flag                ,
118         attribute_category         ,
119         attribute1                 ,
120         attribute2                 ,
121         attribute3                 ,
122         attribute4                 ,
123         attribute5                 ,
124         attribute6                 ,
125         attribute7                 ,
126         attribute8                 ,
127         attribute9                 ,
128         attribute10                ,
129         attribute11                ,
130         attribute12                ,
131         attribute13                ,
132         attribute14                ,
133         attribute15                ,
134         closed_code                ,
135         ussgl_transaction_code     ,
136         government_context         ,
137         request_id                 ,
138         program_application_id     ,
139         program_id                 ,
140         program_update_date        ,
141         org_id                     ,
142         supply_agreement_flag      ,
143         edi_processed_flag         ,
144         edi_processed_status       ,
145         global_attribute_category  ,
146         global_attribute1          ,
147         global_attribute2          ,
148         global_attribute3          ,
149         global_attribute4          ,
150         global_attribute5          ,
151         global_attribute6          ,
152         global_attribute7          ,
153         global_attribute8          ,
154         global_attribute9          ,
155         global_attribute10         ,
156         global_attribute11         ,
157         global_attribute12         ,
158         global_attribute13         ,
159         global_attribute14         ,
160         global_attribute15         ,
161         global_attribute16         ,
162         global_attribute17         ,
163         global_attribute18         ,
164         global_attribute19         ,
165         global_attribute20         ,
166         interface_source_code      ,
167         reference_num              ,
168         wf_item_type               ,
169         wf_item_key                ,
170         mrc_rate_type              ,
171         mrc_rate_date              ,
172         mrc_rate                   ,
173         pcard_id                   ,
174         price_update_tolerance     ,
175         pay_on_code                ,
176 	style_id		   )
177       VALUES
178        (
179         p_po_headers_rec.po_header_id               ,
180         p_po_headers_rec.agent_id                   ,
181         p_po_headers_rec.type_lookup_code           ,
182         p_po_headers_rec.last_update_date           ,
183         p_po_headers_rec.last_updated_by            ,
184         p_po_headers_rec.segment1                   ,
185         p_po_headers_rec.summary_flag               ,
186         p_po_headers_rec.enabled_flag               ,
187         p_po_headers_rec.segment2                   ,
188         p_po_headers_rec.segment3                   ,
189         p_po_headers_rec.segment4                   ,
190         p_po_headers_rec.segment5                   ,
191         p_po_headers_rec.start_date_active          ,
192         p_po_headers_rec.end_date_active            ,
193         p_po_headers_rec.last_update_login          ,
194         p_po_headers_rec.creation_date              ,
195         p_po_headers_rec.created_by                 ,
196         p_po_headers_rec.vendor_id                  ,
197         p_po_headers_rec.vendor_site_id             ,
198         p_po_headers_rec.vendor_contact_id          ,
199         p_po_headers_rec.ship_to_location_id        ,
200         p_po_headers_rec.bill_to_location_id        ,
201         p_po_headers_rec.terms_id                   ,
202         p_po_headers_rec.ship_via_lookup_code       ,
203         p_po_headers_rec.fob_lookup_code            ,
204         p_po_headers_rec.freight_terms_lookup_code  ,
205         p_po_headers_rec.status_lookup_code         ,
206         p_po_headers_rec.currency_code              ,
207         p_po_headers_rec.rate_type                  ,
208         p_po_headers_rec.rate_date                  ,
209         p_po_headers_rec.rate                       ,
210         p_po_headers_rec.from_header_id             ,
211         p_po_headers_rec.from_type_lookup_code      ,
212         p_po_headers_rec.start_date                 ,
213         p_po_headers_rec.end_date                   ,
214         p_po_headers_rec.blanket_total_amount       ,
215         p_po_headers_rec.authorization_status       ,
216         p_po_headers_rec.revision_num               ,
217         p_po_headers_rec.revised_date               ,
218         p_po_headers_rec.approved_flag              ,
219         p_po_headers_rec.approved_date              ,
220         p_po_headers_rec.amount_limit               ,
221         p_po_headers_rec.min_release_amount         ,
222         p_po_headers_rec.note_to_authorizer         ,
223         p_po_headers_rec.note_to_vendor             ,
224         p_po_headers_rec.note_to_receiver           ,
225         p_po_headers_rec.print_count                ,
226         p_po_headers_rec.printed_date               ,
227         p_po_headers_rec.vendor_order_num           ,
228         p_po_headers_rec.confirming_order_flag      ,
229         p_po_headers_rec.comments                   ,
230         p_po_headers_rec.reply_date                 ,
231         p_po_headers_rec.reply_method_lookup_code   ,
232         p_po_headers_rec.rfq_close_date             ,
233         p_po_headers_rec.quote_type_lookup_code     ,
234         p_po_headers_rec.quotation_class_code       ,
235         p_po_headers_rec.quote_warning_delay_unit   ,
236         p_po_headers_rec.quote_warning_delay        ,
237         p_po_headers_rec.quote_vendor_quote_number  ,
238         p_po_headers_rec.acceptance_required_flag   ,
239         p_po_headers_rec.acceptance_due_date        ,
240         p_po_headers_rec.closed_date                ,
241         p_po_headers_rec.user_hold_flag             ,
242         p_po_headers_rec.approval_required_flag     ,
243         p_po_headers_rec.cancel_flag                ,
244         p_po_headers_rec.firm_status_lookup_code    ,
245         p_po_headers_rec.firm_date                  ,
246         p_po_headers_rec.frozen_flag                ,
247         p_po_headers_rec.attribute_category         ,
248         p_po_headers_rec.attribute1                 ,
249         p_po_headers_rec.attribute2                 ,
250         p_po_headers_rec.attribute3                 ,
251         p_po_headers_rec.attribute4                 ,
252         p_po_headers_rec.attribute5                 ,
253         p_po_headers_rec.attribute6                 ,
254         p_po_headers_rec.attribute7                 ,
255         p_po_headers_rec.attribute8                 ,
256         p_po_headers_rec.attribute9                 ,
257         p_po_headers_rec.attribute10                ,
258         p_po_headers_rec.attribute11                ,
259         p_po_headers_rec.attribute12                ,
260         p_po_headers_rec.attribute13                ,
261         p_po_headers_rec.attribute14                ,
262         p_po_headers_rec.attribute15                ,
263         p_po_headers_rec.closed_code                ,
264         p_po_headers_rec.ussgl_transaction_code     ,
265         p_po_headers_rec.government_context         ,
266         p_po_headers_rec.request_id                 ,
267         p_po_headers_rec.program_application_id     ,
268         p_po_headers_rec.program_id                 ,
269         p_po_headers_rec.program_update_date        ,
270         p_po_headers_rec.org_id                     ,
271         p_po_headers_rec.supply_agreement_flag      ,
272         p_po_headers_rec.edi_processed_flag         ,
273         p_po_headers_rec.edi_processed_status       ,
274         p_po_headers_rec.global_attribute_category  ,
275         p_po_headers_rec.global_attribute1          ,
276         p_po_headers_rec.global_attribute2          ,
277         p_po_headers_rec.global_attribute3          ,
278         p_po_headers_rec.global_attribute4          ,
279         p_po_headers_rec.global_attribute5          ,
280         p_po_headers_rec.global_attribute6          ,
281         p_po_headers_rec.global_attribute7          ,
282         p_po_headers_rec.global_attribute8          ,
283         p_po_headers_rec.global_attribute9          ,
284         p_po_headers_rec.global_attribute10         ,
285         p_po_headers_rec.global_attribute11         ,
286         p_po_headers_rec.global_attribute12         ,
287         p_po_headers_rec.global_attribute13         ,
288         p_po_headers_rec.global_attribute14         ,
289         p_po_headers_rec.global_attribute15         ,
290         p_po_headers_rec.global_attribute16         ,
291         p_po_headers_rec.global_attribute17         ,
292         p_po_headers_rec.global_attribute18         ,
293         p_po_headers_rec.global_attribute19         ,
294         p_po_headers_rec.global_attribute20         ,
295         p_po_headers_rec.interface_source_code      ,
296         p_po_headers_rec.reference_num              ,
297         p_po_headers_rec.wf_item_type               ,
298         p_po_headers_rec.wf_item_key                ,
299         p_po_headers_rec.mrc_rate_type              ,
300         p_po_headers_rec.mrc_rate_date              ,
301         p_po_headers_rec.mrc_rate                   ,
302         p_po_headers_rec.pcard_id                   ,
303         p_po_headers_rec.price_update_tolerance     ,
304         p_po_headers_rec.pay_on_code		    ,
305 	1
306 	);
307 
308   	IF FND_API.To_Boolean ( p_commit )
309 	THEN
310     		COMMIT WORK;
311   	END iF;
312 
313 	FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
314                                     p_data  => x_msg_data );
315 
316 EXCEPTION
317 
318 	WHEN FND_API.G_EXC_ERROR
319 	THEN
320 
321 		ROLLBACK TO Insert_Row_Pvt ;
322 		x_return_status := FND_API.G_RET_STS_ERROR;
323 		FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
324                                             p_data  => x_msg_data );
325 
326 	WHEN FND_API.G_EXC_UNEXPECTED_ERROR
327 	THEN
328 
329 		ROLLBACK TO Insert_Row_Pvt ;
330 		x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
331 		FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
332                                             p_data  => x_msg_data );
333 
334 	WHEN OTHERS
335 	THEN
336 
337 		ROLLBACK TO Insert_Row_Pvt ;
338 		x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
339 
340 		IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
341 		THEN
342 			FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME,
343                                                   l_api_name);
344 		END IF;
345 
346 		FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
347                                             p_data  => x_msg_data );
348 
349 END Insert_Row;
350 /*-------------------------------------------------------------------------*/
351 
352 /*==========================================================================+
353  |                       PROCEDURE Update_Row                               |
354  +==========================================================================*/
355 PROCEDURE Update_Row
356 (
357   p_api_version               IN       NUMBER,
358   p_init_msg_list             IN       VARCHAR2 := FND_API.G_FALSE,
359   p_commit                    IN       VARCHAR2 := FND_API.G_FALSE,
360   p_validation_level          IN       NUMBER   := FND_API.G_VALID_LEVEL_FULL,
361   x_return_status             OUT NOCOPY      VARCHAR2,
362   x_msg_count                 OUT NOCOPY      NUMBER,
363   x_msg_data                  OUT NOCOPY      VARCHAR2,
364 ---------------------------------------------------
365   p_po_headers_rec            IN       po_headers_all%ROWTYPE
366 )
367 IS
368 
369 	l_api_name            CONSTANT VARCHAR2(30)   := 'Update_Row';
370 	l_api_version         CONSTANT NUMBER         :=  1.0;
371 
372 BEGIN
373 	SAVEPOINT Update_Row_Pvt ;
374 
378                                              G_PKG_NAME )
375 	IF NOT FND_API.Compatible_API_Call ( l_api_version,
376                                              p_api_version,
377                                              l_api_name,
379 	THEN
380     		RAISE FND_API.G_EXC_UNEXPECTED_ERROR ;
381 	END IF;
382 
383 
384 	IF FND_API.to_Boolean ( p_init_msg_list )
385 	THEN
386 		FND_MSG_PUB.initialize ;
387 	END IF;
388 
389 	x_return_status := FND_API.G_RET_STS_SUCCESS ;
390 
391 	UPDATE PO_HEADERS_ALL
392 	SET
393 		po_header_id               = p_po_headers_rec.po_header_id,
394 		agent_id                   = p_po_headers_rec.agent_id,
395 		type_lookup_code           = p_po_headers_rec.type_lookup_code,
396 		last_update_date           = p_po_headers_rec.last_update_date,
397 		last_updated_by            = p_po_headers_rec.last_updated_by,
398 		segment1                   = p_po_headers_rec.segment1,
399 		summary_flag               = p_po_headers_rec.summary_flag,
400 		enabled_flag               = p_po_headers_rec.enabled_flag,
401 		segment2                   = p_po_headers_rec.segment2,
402 		segment3                   = p_po_headers_rec.segment3,
403 		segment4                   = p_po_headers_rec.segment4,
404 		segment5                   = p_po_headers_rec.segment5,
405 		start_date_active          = p_po_headers_rec.start_date_active,
406 		end_date_active            = p_po_headers_rec.end_date_active,
407 		last_update_login          = p_po_headers_rec.last_update_login,
408 		creation_date              = p_po_headers_rec.creation_date,
409 		created_by                 = p_po_headers_rec.created_by,
410 		vendor_id                  = p_po_headers_rec.vendor_id,
411 		vendor_site_id             = p_po_headers_rec.vendor_site_id,
412 		vendor_contact_id          = p_po_headers_rec.vendor_contact_id,
413 		ship_to_location_id        = p_po_headers_rec.ship_to_location_id,
414 		bill_to_location_id        = p_po_headers_rec.bill_to_location_id,
415 		terms_id                   = p_po_headers_rec.terms_id,
416 		ship_via_lookup_code       = p_po_headers_rec.ship_via_lookup_code,
417 		fob_lookup_code            = p_po_headers_rec.fob_lookup_code,
418 		freight_terms_lookup_code  = p_po_headers_rec.freight_terms_lookup_code,
419 		status_lookup_code         = p_po_headers_rec.status_lookup_code,
420 		currency_code              = p_po_headers_rec.currency_code,
421 		rate_type                  = p_po_headers_rec.rate_type,
422 		rate_date                  = p_po_headers_rec.rate_date,
423 		rate                       = p_po_headers_rec.rate,
424 		from_header_id             = p_po_headers_rec.from_header_id,
425 		from_type_lookup_code      = p_po_headers_rec.from_type_lookup_code,
426 		start_date                 = p_po_headers_rec.start_date,
427 		end_date                   = p_po_headers_rec.end_date,
428 		blanket_total_amount       = p_po_headers_rec.blanket_total_amount,
429 		authorization_status       = p_po_headers_rec.authorization_status,
430 		revision_num               = p_po_headers_rec.revision_num,
431 		revised_date               = p_po_headers_rec.revised_date,
432 		approved_flag              = p_po_headers_rec.approved_flag,
433 		approved_date              = p_po_headers_rec.approved_date,
434 		amount_limit               = p_po_headers_rec.amount_limit,
435 		min_release_amount         = p_po_headers_rec.min_release_amount,
436 		note_to_authorizer         = p_po_headers_rec.note_to_authorizer,
437 		note_to_vendor             = p_po_headers_rec.note_to_vendor,
438 		note_to_receiver           = p_po_headers_rec.note_to_receiver,
439 		print_count                = p_po_headers_rec.print_count,
440 		printed_date               = p_po_headers_rec.printed_date,
441 		vendor_order_num           = p_po_headers_rec.vendor_order_num,
442 		confirming_order_flag      = p_po_headers_rec.confirming_order_flag,
443 		comments                   = p_po_headers_rec.comments,
444 		reply_date                 = p_po_headers_rec.reply_date,
445 		reply_method_lookup_code   = p_po_headers_rec.reply_method_lookup_code,
446 		rfq_close_date             = p_po_headers_rec.rfq_close_date,
447 		quote_type_lookup_code     = p_po_headers_rec.quote_type_lookup_code,
448 		quotation_class_code       = p_po_headers_rec.quotation_class_code,
449 		quote_warning_delay_unit   = p_po_headers_rec.quote_warning_delay_unit,
450 		quote_warning_delay        = p_po_headers_rec.quote_warning_delay,
451 		quote_vendor_quote_number  = p_po_headers_rec.quote_vendor_quote_number,
452 		acceptance_required_flag   = p_po_headers_rec.acceptance_required_flag,
453 		acceptance_due_date        = p_po_headers_rec.acceptance_due_date,
454 		closed_date                = p_po_headers_rec.closed_date,
455 		user_hold_flag             = p_po_headers_rec.user_hold_flag,
456 		approval_required_flag     = p_po_headers_rec.approval_required_flag,
457 		cancel_flag                = p_po_headers_rec.cancel_flag,
458 		firm_status_lookup_code    = p_po_headers_rec.firm_status_lookup_code,
459 		firm_date                  = p_po_headers_rec.firm_date,
460 		frozen_flag                = p_po_headers_rec.frozen_flag,
461 		attribute_category         = p_po_headers_rec.attribute_category,
462 		attribute1                 = p_po_headers_rec.attribute1,
463 		attribute2                 = p_po_headers_rec.attribute2,
464 		attribute3                 = p_po_headers_rec.attribute3,
465 		attribute4                 = p_po_headers_rec.attribute4,
466 		attribute5                 = p_po_headers_rec.attribute5,
467 		attribute6                 = p_po_headers_rec.attribute6,
468 		attribute7                 = p_po_headers_rec.attribute7,
469 		attribute8                 = p_po_headers_rec.attribute8,
470 		attribute9                 = p_po_headers_rec.attribute9,
471 		attribute10                = p_po_headers_rec.attribute10,
472 		attribute11                = p_po_headers_rec.attribute11,
473 		attribute12                = p_po_headers_rec.attribute12,
474 		attribute13                = p_po_headers_rec.attribute13,
475 		attribute14                = p_po_headers_rec.attribute14,
476 		attribute15                = p_po_headers_rec.attribute15,
477 		closed_code                = p_po_headers_rec.closed_code,
478 		ussgl_transaction_code     = p_po_headers_rec.ussgl_transaction_code,
479 		government_context         = p_po_headers_rec.government_context,
480 		request_id                 = p_po_headers_rec.request_id,
481 		program_application_id     = p_po_headers_rec.program_application_id,
482 		program_id                 = p_po_headers_rec.program_id,
483 		program_update_date        = p_po_headers_rec.program_update_date,
484 		org_id                     = p_po_headers_rec.org_id,
485 		supply_agreement_flag      = p_po_headers_rec.supply_agreement_flag,
486 		edi_processed_flag         = p_po_headers_rec.edi_processed_flag,
487 		edi_processed_status       = p_po_headers_rec.edi_processed_status,
488 		global_attribute_category  = p_po_headers_rec.global_attribute_category,
489 		global_attribute1          = p_po_headers_rec.global_attribute1,
490 		global_attribute2          = p_po_headers_rec.global_attribute2,
491 		global_attribute3          = p_po_headers_rec.global_attribute3,
492 		global_attribute4          = p_po_headers_rec.global_attribute4,
493 		global_attribute5          = p_po_headers_rec.global_attribute5,
494 		global_attribute6          = p_po_headers_rec.global_attribute6,
495 		global_attribute7          = p_po_headers_rec.global_attribute7,
496 		global_attribute8          = p_po_headers_rec.global_attribute8,
497 		global_attribute9          = p_po_headers_rec.global_attribute9,
498 		global_attribute10         = p_po_headers_rec.global_attribute10,
499 		global_attribute11         = p_po_headers_rec.global_attribute11,
500 		global_attribute12         = p_po_headers_rec.global_attribute12,
501 		global_attribute13         = p_po_headers_rec.global_attribute13,
502 		global_attribute14         = p_po_headers_rec.global_attribute14,
503 		global_attribute15         = p_po_headers_rec.global_attribute15,
504 		global_attribute16         = p_po_headers_rec.global_attribute16,
505 		global_attribute17         = p_po_headers_rec.global_attribute17,
506 		global_attribute18         = p_po_headers_rec.global_attribute18,
507 		global_attribute19         = p_po_headers_rec.global_attribute19,
508 		global_attribute20         = p_po_headers_rec.global_attribute20,
509 		interface_source_code      = p_po_headers_rec.interface_source_code,
510 		reference_num              = p_po_headers_rec.reference_num ,
511 		wf_item_type               = p_po_headers_rec.wf_item_type,
512 		wf_item_key                = p_po_headers_rec.wf_item_key,
513 		mrc_rate_type              = p_po_headers_rec.mrc_rate_type,
514 		mrc_rate_date              = p_po_headers_rec.mrc_rate_date,
515 		mrc_rate                   = p_po_headers_rec.mrc_rate,
516 		pcard_id                   = p_po_headers_rec.pcard_id,
517 		price_update_tolerance     = p_po_headers_rec.price_update_tolerance,
518 		pay_on_code                = p_po_headers_rec.pay_on_code
519 	WHERE
520 		po_header_id = p_po_headers_rec.po_header_id;
521 
522 
523   	IF (SQL%NOTFOUND)
524 	THEN
525     		RAISE NO_DATA_FOUND ;
526   	END IF;
527 
528 
529 	IF FND_API.To_Boolean ( p_commit )
530 	THEN
531 		COMMIT WORK;
532 	END IF;
533 
534 	FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
535                                     p_data  => x_msg_data );
536 
537 EXCEPTION
538 
539 	WHEN FND_API.G_EXC_ERROR
540         THEN
541 		ROLLBACK TO Update_Row_Pvt ;
542 		x_return_status := FND_API.G_RET_STS_ERROR;
543 		FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
544                                             p_data  => x_msg_data );
545 
546 	WHEN FND_API.G_EXC_UNEXPECTED_ERROR
547 	THEN
548 		ROLLBACK TO Update_Row_Pvt ;
549 		x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
550 		FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
551                                                     p_data  => x_msg_data );
552 	WHEN OTHERS
553 	THEN
554 
555 		ROLLBACK TO Update_Row_Pvt ;
556     		x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
557 
558     		IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
559 		THEN
560       			FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME,
561                        			         l_api_name);
562     		END IF;
563 
564     		FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
565                                             p_data  => x_msg_data );
566 
567 END Update_Row;
568 /* ----------------------------------------------------------------------- */
569 
570 END IGC_CC_PO_HEADERS_ALL_PVT;