DBA Data[Home] [Help]

PACKAGE BODY: APPS.PO_NEGOTIATIONS4_GRP

Source


1 PACKAGE BODY PO_NEGOTIATIONS4_GRP AS
2 /* $Header: POXGNG4B.pls 120.1 2005/07/12 10:56:05 ksareddy noship $ */
3 
4 /**
5  * Group Procedure: Split_RequisitionLines
6  * Requires: API message list has been initialized if p_init_msg_list is false.
7  * Modifies: Inserts new req lines and their distributions, For parent
8  *   req lines, update requisition_lines table to modified_by_agent_flag='Y'.
9  *   Also sets prevent encumbrace flag to 'Y' in the po_req_distributions table.
10  * Effects: This api split the requisition lines, if needed, depending on the
11  *   allocation done by the sourcing user. This api uses a global temp. table
12  *   to massage the input given by sourcing and inserts records into
13  *   po_requisition_lines and po_req_distributions table. This api also handles
14  *   the encumbrace effect of splitting requisition lines. This api would be
15  *   called from ORacle sourcing workflow.
16  *
17  * Returns:
18  *   x_return_status - FND_API.G_RET_STS_SUCCESS if action succeeds
19  *                     FND_API.G_RET_STS_ERROR if  action fails
20  *                     FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs
21  *                     x_msg_count returns count of messages in the stack.
22  *                     x_msg_data returns message only if 1 message.
23  */
24 
25 
26 PROCEDURE Split_RequisitionLines
27 (   p_api_version		IN		NUMBER			    ,
28     p_init_msg_list		IN    		VARCHAR2  :=FND_API.G_FALSE ,
29     p_commit			IN    		VARCHAR2  :=FND_API.G_FALSE ,
30     x_return_status		OUT NOCOPY   	VARCHAR2  		    ,
31     x_msg_count			OUT NOCOPY   	NUMBER   		    ,
32     x_msg_data			OUT NOCOPY   	VARCHAR2 		    ,
33     p_auction_header_id		IN  		NUMBER
34 )
35 IS
36 
37 BEGIN
38 
39   PO_NEGOTIATIONS4_PVT.Split_RequisitionLines
40   (   p_api_version		=>	    p_api_version	,
41       p_init_msg_list		=>	    p_init_msg_list	,
42       p_commit			=>	    p_commit		,
43       x_return_status		=>	    x_return_status	,
44       x_msg_count		=>	    x_msg_count		,
45       x_msg_data		=>	    x_msg_data		,
46       p_auction_header_id	=>	    p_auction_header_id
47   );
48 
49 EXCEPTION
50 	WHEN OTHERS THEN
51 	     --no rollback as there is no data base change in the procedure.
52 	     x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
53 
54 	     FND_MSG_PUB.Count_And_Get
55 	     ( 	p_count  =>  x_msg_count ,
56 		p_data 	 =>  x_msg_data
57 	     );
58 
59 END Split_RequisitionLines;
60 
61 
62 --< Catalog Convergence 12.0 Sourcing impact START>
63 Procedure insert_attributes (
64                      p_api_version           IN  NUMBER,
65                      p_commit                IN  VARCHAR2 default FND_API.G_FALSE,
66                      p_init_msg_list         IN  VARCHAR2 default FND_API.G_FALSE,
67                      p_validation_level      IN  NUMBER default FND_API.G_VALID_LEVEL_FULL,
68                      p_auction_header_id     IN  NUMBER,
69                      x_return_status         OUT NOCOPY VARCHAR2,
70                      x_msg_count             OUT NOCOPY NUMBER,
71                      x_msg_data              OUT NOCOPY VARCHAR2
72                )
73 IS
74 BEGIN
75 
76   PO_ATTRIBUTE_VALUES_PVT.handle_attributes( p_interface_header_id => p_auction_header_id);
77 
78 EXCEPTION
79        WHEN OTHERS THEN NULL; --TODO proper exception handling
80 
81 END insert_attributes;
82 --<Catalog Convergence 12.0 Sourcing impact END>
83 
84 END PO_NEGOTIATIONS4_GRP;