DBA Data[Home] [Help]

PACKAGE BODY: APPS.PSB_POSITION_ASSIGNMENTS_PVT

Source


1 PACKAGE BODY PSB_POSITION_ASSIGNMENTS_PVT AS
2 /* $Header: PSBVPOAB.pls 120.2 2005/06/08 05:06:27 masethur ship $ */
3 --
4 -- Global Variables
5 --
6 
7   G_PKG_NAME CONSTANT VARCHAR2(30):= 'PSB_POSITION_ASSIGNMENTS_PVT';
8   G_DBUG              VARCHAR2(2000);
9 
10 /* ----------------------------------------------------------------------- */
11 --
12 -- Private Procedure Declarations
13 --
14 --
15 
16 -- Begin Table Handler Procedures
17 --
18 
19 PROCEDURE UPDATE_ROW (
20   p_api_version         in number,
21   p_init_msg_list       in varchar2 := fnd_api.g_false,
22   p_commit              in varchar2 := fnd_api.g_false,
23   p_validation_level    in number   := fnd_api.g_valid_level_full,
24   p_return_status       OUT  NOCOPY varchar2,
25   p_msg_count           OUT  NOCOPY number,
26   p_msg_data            OUT  NOCOPY varchar2,
27   p_position_assignment_id  in  number,
28   p_pay_element_id        in number := FND_API.G_MISS_NUM,
29   p_pay_element_option_id in number := FND_API.G_MISS_NUM,
30   p_attribute_value_id    in number := FND_API.G_MISS_NUM,
31   p_attribute_value       in varchar2 := FND_API.G_MISS_CHAR,
32   p_effective_start_date  in date := FND_API.G_MISS_DATE,
33   p_effective_end_date    in date := FND_API.G_MISS_DATE,
34   p_element_value_type   in varchar2 := FND_API.G_MISS_CHAR,
35   p_element_value         in number := FND_API.G_MISS_NUM,
36   p_pay_basis             in varchar2 := FND_API.G_MISS_CHAR,
37   p_employee_id           in number := FND_API.G_MISS_NUM,
38   p_primary_employee_flag in varchar2 := FND_API.G_MISS_CHAR,
39   p_global_default_flag   in varchar2 := FND_API.G_MISS_CHAR,
40   p_assignment_default_rule_id in number := FND_API.G_MISS_NUM,
41   p_modify_flag           in varchar2,
42   p_mode                  in varchar2
43 
44   ) is
45     P_LAST_UPDATE_DATE DATE;
46     P_LAST_UPDATED_BY NUMBER;
47     P_LAST_UPDATE_LOGIN NUMBER;
48 --
49 l_api_name      CONSTANT VARCHAR2(30) := 'Update_Row';
50 l_api_version   CONSTANT NUMBER := 1.0 ;
51 l_return_status VARCHAR2(1);
52 l_insert_flag   VARCHAR2(1) DEFAULT 'N';
53 l_worksheet_id  NUMBER ;
54 --
55 BEGIN
56   --
57   SAVEPOINT Update_Row ;
58   --
59   if FND_API.to_Boolean (p_init_msg_list) then
60     FND_MSG_PUB.initialize;
61   end if;
62 
63   -- Initialize API return status to success
64 
65   p_return_status := FND_API.G_RET_STS_SUCCESS ;
66 
67   --
68   P_LAST_UPDATE_DATE := SYSDATE;
69   if(P_MODE = 'I') then
70     P_LAST_UPDATED_BY := 1;
71     P_LAST_UPDATE_LOGIN := 0;
72   elsif (P_MODE = 'R') then
73     P_LAST_UPDATED_BY := FND_GLOBAL.USER_ID;
74     if P_LAST_UPDATED_BY is NULL then
75       P_LAST_UPDATED_BY := -1;
76     end if;
77     P_LAST_UPDATE_LOGIN :=FND_GLOBAL.LOGIN_ID;
78     if P_LAST_UPDATE_LOGIN is NULL then
79       P_LAST_UPDATE_LOGIN := -1;
80     end if;
81   else
82     FND_MESSAGE.SET_NAME('FND', 'SYSTEM-INVALID ARGS');
83     FND_MSG_PUB.Add ;
84     raise FND_API.G_EXC_ERROR ;
85   end if;
86   --
87 
88   -- do the update of the record
89   --
90   -- truncated the p_effective_start_date and p_effective_end_date  for bug 4377166
91      update PSB_POSITION_ASSIGNMENTS set
92 	pay_element_id = decode(p_pay_element_id, FND_API.G_MISS_NUM, pay_element_id, p_pay_element_id),
93 	pay_element_option_id = decode(p_pay_element_option_id, FND_API.G_MISS_NUM, pay_element_option_id, p_pay_element_option_id),
94 	attribute_value_id = decode(p_attribute_value_id, FND_API.G_MISS_NUM, attribute_value_id, p_attribute_value_id),
95 	attribute_value = decode(p_attribute_value, FND_API.G_MISS_CHAR, attribute_value, p_attribute_value),
96 	effective_start_date  = decode(p_effective_start_date, FND_API.G_MISS_DATE, effective_start_date, trunc(p_effective_start_date)),
97 	effective_end_date  = decode(p_effective_end_date, FND_API.G_MISS_DATE, effective_end_date, trunc(p_effective_end_date)),
98 	element_value_type = decode(p_element_value_type, FND_API.G_MISS_CHAR, element_value_type, p_element_value_type),
99 	element_value  = decode(p_element_value, FND_API.G_MISS_NUM, element_value, p_element_value),
100 	pay_basis = decode(p_pay_basis, FND_API.G_MISS_CHAR, pay_basis, p_pay_basis),
101 	employee_id = decode(p_employee_id, FND_API.G_MISS_NUM, employee_id, p_employee_id),
102 	primary_employee_flag = decode(p_primary_employee_flag,
103 				FND_API.G_MISS_CHAR,
104 				primary_employee_flag, p_primary_employee_flag),
105 	global_default_flag  = decode(p_global_default_flag, FND_API.G_MISS_CHAR, global_default_flag, p_global_default_flag),
106 	assignment_default_rule_id = decode(p_assignment_default_rule_id, FND_API.G_MISS_NUM, assignment_default_rule_id, p_assignment_default_rule_id),
107 	modify_flag  = p_modify_flag,
108 	last_update_date = p_last_update_date,
109 	last_updated_by = p_last_updated_by,
110 	last_update_login = p_last_update_login
111      where position_assignment_id = p_position_assignment_id;
112 
113   if (sql%notfound) then
114     -- raise no_data_found;
115     raise FND_API.G_EXC_ERROR ;
116   end if;
117 
118 
119   --
120   --
121   -- Standard check of p_commit.
122 
123   if FND_API.to_Boolean (p_commit) then
124     commit work;
125   end if;
126 
127   -- Standard call to get message count and if count is 1, get message info.
128 
129   FND_MSG_PUB.Count_And_Get (p_count => p_msg_count,
130 			     p_data  => p_msg_data);
131 --
132 EXCEPTION
133 
134    when FND_API.G_EXC_ERROR then
135      --
136      rollback to Update_Row ;
137      p_return_status := FND_API.G_RET_STS_ERROR;
138      FND_MSG_PUB.Count_And_Get (p_count => p_msg_count,
139 				p_data  => p_msg_data);
140      --
141    when FND_API.G_EXC_UNEXPECTED_ERROR then
142      --
143      rollback to Update_Row ;
144      p_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
145      FND_MSG_PUB.Count_And_Get (p_count => p_msg_count,
146 				p_data  => p_msg_data);
147      --
148    when OTHERS then
149      --
150      rollback to Update_Row ;
151      p_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
152      if FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) then
153        FND_MSG_PUB.Add_Exc_Msg (G_PKG_NAME,
154 				l_api_name);
155      end if;
156      FND_MSG_PUB.Count_And_Get (p_count => p_msg_count,
157 				p_data  => p_msg_data);
158      --
159 
160 END UPDATE_ROW;
161 --
162 /* ------------------  A S S I G N M E N T S  ---------------------------- */
163 
164 
165 PROCEDURE INSERT_ROW (
166   p_api_version          in number,
167   p_init_msg_list        in varchar2 := fnd_api.g_false,
168   p_commit               in varchar2 := fnd_api.g_false,
169   p_validation_level     in number := fnd_api.g_valid_level_full,
170   p_return_status        OUT  NOCOPY varchar2,
171   p_msg_count            OUT  NOCOPY number,
172   p_msg_data             OUT  NOCOPY varchar2,
173   p_rowid                in OUT  NOCOPY varchar2,
174   p_position_assignment_id  in OUT  NOCOPY number,
175   p_data_extract_id      in number,
176   p_worksheet_id         in number,
177   p_position_id         in number,
178   p_assignment_type in varchar2,
179   p_attribute_id          in number,
180   p_attribute_value_id    in number,
181   p_attribute_value       in varchar2,
182   p_pay_element_id        in number,
183   p_pay_element_option_id in number,
184   p_effective_start_date  in date,
185   p_effective_end_date    in date,
186   p_element_value_type   in varchar2,
187   p_element_value         in number,
188   p_currency_code         in varchar2,
189   p_pay_basis             in varchar2,
190   p_employee_id           in number,
191   p_primary_employee_flag in varchar2,
192   p_global_default_flag   in varchar2,
193   p_assignment_default_rule_id in number,
194   p_modify_flag           in varchar2,
195   p_mode                  in varchar2
196   ) is
197     cursor C is select ROWID from PSB_POSITION_ASSIGNMENTS
198       where position_assignment_id = p_position_assignment_id;
199     P_LAST_UPDATE_DATE DATE;
200     P_LAST_UPDATED_BY NUMBER;
201     P_LAST_UPDATE_LOGIN NUMBER;
202 --
203 l_api_name      CONSTANT VARCHAR2(30) := 'Insert_Row' ;
204 l_api_version   CONSTANT NUMBER := 1.0 ;
205 l_return_status VARCHAR2(1);
206 l_pos_assignment_id NUMBER ;
207 --
208 BEGIN
209   --
210   SAVEPOINT INSERT_ROW ;
211   --
212   if FND_API.to_Boolean (p_init_msg_list) then
213     FND_MSG_PUB.initialize;
214   end if;
215   --
216   p_return_status := FND_API.G_RET_STS_SUCCESS ;
217   --
218   P_LAST_UPDATE_DATE := SYSDATE;
219   if(P_MODE = 'I') then
220     P_LAST_UPDATED_BY := 1;
221     P_LAST_UPDATE_LOGIN := 0;
222   elsif (P_MODE = 'R') then
223     P_LAST_UPDATED_BY := FND_GLOBAL.USER_ID;
224     if P_LAST_UPDATED_BY is NULL then
225       P_LAST_UPDATED_BY := -1;
226     end if;
227     P_LAST_UPDATE_LOGIN :=FND_GLOBAL.LOGIN_ID;
228     if P_LAST_UPDATE_LOGIN is NULL then
229       P_LAST_UPDATE_LOGIN := -1;
230     end if;
231   else
232     FND_MESSAGE.SET_NAME( 'FND', 'SYSTEM-INVALID ARGS');
233     FND_MSG_PUB.Add ;
234     raise FND_API.G_EXC_ERROR;
235   end if;
236   --
237 
238   -- assign pos assignment id
239     SELECT psb_position_assignments_s.NEXTVAL
240       INTO  p_position_assignment_id
241       FROM dual;
242 
243   --
244    insert into PSB_POSITION_ASSIGNMENTS (
245     position_assignment_id   ,
246     data_extract_id      ,
247     worksheet_id         ,
248     position_id        ,
249     assignment_type  ,
250     attribute_id          ,
251     attribute_value_id     ,
252     attribute_value       ,
253     pay_element_id        ,
254     pay_element_option_id  ,
255     effective_start_date  ,
256     effective_end_date   ,
257     element_value_type    ,
258     element_value       ,
259     currency_code  ,
260     pay_basis ,
261     employee_id ,
262     primary_employee_flag,
263     global_default_flag    ,
264     assignment_default_rule_id  ,
265     modify_flag            ,
266     creation_date,
267     created_by,
268     last_update_date,
269     last_updated_by,
270     last_update_login
271   ) values (
272     p_position_assignment_id   ,
273     p_data_extract_id    ,
274     p_worksheet_id         ,
275     p_position_id        ,
276     p_assignment_type  ,
277     p_attribute_id          ,
278     p_attribute_value_id     ,
279     p_attribute_value       ,
280     p_pay_element_id        ,
281     p_pay_element_option_id  ,
282     trunc(p_effective_start_date)  , -- truncated the date for bug 4377166
283     trunc(p_effective_end_date)   ,  -- truncated the date for bug 4377166
284     p_element_value_type    ,
285     p_element_value       ,
286     p_currency_code   ,
287     p_pay_basis ,
288     p_employee_id ,
289     p_primary_employee_flag,
290     p_global_default_flag    ,
291     p_assignment_default_rule_id  ,
292     p_modify_flag            ,
293     p_last_update_date,
294     p_last_updated_by,
295     p_last_update_date,
296     p_last_updated_by,
297     p_last_update_login
298   );
299   --
300   open c;
301   fetch c into P_ROWID;
302   if (c%notfound) then
303     close c;
304     raise FND_API.G_EXC_ERROR ;
305     --raise no_data_found;
306   end if;
307   close c;
308   --
309   --p_position_assignment_id := l_pos_assignment_id ;
310   --
311   -- Standard check of p_commit.
312   if FND_API.to_Boolean (p_commit) then
313     commit work;
314   end if;
315   -- Standard call to get message count and if count is 1, get message info.
316   FND_MSG_PUB.Count_And_Get (p_count => p_msg_count,
317 			     p_data  => p_msg_data);
318   --
319 EXCEPTION
320    --
321    when FND_API.G_EXC_ERROR then
322      --
323      rollback to INSERT_ROW ;
324      p_return_status := FND_API.G_RET_STS_ERROR;
325      FND_MSG_PUB.Count_And_Get (p_count => p_msg_count,
326 				p_data  => p_msg_data);
327      --
328    when FND_API.G_EXC_UNEXPECTED_ERROR then
329      --
330      rollback to INSERT_ROW ;
331      p_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
332      FND_MSG_PUB.Count_And_Get (p_count => p_msg_count,
333 				p_data  => p_msg_data);
334      --
335    when OTHERS then
336      --
337      rollback to INSERT_ROW ;
338      p_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
339      if FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) then
340        FND_MSG_PUB.Add_Exc_Msg (G_PKG_NAME,
341 				l_api_name);
342      END if;
343      FND_MSG_PUB.Count_And_Get (p_count => p_msg_count,
344 				p_data  => p_msg_data);
345      --
346 END INSERT_ROW;
347 --
348 --
349 
350 PROCEDURE LOCK_ROW (
351   p_api_version         in number,
352   p_init_msg_list       in varchar2 := fnd_api.g_false,
353   p_commit              in varchar2 := fnd_api.g_false,
354   p_validation_level    in number   := fnd_api.g_valid_level_full,
355   p_return_status       OUT  NOCOPY varchar2,
356   p_msg_count           OUT  NOCOPY number,
357   p_msg_data            OUT  NOCOPY varchar2,
358   p_row_locked          OUT  NOCOPY varchar2,
359   p_position_assignment_id  in number,
360   p_data_extract_id      in number,
361   p_worksheet_id         in number,
362   p_position_id         in number,
363   p_assignment_type in varchar2,
364   p_attribute_id          in number,
365   p_attribute_value_id    in number,
366   p_attribute_value       in varchar2,
367   p_pay_element_id        in number,
368   p_pay_element_option_id in number,
369   p_effective_start_date  in date,
370   p_effective_end_date    in date,
371   p_element_value_type   in varchar2,
372   p_element_value         in number,
373   p_currency_code         in varchar2,
374   p_pay_basis             in varchar2,
375   p_employee_id           in number,
376   p_primary_employee_flag in varchar2,
377   p_global_default_flag   in varchar2,
378   p_assignment_default_rule_id in number,
379   p_modify_flag           in varchar2
380 ) is
381   cursor c1 is select
382     position_assignment_id   ,
383     data_extract_id      ,
384     worksheet_id         ,
385     position_id        ,
386     assignment_type  ,
387     attribute_id          ,
388     attribute_value_id     ,
389     attribute_value       ,
390     pay_element_id        ,
391     pay_element_option_id  ,
392     effective_start_date  ,
393     effective_end_date   ,
394     element_value_type    ,
395     element_value       ,
396     currency_code ,
397     pay_basis ,
398     employee_id ,
399     primary_employee_flag ,
400     global_default_flag    ,
401     assignment_default_rule_id  ,
402     modify_flag
403     from PSB_POSITION_ASSIGNMENTS
404     where position_assignment_id = P_position_assignment_id
405     for update of position_assignment_id nowait;
406   tlinfo c1%rowtype;
407 --
408 l_api_name      CONSTANT VARCHAR2(30) := 'Lock_Row' ;
409 l_api_version   CONSTANT NUMBER := 1.0 ;
410 l_return_status VARCHAR2(1);
411 --
412 BEGIN
413   --
414   SAVEPOINT Lock_Row ;
415   --
416   if FND_API.to_Boolean (p_init_msg_list) then
417     FND_MSG_PUB.initialize;
418   end if;
419   --
420   p_return_status := FND_API.G_RET_STS_SUCCESS ;
421   p_row_locked    := FND_API.G_TRUE ;
422   --
423   open c1;
424   fetch c1 into tlinfo;
425   if (c1%notfound) then
426     fnd_message.set_name('FND', 'FORM_RECORD_CHANGED');
427     fnd_msg_pub.add ;
428     close c1;
429     raise fnd_api.g_exc_error ;
430   end if;
434       AND (tlinfo.data_extract_id = P_data_extract_id)
431   close c1;
432   --
433   if ( (tlinfo.position_assignment_id = P_position_assignment_id)
435       AND ((tlinfo.worksheet_id = P_worksheet_id)
436 	   OR ((tlinfo.worksheet_id is null)
437 	       AND (P_worksheet_id is null)))
438       AND (tlinfo.position_id  = P_position_id)
439       AND (tlinfo.effective_start_date  = P_effective_start_date)
440       AND ((tlinfo.effective_end_date = P_effective_end_date)
441 	   OR ((tlinfo.effective_end_date is null)
442 	       AND (P_effective_end_date is null)))
443       AND ((tlinfo.assignment_type = P_assignment_type )
444 	   OR ((tlinfo.assignment_type  is null)
445 	       AND (P_assignment_type  is null)))
446       AND ((tlinfo.attribute_id = P_attribute_id)
447 	   OR ((tlinfo.attribute_id is null)
448 	       AND (P_attribute_id is null)))
449       AND ((tlinfo.attribute_value_id = P_attribute_value_id)
450 	   OR ((tlinfo.attribute_value_id  is null)
451 	       AND (P_attribute_value_id is null)))
452       AND ((tlinfo.attribute_value = P_attribute_value)
453 	   OR ((tlinfo.attribute_value is null)
454 	       AND (P_attribute_value is null)))
455       AND ((tlinfo.pay_element_id= p_pay_element_id)
456 	   OR ((tlinfo.pay_element_id is null)
457 	       AND (P_pay_element_id is null)))
458       AND ((tlinfo.pay_element_option_id = P_pay_element_option_id)
459 	   OR ((tlinfo.pay_element_option_id is null)
460 	       AND (P_pay_element_option_id is null)))
461       AND ((tlinfo.element_value_type = P_element_value_type)
462 	   OR ((tlinfo.element_value_type is null)
463 	      AND (P_element_value_type is null)))
464       AND ((tlinfo.element_value = P_element_value)
465 	   OR ((tlinfo.element_value is null)
466 	       AND (P_element_value is null)))
467       AND ((tlinfo.currency_code = P_currency_code)
468 	   OR ((tlinfo.currency_code is null)
469 	       AND (P_currency_code is null)))
470       AND ((tlinfo.pay_basis = P_pay_basis)
471 	   OR ((tlinfo.pay_basis is null)
472 	       AND (P_pay_basis is null)))
473       AND ((tlinfo.employee_id = P_employee_id)
474 	   OR ((tlinfo.employee_id is null)
475 	       AND (P_employee_id is null)))
476       AND ((tlinfo.primary_employee_flag = P_primary_employee_flag)
477 	   OR ((tlinfo.primary_employee_flag is null)
478 	       AND (P_primary_employee_flag is null)))
479       AND ((tlinfo.global_default_flag = P_global_default_flag)
480 	   OR ((tlinfo.global_default_flag is null)
481 	       AND (P_global_default_flag is null)))
482       AND ((tlinfo.assignment_default_rule_id = P_assignment_default_rule_id)
483 	   OR ((tlinfo.assignment_default_rule_id is null)
484 	       AND (P_assignment_default_rule_id is null)))
485       AND ((tlinfo.modify_flag = P_modify_flag)
486 	   OR ((tlinfo.modify_flag is null)
487 	       AND (P_modify_flag is null)))
488   ) then
489     null;
490   else
491     fnd_message.set_name('FND', 'FORM_RECORD_CHANGED');
492     fnd_msg_pub.add ;
493     raise fnd_api.g_exc_error ;
494   end if;
495 
496 EXCEPTION
497   when app_exception.record_lock_exception then
498      --
499      rollback to LOCK_ROW ;
500      p_row_locked    := FND_API.G_FALSE ;
501      p_return_status := FND_API.G_RET_STS_ERROR;
502      FND_MSG_PUB.Count_And_Get (p_count => p_msg_count,
503 				p_data  => p_msg_data);
504      --
505   when FND_API.G_EXC_ERROR then
506      --
507      rollback to LOCK_ROW ;
508      p_return_status := FND_API.G_RET_STS_ERROR;
509      FND_MSG_PUB.Count_And_Get (p_count => p_msg_count,
510 				p_data  => p_msg_data);
511      --
512    when FND_API.G_EXC_UNEXPECTED_ERROR then
513      --
514      rollback to LOCK_ROW ;
515      p_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
516      FND_MSG_PUB.Count_And_Get (p_count => p_msg_count,
517 				p_data  => p_msg_data);
518      --
519    when OTHERS then
520      --
521      rollback to LOCK_ROW ;
522      p_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
523      if FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) then
524        FND_MSG_PUB.Add_Exc_Msg (G_PKG_NAME,
525 				l_api_name);
526      END if;
527      FND_MSG_PUB.Count_And_Get (p_count => p_msg_count,
528 				p_data  => p_msg_data);
529      --
530 END LOCK_ROW;
531 
532 
533 --
534 PROCEDURE DELETE_ROW (
535   p_api_version         in number,
536   p_init_msg_list       in varchar2 := fnd_api.g_false,
537   p_commit              in varchar2 := fnd_api.g_false,
538   p_validation_level    in number := fnd_api.g_valid_level_full,
539   p_return_status       OUT  NOCOPY varchar2,
540   p_msg_count           OUT  NOCOPY number,
541   p_msg_data            OUT  NOCOPY varchar2,
542   p_position_assignment_id in number
543 ) is
544 --
545 l_api_name    CONSTANT VARCHAR2(30) := 'Delete Row' ;
546 l_api_version CONSTANT NUMBER := 1.0 ;
547 
548 l_return_status        VARCHAR2(1);
549 --
550 BEGIN
551   --
552   SAVEPOINT DELETE_ROW ;
553   --
554   -- Initialize message list if p_init_msg_list is set to TRUE.
555   --
556   if FND_API.to_Boolean (p_init_msg_list) then
557     FND_MSG_PUB.initialize;
558   end if;
559   --
560   p_return_status := FND_API.G_RET_STS_SUCCESS ;
561 
562   --
563   delete from PSB_POSITION_ASSIGNMENTS
564   where position_assignment_id = p_position_assignment_id;
565   if (sql%notfound) THEN
566    null;
567   end if;
568 
569   -- Standard check of p_commit.
570   --
571   if FND_API.to_Boolean (p_commit) then
572     commit work;
573   end if;
574 
575   -- Standard call to get message count and if count is 1, get message info.
576 
577   FND_MSG_PUB.Count_And_Get (p_count => p_msg_count,
578 			     p_data  => p_msg_data);
579   --
580 EXCEPTION
581    when FND_API.G_EXC_ERROR then
582      --
583      rollback to DELETE_ROW;
584      p_return_status := FND_API.G_RET_STS_ERROR;
585      FND_MSG_PUB.Count_And_Get (p_count => p_msg_count,
586 				p_data  => p_msg_data);
587      --
588    when FND_API.G_EXC_UNEXPECTED_ERROR then
589      --
590      rollback to DELETE_ROW;
591      p_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
592      FND_MSG_PUB.Count_And_Get (p_count => p_msg_count,
593 				p_data  => p_msg_data);
594      --
595    when OTHERS then
596      --
597      rollback to DELETE_ROW ;
598      p_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
599      if FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) then
600        FND_MSG_PUB.Add_Exc_Msg (G_PKG_NAME,
601 				l_api_name);
602      end if;
603      FND_MSG_PUB.Count_And_Get (p_count => p_msg_count,
604 				p_data  => p_msg_data);
605      --
606 END DELETE_ROW;
607 
608 --
609 --
610 -- End of Table Handler Procedures
611 --
612 /* ----------------------------------------------------------------------- */
613 
614   -- Get Debug Information
615 
616   -- This Module is used to retrieve Debug Information for Funds Checker. It
617   -- prints Debug Information when run as a Batch Process from SQL*Plus. For
618   -- the Debug Information to be printed on the Screen, the SQL*Plus parameter
619   -- 'Serveroutput' should be set to 'ON'
620 
621   FUNCTION get_debug RETURN VARCHAR2 IS
622 
623   BEGIN
624 
625     return(g_dbug);
626 
627   END get_debug;
628 
629 /* ----------------------------------------------------------------------- */
630 
631 END PSB_POSITION_ASSIGNMENTS_PVT ;