[Home] [Help]
PACKAGE BODY: APPS.PO_MASS_UPDATE_REQ_GRP
Source
1 PACKAGE BODY PO_Mass_Update_Req_GRP AS
2 /* $Header: PO_Mass_Update_Req_GRP.plb 120.2 2008/01/09 14:34:18 rakchakr noship $*/
3
4 --------------------------------------------------------------------------------------------------
5
6 -- Call is made such that the sql file POXMUR.sql calls the procedure
7 -- PO_Mass_Update_Req_GRP.Update_Persons
8 -- PO_Mass_Update_Req_GRP.Update_Persons calls the procedure PO_Mass_Update_Req_PVT.DO_Update
9
10 --------------------------------------------------------------------------------------------------
11
12 g_debug_stmt CONSTANT BOOLEAN := PO_DEBUG.is_debug_stmt_on;
13 g_debug_unexp CONSTANT BOOLEAN := PO_DEBUG.is_debug_unexp_on;
14 g_pkg_name CONSTANT VARCHAR2(100) := 'PO_Mass_Update_Req_GRP';
15 g_log_head CONSTANT VARCHAR2(100) := 'po.plsql.' || g_pkg_name || '.';
16
17 --------------------------------------------------------------------------------------------------
18 -- Start of Comments
19
20 -- API Name : Update_Persons
21 -- Type : Group
22 -- Pre-reqs : None
23 -- Function : Calls the procedure PO_Mass_Update_Req_PVT.Do_Update to update the
24 -- Preparer/Approver/Requestor accordingly to the input received
25 -- from the Update_Person parameter value set.
26 -- Parameters :
27
28 -- IN : p_update_person Person needs to be updated(Preparer/Approver/Requestor).
29 -- p_old_personid Id of the old person.
30 -- p_new_personid Id of the new person.
31 -- p_document_type Type of the document(INTERNAL AND PURCHASE).
32 -- p_document_no_from Document number from.
33 -- p_document_no_to Document number to.
34 -- p_date_from Date from.
35 -- p_date_to Date to.
36 -- p_commit_interval Commit interval.
37
38 -- OUT : p_msg_data Actual message in encoded format.
39 -- p_msg_count Holds the number of messages in the API list.
40 -- p_return_status Return status of the API (Includes 'S','E','U').
41
42 -- End of Comments
43 --------------------------------------------------------------------------------------------------
44
45 PROCEDURE Update_Persons(p_update_person IN VARCHAR2,
46 p_old_personid IN NUMBER,
47 p_new_personid IN NUMBER,
48 p_document_type IN VARCHAR2,
49 p_document_no_from IN VARCHAR2,
50 p_document_no_to IN VARCHAR2,
51 p_date_from IN DATE,
52 p_date_to IN DATE,
53 p_commit_interval IN NUMBER,
54 p_msg_data OUT NOCOPY VARCHAR2,
55 p_msg_count OUT NOCOPY NUMBER,
56 p_return_status OUT NOCOPY VARCHAR2) IS
57
58 l_progress VARCHAR2(3);
59 l_log_head CONSTANT VARCHAR2(1000) := g_log_head||'Update_Persons';
60
61 BEGIN
62
63 l_progress := '000';
64
65 IF g_debug_stmt THEN
66
67 PO_DEBUG.debug_begin(l_log_head);
68 PO_DEBUG.debug_var(l_log_head,l_progress,'p_update_person',p_update_person );
69 PO_DEBUG.debug_var(l_log_head,l_progress,'p_old_personid', p_old_personid);
70 PO_DEBUG.debug_var(l_log_head,l_progress,'p_new_personid', p_new_personid);
71 PO_DEBUG.debug_var(l_log_head,l_progress,'p_document_type',p_document_type );
72 PO_DEBUG.debug_var(l_log_head,l_progress,'p_document_no_from',p_document_no_from );
73 PO_DEBUG.debug_var(l_log_head,l_progress,'p_date_from',p_date_from);
74 PO_DEBUG.debug_var(l_log_head,l_progress,'p_date_to',p_date_to);
75 PO_DEBUG.debug_var(l_log_head,l_progress,'p_commit_interval',p_commit_interval);
76
77 END IF;
78
79 SAVEPOINT Update_Persons_SP;
80
81 PO_Mass_Update_Req_PVT.DO_Update(p_update_person,
82 p_old_personid,
83 p_new_personid,
84 p_document_type,
85 p_document_no_from,
86 p_document_no_to,
87 p_date_from,
88 p_date_to,
89 p_commit_interval,
90 p_msg_data,
91 p_msg_count,
92 p_return_status);
93 l_progress := '001';
94
95 IF g_debug_stmt THEN
96
97 PO_DEBUG.debug_var(l_log_head,l_progress,'After Calling Do_Update', 'After Calling Do_Update');
98
99 END IF;
100
101 EXCEPTION
102
103 WHEN OTHERS THEN
104
105 IF ( FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
106
107 FND_LOG.STRING( FND_LOG.LEVEL_UNEXPECTED ,l_log_head,l_progress||SQLCODE||SUBSTR(SQLERRM,1,200));
108
109 END IF;
110
111 ROLLBACK TO Update_Persons_SP;
112
113 p_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
114
115 IF FND_MSG_PUB.Check_Msg_Level( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR ) THEN
116
117 FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME, l_log_head );
118
119 END IF;
120
121 FND_MSG_PUB.Count_And_Get(p_encoded=>'F', p_count => p_msg_count, p_data => p_msg_data );
122
123 END Update_Persons;
124
125 END PO_Mass_Update_Req_GRP;