DBA Data[Home] [Help]

PACKAGE BODY: APPS.PO_POXREQIM_XMLP_PKG

Source


1 PACKAGE BODY PO_POXREQIM_XMLP_PKG AS
2 /* $Header: POXREQIMB.pls 120.1 2007/12/25 11:42:15 krreddy noship $ */
3 
4 function AfterReport return boolean is
5 begin
6 
7 begin
8 
9 
10 
11          if P_interface_source_code is NULL
12         and P_batch_id is NULL
13         and P_delete_flag = 'Y' then
14              DELETE po_interface_errors
15               WHERE interface_type = 'REQIMPORT';
16              DELETE po_requisitions_interface
17               WHERE process_flag = 'ERROR';
18               DELETE po_req_dist_interface
19 	      WHERE process_flag='ERROR';
20 
21       elsif
22             P_interface_source_code is not NULL
23         and P_batch_id is NULL
24         and P_delete_flag = 'Y' then
25              DELETE po_interface_errors
26               WHERE interface_type = 'REQIMPORT'
27                 AND interface_transaction_id IN
28                    (SELECT transaction_id
29                       FROM po_requisitions_interface
30                      WHERE process_flag = 'ERROR'
31                       AND interface_source_code = P_interface_source_code
32                    );
33              DELETE po_requisitions_interface
34               WHERE process_flag = 'ERROR'
35                 AND interface_source_code = P_interface_source_code;
36              DELETE po_req_dist_interface
37 	      WHERE process_flag='ERROR'
38 		AND  interface_source_code = P_interface_source_code;
39         elsif
40             P_interface_source_code is NULL
41         and P_batch_id is not NULL
42         and P_delete_flag = 'Y' then
43              DELETE po_interface_errors
44               WHERE interface_type = 'REQIMPORT'
45                 AND interface_transaction_id IN
46                    (SELECT transaction_id
47                       FROM po_requisitions_interface
48                      WHERE process_flag = 'ERROR'
49                       AND batch_id = P_batch_id
50                    );
51              DELETE po_requisitions_interface
52               WHERE process_flag = 'ERROR'
53                 AND batch_id = P_batch_id ;
54              DELETE po_req_dist_interface
55               WHERE process_flag='ERROR'
56 		AND batch_id=P_batch_id;
57 
58     elsif
59             P_interface_source_code is not NULL
60         and P_batch_id is not NULL
61         and P_delete_flag = 'Y' then
62             DELETE po_interface_errors
63              WHERE interface_type = 'REQIMPORT'
64                AND interface_transaction_id IN
65                   (SELECT transaction_id
66                      FROM po_requisitions_interface
67                     WHERE process_flag = 'ERROR'
68                       AND interface_source_code = P_interface_source_code
69                       AND batch_id = P_batch_id
70                   );
71             DELETE po_requisitions_interface
72              WHERE process_flag = 'ERROR'
73                AND interface_source_code = P_interface_source_code
74                AND batch_id = P_batch_id;
75            DELETE po_req_dist_interface
76 	      WHERE process_flag='ERROR'
77 		AND interface_source_code=P_interface_source_code
78 		AND  batch_id=P_batch_id;
79 
80 
81       end if;
82 end;
83 /*SRW.USER_EXIT('FND SRWEXIT');*/null;
84 
85 return (TRUE);
86 end;
87 
88 function BeforeReport return boolean is
89 begin
90 
91 BEGIN
92   /*SRW.USER_EXIT('FND SRWINIT');*/null;
93 
94   RETURN TRUE;
95 END;  return (TRUE);
96 end;
97 
98 --Functions to refer Oracle report placeholders--
99 
100 END PO_POXREQIM_XMLP_PKG ;
101