1 PACKAGE BODY PON_SOURCING_API_GRP AS
2 /* $Header: PONNELTB.pls 120.1 2006/03/06 11:41:54 sssahai noship $ */
3
4 /*======================================================================
5 PROCEDURE : val_neg_exists_for_line_type PUBLIC
6 PARAMETERS:
7 p_line_type_id IN line_type that we want to check for
8 x_result OUT NOCOPY result returns 'Y' if negotiations exist,else 'N'
9 x_error_code OUT NOCOPY errcode if any error generate
10 x_error_message OUT NOCOPY error message if any error. size is 250.
11
12 COMMENT : validate if any negotiations exist using the line type specified.
13 ======================================================================*/
14
15 PROCEDURE val_neg_exists_for_line_type(p_line_type_id NUMBER,
16 x_result OUT NOCOPY VARCHAR2,
17 x_error_code OUT NOCOPY VARCHAR2,
18 x_error_message OUT NOCOPY VARCHAR2
19 )
20 IS
21
22 v_debug_status VARCHAR2(100);
23 v_neg_count NUMBER;
24
25 BEGIN
26
27 x_result := 'N';
28
29 -- look for records in the auctions tables
30 v_debug_status := 'VAL_NEG_EXISTS';
31
32 SELECT COUNT(1) INTO v_neg_count
33 FROM pon_auction_item_prices_all
34 WHERE line_type_id = p_line_type_id and
35 rownum = 1;
36
37 IF (v_neg_count > 0) THEN
38 x_result := 'Y';
39 ELSE
40 x_result := 'N';
41 END IF;
42
43
44 RETURN;
45
46 EXCEPTION
47 WHEN others THEN
48 fnd_message.set_name('PON','PON_AUC_PLSQL_ERR');
49 fnd_message.set_token('PACKAGE','PON_SOURCING_OPENAPI_GRP');
50 fnd_message.set_token('PROCEDURE', 'val_neg_exists_for_line_type');
51 fnd_message.set_token('ERROR','[' || SQLERRM || ']');
52 app_exception.raise_exception;
53 END val_neg_exists_for_line_type;
54
55
56 END PON_SOURCING_API_GRP;