DBA Data[Home] [Help]

PACKAGE BODY: APPS.AP_EXPENSE_REPORT_HEADERS_PKG

Source


1 PACKAGE BODY AP_EXPENSE_REPORT_HEADERS_PKG as
2 /* $Header: apixxrhb.pls 120.5.12010000.2 2009/10/07 07:10:57 sodash ship $ */
3 
4   PROCEDURE Insert_Row(X_Rowid                   IN OUT NOCOPY VARCHAR2,
5 
6                        X_Report_Header_Id               NUMBER,
7                        X_Employee_Id                    NUMBER DEFAULT NULL,
8                        X_Week_End_Date                  DATE,
9                        X_Creation_Date                  DATE,
10                        X_Created_By                     NUMBER,
11                        X_Last_Update_Date               DATE,
12                        X_Last_Updated_By                NUMBER,
13                        X_Vouchno                        NUMBER,
14                        X_Total                          NUMBER,
15                        X_Vendor_Id                      NUMBER DEFAULT NULL,
16                        X_Vendor_Site_Id                 NUMBER DEFAULT NULL,
17                        X_Expense_Check_Address_Flag     VARCHAR2 DEFAULT NULL,
18                        X_Reference_1                    NUMBER DEFAULT NULL,
19                        X_Reference_2                    VARCHAR2 DEFAULT NULL,
20                        X_Invoice_Num                    VARCHAR2 DEFAULT NULL,
21                        X_Expense_Report_Id              NUMBER DEFAULT NULL,
22                        X_Accts_Pay_Code_Combinat_Id     NUMBER DEFAULT NULL,
23                        X_Set_Of_Books_Id                NUMBER DEFAULT NULL,
24                        X_Source                         VARCHAR2 DEFAULT NULL,
25                        X_Purgeable_Flag                 VARCHAR2 DEFAULT NULL,
26                        X_Accounting_Date                DATE DEFAULT NULL,
27                        X_Employee_Ccid                  NUMBER DEFAULT NULL,
28                        X_Description                    VARCHAR2 DEFAULT NULL,
29                        X_Reject_Code                    VARCHAR2 DEFAULT NULL,
30                        X_Hold_Lookup_Code               VARCHAR2 DEFAULT NULL,
31                        X_Attribute_Category             VARCHAR2 DEFAULT NULL,
32                        X_Attribute1                     VARCHAR2 DEFAULT NULL,
33                        X_Attribute2                     VARCHAR2 DEFAULT NULL,
34                        X_Attribute3                     VARCHAR2 DEFAULT NULL,
35                        X_Attribute4                     VARCHAR2 DEFAULT NULL,
36                        X_Attribute5                     VARCHAR2 DEFAULT NULL,
37                        X_Default_Currency_Code          VARCHAR2,
38                        X_Default_Exchange_Rate_Type     VARCHAR2 DEFAULT NULL,
39                        X_Default_Exchange_Rate          NUMBER DEFAULT NULL,
40                        X_Default_Exchange_Date          DATE DEFAULT NULL,
41 		       		   X_Payment_Currency_Code          VARCHAR2,
42                        X_Payment_Cross_Rate_Type        VARCHAR2,
43                        X_Payment_Cross_Rate_Date        DATE,
44                        X_Payment_Cross_Rate             NUMBER,
45 		       		   X_Apply_Advances_Flag			VARCHAR2,
46 		       		   X_Prepay_Num						VARCHAR2,
47 		       		   X_Prepay_Dist_Num				NUMBER,
48 		       		   X_Maximum_Amount_To_Apply		NUMBER,
49 		       		   X_Prepay_Gl_Date					DATE,
50 					   X_Advance_Invoice_To_Apply		NUMBER DEFAULT NULL,
51                        X_Last_Update_Login              NUMBER DEFAULT NULL,
52                        X_Voucher_Num                    VARCHAR2 DEFAULT NULL,
53                        X_Attribute11                    VARCHAR2 DEFAULT NULL,
54                        X_Attribute12                    VARCHAR2 DEFAULT NULL,
55                        X_Attribute13                    VARCHAR2 DEFAULT NULL,
56                        X_Attribute14                    VARCHAR2 DEFAULT NULL,
57                        X_Attribute6                     VARCHAR2 DEFAULT NULL,
58                        X_Attribute7                     VARCHAR2 DEFAULT NULL,
59                        X_Attribute8                     VARCHAR2 DEFAULT NULL,
60                        X_Attribute9                     VARCHAR2 DEFAULT NULL,
61                        X_Attribute10                    VARCHAR2 DEFAULT NULL,
62                        X_Attribute15                    VARCHAR2 DEFAULT NULL,
63                        X_Doc_Category_Code              VARCHAR2 DEFAULT NULL,
64                        X_Awt_Group_Id                   NUMBER DEFAULT NULL,
65                        X_Org_Id                         NUMBER DEFAULT NULL,
66                        X_Workflow_Approved_Flag         VARCHAR2 DEFAULT NULL,
67         	       X_global_attribute_category	VARCHAR2 DEFAULT NULL,
68         	       X_global_attribute1		VARCHAR2 DEFAULT NULL,
69         	       X_global_attribute2              VARCHAR2 DEFAULT NULL,
70         	       X_global_attribute3              VARCHAR2 DEFAULT NULL,
71         	       X_global_attribute4              VARCHAR2 DEFAULT NULL,
72         	       X_global_attribute5              VARCHAR2 DEFAULT NULL,
73         	       X_global_attribute6              VARCHAR2 DEFAULT NULL,
74         	       X_global_attribute7              VARCHAR2 DEFAULT NULL,
75         	       X_global_attribute8              VARCHAR2 DEFAULT NULL,
76         	       X_global_attribute9              VARCHAR2 DEFAULT NULL,
77         	       X_global_attribute10             VARCHAR2 DEFAULT NULL,
78         	       X_global_attribute11             VARCHAR2 DEFAULT NULL,
79         	       X_global_attribute12             VARCHAR2 DEFAULT NULL,
80         	       X_global_attribute13             VARCHAR2 DEFAULT NULL,
81         	       X_global_attribute14             VARCHAR2 DEFAULT NULL,
82         	       X_global_attribute15             VARCHAR2 DEFAULT NULL,
83         	       X_global_attribute16             VARCHAR2 DEFAULT NULL,
84         	       X_global_attribute17             VARCHAR2 DEFAULT NULL,
85         	       X_global_attribute18             VARCHAR2 DEFAULT NULL,
86         	       X_global_attribute19             VARCHAR2 DEFAULT NULL,
87         	       X_global_attribute20             VARCHAR2 DEFAULT NULL,
88 		       X_calling_sequence	IN	VARCHAR2,
89 		       X_Report_Submitted_date          DATE DEFAULT NULL
90   ) IS
91     CURSOR C IS SELECT rowid FROM AP_EXPENSE_REPORT_HEADERS
92                  WHERE report_header_id = X_Report_Header_Id;
93     current_calling_sequence    VARCHAR2(2000);
94     debug_info                  VARCHAR2(100);
95 
96    BEGIN
97 --     Update the calling sequence
98 --
99        current_calling_sequence := 'AP_EXPENSE_REPORT_HEADERS_PKG.INSERT_ROW<-' ||
100                                     X_calling_sequence;
101 
102        debug_info := 'Insert into AP_EXPENSE_REPORT_HEADERS';
103        INSERT INTO AP_EXPENSE_REPORT_HEADERS(
104 
105               report_header_id,
106               employee_id,
107               week_end_date,
108               creation_date,
109               created_by,
110               last_update_date,
111               last_updated_by,
112               vouchno,
113               total,
114               vendor_id,
115               vendor_site_id,
116               expense_check_address_flag,
117               reference_1,
118               reference_2,
119               invoice_num,
120               expense_report_id,
121               accts_pay_code_combination_id,
122               set_of_books_id,
123               source,
124               purgeable_flag,
125               accounting_date,
126               employee_ccid,
127               description,
128               reject_code,
129               hold_lookup_code,
130               attribute_category,
131               attribute1,
132               attribute2,
133               attribute3,
134               attribute4,
135               attribute5,
136               default_currency_code,
137               default_exchange_rate_type,
138               default_exchange_rate,
139               default_exchange_date,
140               payment_currency_code,
141               payment_cross_rate_type,
142               payment_cross_rate_date,
143               payment_cross_rate,
144 	      	  apply_advances_default,
145 	      	  prepay_num,
146 	      	  prepay_dist_num,
147 	      	  maximum_amount_to_apply,
148 	      	  prepay_gl_date,
149 			  advance_invoice_to_apply,
150               last_update_login,
151               voucher_num,
152               attribute11,
153               attribute12,
154               attribute13,
155               attribute14,
156               attribute6,
157               attribute7,
158               attribute8,
159               attribute9,
160               attribute10,
161               attribute15,
162               doc_category_code,
163               awt_group_id,
164               workflow_approved_flag,
165               global_attribute_category,
166               global_attribute1,
167               global_attribute2,
168               global_attribute3,
169               global_attribute4,
170               global_attribute5,
171               global_attribute6,
172               global_attribute7,
173               global_attribute8,
174               global_attribute9,
175               global_attribute10,
176               global_attribute11,
177               global_attribute12,
178               global_attribute13,
179               global_attribute14,
180               global_attribute15,
181               global_attribute16,
182               global_attribute17,
183               global_attribute18,
184               global_attribute19,
185               global_attribute20,
186               org_id,
187 	      report_submitted_date
188              ) VALUES (
189 
190               X_Report_Header_Id,
191               X_Employee_Id,
192               X_Week_End_Date,
193               X_Creation_Date,
194               X_Created_By,
195               X_Last_Update_Date,
196               X_Last_Updated_By,
197               X_Vouchno,
198               X_Total,
199               X_Vendor_Id,
200               X_Vendor_Site_Id,
201               X_Expense_Check_Address_Flag,
202               X_Reference_1,
203               X_Reference_2,
204               X_Invoice_Num,
205               X_Expense_Report_Id,
206               X_Accts_Pay_Code_Combinat_Id,
207               X_Set_Of_Books_Id,
208               X_Source,
209               X_Purgeable_Flag,
210               X_Accounting_Date,
211               X_Employee_Ccid,
212               X_Description,
213               X_Reject_Code,
214               X_Hold_Lookup_Code,
215               X_Attribute_Category,
216               X_Attribute1,
217               X_Attribute2,
218               X_Attribute3,
219               X_Attribute4,
220               X_Attribute5,
221               X_Default_Currency_Code,
222               X_Default_Exchange_Rate_Type,
223               X_Default_Exchange_Rate,
224               X_Default_Exchange_Date,
225               X_Payment_Currency_Code,
226               X_Payment_Cross_Rate_Type,
227               X_Payment_Cross_Rate_Date,
228               X_Payment_Cross_Rate,
229 	      	  X_Apply_Advances_flag,
230 	          X_Prepay_Num,
231 	      	  X_Prepay_Dist_Num,
232 	      	  X_Maximum_Amount_To_Apply,
233 	      	  X_Prepay_Gl_Date,
234 			  X_Advance_Invoice_To_Apply,
235               X_Last_Update_Login,
236               X_Voucher_Num,
237               X_Attribute11,
238               X_Attribute12,
239               X_Attribute13,
240               X_Attribute14,
241               X_Attribute6,
242               X_Attribute7,
243               X_Attribute8,
244               X_Attribute9,
245               X_Attribute10,
246               X_Attribute15,
247               X_Doc_Category_Code,
248               X_Awt_Group_Id,
249               X_Workflow_Approved_Flag,
250               X_global_attribute_category,
251               X_global_attribute1,
252               X_global_attribute2,
253               X_global_attribute3,
254               X_global_attribute4,
255               X_global_attribute5,
256               X_global_attribute6,
257               X_global_attribute7,
258               X_global_attribute8,
259               X_global_attribute9,
260               X_global_attribute10,
261               X_global_attribute11,
262               X_global_attribute12,
263               X_global_attribute13,
264               X_global_attribute14,
265               X_global_attribute15,
266               X_global_attribute16,
267               X_global_attribute17,
268               X_global_attribute18,
269               X_global_attribute19,
270               X_global_attribute20,
271               X_org_id,
272 	      sysdate
273              );
274 
275     debug_info := 'Open cursor C';
276     OPEN C;
277     debug_info := 'Fetch cursor C';
278     FETCH C INTO X_Rowid;
279     if (C%NOTFOUND) then
280       debug_info := 'Close cursor C - DATA NOTFOUND';
281       CLOSE C;
282       Raise NO_DATA_FOUND;
283     end if;
284     debug_info := 'Close cursor C';
285     CLOSE C;
286 
287     EXCEPTION
288         WHEN OTHERS THEN
289            IF (SQLCODE <> -20001) THEN
290               FND_MESSAGE.SET_NAME('SQLAP','AP_DEBUG');
291               FND_MESSAGE.SET_TOKEN('ERROR',SQLERRM);
292               FND_MESSAGE.SET_TOKEN('CALLING_SEQUENCE',current_calling_sequence);
293               FND_MESSAGE.SET_TOKEN('PARAMETERS','REPORT_HEADER_ID = ' ||
294                                     X_Report_Header_Id);
295               FND_MESSAGE.SET_TOKEN('DEBUG_INFO',debug_info);
296            END IF;
297            APP_EXCEPTION.RAISE_EXCEPTION;
298 
299   END Insert_Row;
300 
301 
302   PROCEDURE Lock_Row(X_Rowid                            VARCHAR2,
303                      X_Report_Header_Id                 NUMBER,
304                      X_Employee_Id                      NUMBER DEFAULT NULL,
305                      X_Week_End_Date                    DATE,
306                      X_Vouchno                          NUMBER,
307                      X_Total                            NUMBER,
308                      X_Vendor_Id                        NUMBER DEFAULT NULL,
309                      X_Vendor_Site_Id                   NUMBER DEFAULT NULL,
310                      X_Expense_Check_Address_Flag       VARCHAR2 DEFAULT NULL,
311                      X_Reference_1                      NUMBER DEFAULT NULL,
312                      X_Reference_2                      VARCHAR2 DEFAULT NULL,
313                      X_Invoice_Num                      VARCHAR2 DEFAULT NULL,
314                      X_Expense_Report_Id                NUMBER DEFAULT NULL,
315                      X_Accts_Pay_Code_Combinat_Id    NUMBER DEFAULT NULL,
316                      X_Set_Of_Books_Id                  NUMBER DEFAULT NULL,
317                      X_Source                           VARCHAR2 DEFAULT NULL,
318                      X_Purgeable_Flag                   VARCHAR2 DEFAULT NULL,
319                      X_Accounting_Date                  DATE DEFAULT NULL,
320                      X_Employee_Ccid                    NUMBER DEFAULT NULL,
321                      X_Description                      VARCHAR2 DEFAULT NULL,
322                      X_Reject_Code                      VARCHAR2 DEFAULT NULL,
323                      X_Hold_Lookup_Code                 VARCHAR2 DEFAULT NULL,
324                      X_Attribute_Category               VARCHAR2 DEFAULT NULL,
325                      X_Attribute1                       VARCHAR2 DEFAULT NULL,
326                      X_Attribute2                       VARCHAR2 DEFAULT NULL,
327                      X_Attribute3                       VARCHAR2 DEFAULT NULL,
328                      X_Attribute4                       VARCHAR2 DEFAULT NULL,
329                      X_Attribute5                       VARCHAR2 DEFAULT NULL,
333                      X_Default_Exchange_Date            DATE DEFAULT NULL,
330                      X_Default_Currency_Code            VARCHAR2,
331                      X_Default_Exchange_Rate_Type       VARCHAR2 DEFAULT NULL,
332                      X_Default_Exchange_Rate            NUMBER DEFAULT NULL,
334                      X_Payment_Currency_Code            VARCHAR2,
335                      X_Payment_Cross_Rate_Type          VARCHAR2,
336                      X_Payment_Cross_Rate_Date          DATE,
337                      X_Payment_Cross_Rate               NUMBER,
338 		     		 X_Apply_Advances_Flag				VARCHAR2,
339 		     		 X_Prepay_Num						VARCHAR2,
340 					 X_Prepay_Dist_Num          		NUMBER,
341 					 X_Maximum_Amount_To_Apply			NUMBER,
342 					 X_Prepay_Gl_Date           		DATE,
343 					 X_Advance_Invoice_To_Apply			NUMBER DEFAULT NULL,
344                      X_Voucher_Num                      VARCHAR2 DEFAULT NULL,
345                      X_Attribute11                      VARCHAR2 DEFAULT NULL,
346                      X_Attribute12                      VARCHAR2 DEFAULT NULL,
347                      X_Attribute13                      VARCHAR2 DEFAULT NULL,
348                      X_Attribute14                      VARCHAR2 DEFAULT NULL,
349                      X_Attribute6                       VARCHAR2 DEFAULT NULL,
350                      X_Attribute7                       VARCHAR2 DEFAULT NULL,
351                      X_Attribute8                       VARCHAR2 DEFAULT NULL,
352                      X_Attribute9                       VARCHAR2 DEFAULT NULL,
353                      X_Attribute10                      VARCHAR2 DEFAULT NULL,
354                      X_Attribute15                      VARCHAR2 DEFAULT NULL,
355                      X_Doc_Category_Code                VARCHAR2 DEFAULT NULL,
356                      X_Awt_Group_Id                     NUMBER DEFAULT NULL,
357                      X_Org_Id                           NUMBER DEFAULT NULL,
358                      X_Workflow_Approved_Flag           VARCHAR2 DEFAULT NULL,
359                      X_global_attribute_category        VARCHAR2 DEFAULT NULL,
360                      X_global_attribute1                VARCHAR2 DEFAULT NULL,
361                      X_global_attribute2                VARCHAR2 DEFAULT NULL,
362                      X_global_attribute3                VARCHAR2 DEFAULT NULL,
363                      X_global_attribute4                VARCHAR2 DEFAULT NULL,
364                      X_global_attribute5                VARCHAR2 DEFAULT NULL,
365                      X_global_attribute6                VARCHAR2 DEFAULT NULL,
366                      X_global_attribute7                VARCHAR2 DEFAULT NULL,
367                      X_global_attribute8                VARCHAR2 DEFAULT NULL,
368                      X_global_attribute9                VARCHAR2 DEFAULT NULL,
369                      X_global_attribute10               VARCHAR2 DEFAULT NULL,
370                      X_global_attribute11               VARCHAR2 DEFAULT NULL,
371                      X_global_attribute12               VARCHAR2 DEFAULT NULL,
372                      X_global_attribute13               VARCHAR2 DEFAULT NULL,
373                      X_global_attribute14               VARCHAR2 DEFAULT NULL,
374                      X_global_attribute15               VARCHAR2 DEFAULT NULL,
375                      X_global_attribute16               VARCHAR2 DEFAULT NULL,
376                      X_global_attribute17               VARCHAR2 DEFAULT NULL,
377                      X_global_attribute18               VARCHAR2 DEFAULT NULL,
378                      X_global_attribute19               VARCHAR2 DEFAULT NULL,
379                      X_global_attribute20               VARCHAR2 DEFAULT NULL,
380 		     X_calling_sequence		IN	VARCHAR2
381   ) IS
382     CURSOR C IS
383         SELECT *
384         FROM   AP_EXPENSE_REPORT_HEADERS
385         WHERE  rowid = X_Rowid
386         FOR UPDATE of Report_Header_Id NOWAIT;
387     Recinfo C%ROWTYPE;
388 
389     current_calling_sequence    VARCHAR2(2000);
390     debug_info                  VARCHAR2(100);
391 
392   BEGIN
393 --  Update the calling sequence
394 --
395     current_calling_sequence := 'AP_EXPENSE_REPORT_HEADERS_PKG.LOCK_ROW<-' ||
396                                  X_calling_sequence;
397     debug_info := 'Open cursor C';
398     OPEN C;
399     debug_info := 'Fetch cursor C';
400     FETCH C INTO Recinfo;
401     if (C%NOTFOUND) then
402       debug_info := 'Close cursor C - DATA NOTFOUND';
406     end if;
403       CLOSE C;
404       FND_MESSAGE.Set_Name('FND', 'FORM_RECORD_DELETED');
405       APP_EXCEPTION.Raise_Exception;
407     debug_info := 'Close cursor C';
408     CLOSE C;
409     if (
410 
411                (Recinfo.report_header_id =  X_Report_Header_Id)
412            AND (   (Recinfo.employee_id =  X_Employee_Id)
413                 OR (    (Recinfo.employee_id IS NULL)
414                     AND (X_Employee_Id IS NULL)))
415            AND (Recinfo.week_end_date =  X_Week_End_Date)
416            AND (Recinfo.vouchno =  X_Vouchno)
420                     AND (X_Vendor_Id IS NULL)))
417            AND (Recinfo.total =  X_Total)
418            AND (   (Recinfo.vendor_id =  X_Vendor_Id)
419                 OR (    (Recinfo.vendor_id IS NULL)
421            AND (   (Recinfo.vendor_site_id =  X_Vendor_Site_Id)
422                 OR (    (Recinfo.vendor_site_id IS NULL)
423                     AND (X_Vendor_Site_Id IS NULL)))
424            AND (   (Recinfo.expense_check_address_flag = X_Expense_Check_Address_Flag)
425                 OR (    (Recinfo.expense_check_address_flag IS NULL)
426                     AND (X_Expense_Check_Address_Flag IS NULL)))
427            AND (   (Recinfo.reference_1 =  X_Reference_1)
428                 OR (    (Recinfo.reference_1 IS NULL)
429                     AND (X_Reference_1 IS NULL)))
430            AND (   (Recinfo.reference_2 =  X_Reference_2)
431                 OR (    (Recinfo.reference_2 IS NULL)
432                     AND (X_Reference_2 IS NULL)))
433            AND (   (Recinfo.invoice_num =  X_Invoice_Num)
434                 OR (    (Recinfo.invoice_num IS NULL)
435                     AND (X_Invoice_Num IS NULL)))
436            AND (   (Recinfo.expense_report_id =  X_Expense_Report_Id)
437                 OR (    (Recinfo.expense_report_id IS NULL)
438                     AND (X_Expense_Report_Id IS NULL)))
439            AND (   (Recinfo.accts_pay_code_combination_id =  X_Accts_Pay_Code_Combinat_Id)
440                 OR (    (Recinfo.accts_pay_code_combination_id IS NULL)
441                     AND (X_Accts_Pay_Code_Combinat_Id IS NULL)))
442            AND (   (Recinfo.set_of_books_id =  X_Set_Of_Books_Id)
443                 OR (    (Recinfo.set_of_books_id IS NULL)
444                     AND (X_Set_Of_Books_Id IS NULL)))
445            AND (   (Recinfo.source =  X_Source)
446                 OR (    (Recinfo.source IS NULL)
447                     AND (X_Source IS NULL)))
448            AND (   (Recinfo.purgeable_flag =  X_Purgeable_Flag)
449                 OR (    (Recinfo.purgeable_flag IS NULL)
450                     AND (X_Purgeable_Flag IS NULL)))
451            AND (   (Recinfo.accounting_date =  X_Accounting_Date)
452                 OR (    (Recinfo.accounting_date IS NULL)
453                     AND (X_Accounting_Date IS NULL)))
454            AND (   (Recinfo.employee_ccid =  X_Employee_Ccid)
455                 OR (    (Recinfo.employee_ccid IS NULL)
456                     AND (X_Employee_Ccid IS NULL)))
457            AND (   (Recinfo.description =  X_Description)
458                 OR (    (Recinfo.description IS NULL)
459                     AND (X_Description IS NULL)))
460            AND (   (Recinfo.reject_code =  X_Reject_Code)
461                 OR (    (Recinfo.reject_code IS NULL)
462                     AND (X_Reject_Code IS NULL)))
463            AND (   (Recinfo.hold_lookup_code =  X_Hold_Lookup_Code)
464                 OR (    (Recinfo.hold_lookup_code IS NULL)
465                     AND (X_Hold_Lookup_Code IS NULL)))
466            AND (   (Recinfo.attribute_category =  X_Attribute_Category)
467                 OR (    (Recinfo.attribute_category IS NULL)
468                     AND (X_Attribute_Category IS NULL)))
469            AND (   (Recinfo.attribute1 =  X_Attribute1)
470                 OR (    (Recinfo.attribute1 IS NULL)
471                     AND (X_Attribute1 IS NULL)))
472            AND (   (Recinfo.attribute2 =  X_Attribute2)
473                 OR (    (Recinfo.attribute2 IS NULL)
474                     AND (X_Attribute2 IS NULL)))
475            AND (   (Recinfo.attribute3 =  X_Attribute3)
476                 OR (    (Recinfo.attribute3 IS NULL)
477                     AND (X_Attribute3 IS NULL)))
478            AND (   (Recinfo.attribute4 =  X_Attribute4)
479                 OR (    (Recinfo.attribute4 IS NULL)
480                     AND (X_Attribute4 IS NULL)))
481            AND (   (Recinfo.attribute5 =  X_Attribute5)
482                 OR (    (Recinfo.attribute5 IS NULL)
483                     AND (X_Attribute5 IS NULL)))
484            AND (Recinfo.default_currency_code =  X_Default_Currency_Code)
485            AND (   (Recinfo.default_exchange_rate_type =  X_Default_Exchange_Rate_Type)
486                 OR (    (Recinfo.default_exchange_rate_type IS NULL)
487                     AND (X_Default_Exchange_Rate_Type IS NULL)))
488            AND (   (Recinfo.default_exchange_rate =  X_Default_Exchange_Rate)
489                 OR (    (Recinfo.default_exchange_rate IS NULL)
490                     AND (X_Default_Exchange_Rate IS NULL)))
491            AND (   (Recinfo.default_exchange_date =  X_Default_Exchange_Date)
492                 OR (    (Recinfo.default_exchange_date IS NULL)
493                     AND (X_Default_Exchange_Date IS NULL)))
494            AND (   (Recinfo.Payment_currency_code =  X_Payment_Currency_Code)
495                 OR (    (Recinfo.Payment_currency_code IS NULL)
496                     AND (X_Payment_Currency_Code IS NULL)))
497            AND (   (Recinfo.payment_cross_rate_type =  X_Payment_Cross_Rate_Type)
498                 OR (    (Recinfo.payment_cross_rate_type IS NULL)
499                     AND (X_Payment_Cross_Rate_Type IS NULL)))
500            AND (   (Recinfo.Payment_Cross_rate =  X_Payment_Cross_Rate)
501                 OR (    (Recinfo.payment_cross_rate IS NULL)
502                     AND (X_Payment_Cross_Rate IS NULL)))
503            AND (   (Recinfo.payment_cross_rate_date =  X_Payment_Cross_Rate_Date)
504                 OR (    (Recinfo.payment_cross_rate_date IS NULL)
505                     AND (X_Payment_Cross_Rate_Date IS NULL)))
506 	   AND (   (Recinfo.apply_advances_default =  X_Apply_Advances_Flag)
507                 OR (    (Recinfo.apply_advances_default IS NULL)
508                     AND (X_Apply_Advances_Flag IS NULL)))
509 	   AND (   (Recinfo.prepay_num =  X_Prepay_Num)
510                 OR (    (Recinfo.prepay_num IS NULL)
511                     AND (X_Prepay_Num IS NULL)))
512 	   AND (   (Recinfo.prepay_dist_num =  X_Prepay_Dist_Num)
513                 OR (    (Recinfo.prepay_dist_num IS NULL)
517                     AND (X_Maximum_Amount_To_Apply IS NULL)))
514                     AND (X_Prepay_Dist_Num IS NULL)))
515 	   AND (   (Recinfo.maximum_amount_to_apply =  X_Maximum_Amount_To_Apply)
516                 OR (    (Recinfo.maximum_amount_to_apply IS NULL)
518 	   AND (   (Recinfo.prepay_gl_date =  X_Prepay_Gl_Date)
522 				OR ( (Recinfo.advance_invoice_to_apply IS NULL)
519                 OR (    (Recinfo.prepay_gl_date IS NULL)
520                     AND (X_Prepay_Gl_Date IS NULL)))
521 	   AND (	(Recinfo.advance_invoice_to_apply = X_Advance_Invoice_To_Apply)
523 					AND (X_Advance_Invoice_To_Apply IS NULL)))
524            AND (   (Recinfo.voucher_num =  X_Voucher_Num)
525                 OR (    (Recinfo.voucher_num IS NULL)
526                     AND (X_Voucher_Num IS NULL)))
527            AND (   (Recinfo.attribute11 =  X_Attribute11)
528                 OR (    (Recinfo.attribute11 IS NULL)
529                     AND (X_Attribute11 IS NULL)))
530            AND (   (Recinfo.attribute12 =  X_Attribute12)
531                 OR (    (Recinfo.attribute12 IS NULL)
532                     AND (X_Attribute12 IS NULL)))
533            AND (   (Recinfo.attribute13 =  X_Attribute13)
534                 OR (    (Recinfo.attribute13 IS NULL)
535                     AND (X_Attribute13 IS NULL)))
536            AND (   (Recinfo.attribute14 =  X_Attribute14)
537                 OR (    (Recinfo.attribute14 IS NULL)
538                     AND (X_Attribute14 IS NULL)))
539            AND (   (Recinfo.attribute6 =  X_Attribute6)
540                 OR (    (Recinfo.attribute6 IS NULL)
541                     AND (X_Attribute6 IS NULL)))
542            AND (   (Recinfo.attribute7 =  X_Attribute7)
543                 OR (    (Recinfo.attribute7 IS NULL)
544                     AND (X_Attribute7 IS NULL)))
545            AND (   (Recinfo.attribute8 =  X_Attribute8)
546                 OR (    (Recinfo.attribute8 IS NULL)
547                     AND (X_Attribute8 IS NULL)))
548            AND (   (Recinfo.attribute9 =  X_Attribute9)
549                 OR (    (Recinfo.attribute9 IS NULL)
550                     AND (X_Attribute9 IS NULL)))
551            AND (   (Recinfo.attribute10 =  X_Attribute10)
552                 OR (    (Recinfo.attribute10 IS NULL)
553                     AND (X_Attribute10 IS NULL)))
554            AND (   (Recinfo.attribute15 =  X_Attribute15)
555                 OR (    (Recinfo.attribute15 IS NULL)
556                     AND (X_Attribute15 IS NULL)))
557            AND (   (Recinfo.doc_category_code =  X_Doc_Category_Code)
558                 OR (    (Recinfo.doc_category_code IS NULL)
559                     AND (X_Doc_Category_Code IS NULL)))
560            AND (   (Recinfo.awt_group_id =  X_Awt_Group_Id)
561                 OR (    (Recinfo.awt_group_id IS NULL)
562                     AND (X_Awt_Group_Id IS NULL)))
563            AND (   (Recinfo.Workflow_approved_flag =  X_Workflow_approved_flag)
564                 OR (    (Recinfo.Workflow_approved_flag IS NULL)
565                     AND (X_Workflow_approved_flag IS NULL)))
566       ) then
567       null;
568     else
569       FND_MESSAGE.Set_Name('FND', 'FORM_RECORD_CHANGED');
570       APP_EXCEPTION.Raise_Exception;
571     end if;
572 
573     if (
574                (   (Recinfo.global_attribute_category =  X_global_attribute_category)
575                 OR (    (Recinfo.global_attribute_category IS NULL)
576                     AND (X_global_attribute_category IS NULL)))
577            AND (   (Recinfo.global_attribute1 =  X_global_attribute1)
578                 OR (    (Recinfo.global_attribute1 IS NULL)
579                     AND (X_global_attribute1 IS NULL)))
580            AND (   (Recinfo.global_attribute2 =  X_global_attribute2)
581                 OR (    (Recinfo.global_attribute2 IS NULL)
582                     AND (X_global_attribute2 IS NULL)))
583            AND (   (Recinfo.global_attribute3 =  X_global_attribute3)
584                 OR (    (Recinfo.global_attribute3 IS NULL)
585                     AND (X_global_attribute3 IS NULL)))
586            AND (   (Recinfo.global_attribute4 =  X_global_attribute4)
587                 OR (    (Recinfo.global_attribute4 IS NULL)
588                     AND (X_global_attribute4 IS NULL)))
589            AND (   (Recinfo.global_attribute5 =  X_global_attribute5)
590                 OR (    (Recinfo.global_attribute5 IS NULL)
591                     AND (X_global_attribute5 IS NULL)))
592            AND (   (Recinfo.global_attribute6 =  X_global_attribute6)
593                 OR (    (Recinfo.global_attribute6 IS NULL)
594                     AND (X_global_attribute6 IS NULL)))
595            AND (   (Recinfo.global_attribute7 =  X_global_attribute7)
596                 OR (    (Recinfo.global_attribute7 IS NULL)
597                     AND (X_global_attribute7 IS NULL)))
598            AND (   (Recinfo.global_attribute8 =  X_global_attribute8)
602                 OR (    (Recinfo.global_attribute9 IS NULL)
599                 OR (    (Recinfo.global_attribute8 IS NULL)
600                     AND (X_global_attribute8 IS NULL)))
601            AND (   (Recinfo.global_attribute9 =  X_global_attribute9)
603                     AND (X_global_attribute9 IS NULL)))
604            AND (   (Recinfo.global_attribute10 =  X_global_attribute10)
605                 OR (    (Recinfo.global_attribute10 IS NULL)
606                     AND (X_global_attribute10 IS NULL)))
607            AND (   (Recinfo.global_attribute11 =  X_global_attribute11)
608                 OR (    (Recinfo.global_attribute11 IS NULL)
609                     AND (X_global_attribute11 IS NULL)))
610            AND (   (Recinfo.global_attribute12 =  X_global_attribute12)
611                 OR (    (Recinfo.global_attribute12 IS NULL)
612                     AND (X_global_attribute12 IS NULL)))
613            AND (   (Recinfo.global_attribute13 =  X_global_attribute13)
614                 OR (    (Recinfo.global_attribute13 IS NULL)
615                     AND (X_global_attribute13 IS NULL)))
616            AND (   (Recinfo.global_attribute14 =  X_global_attribute14)
617                 OR (    (Recinfo.global_attribute14 IS NULL)
618                     AND (X_global_attribute14 IS NULL)))
619            AND (   (Recinfo.global_attribute15 =  X_global_attribute15)
620                 OR (    (Recinfo.global_attribute15 IS NULL)
621                     AND (X_global_attribute15 IS NULL)))
622            AND (   (Recinfo.global_attribute16 =  X_global_attribute16)
623                 OR (    (Recinfo.global_attribute16 IS NULL)
624                     AND (X_global_attribute16 IS NULL)))
625            AND (   (Recinfo.global_attribute17 =  X_global_attribute17)
626                 OR (    (Recinfo.global_attribute17 IS NULL)
627                     AND (X_global_attribute17 IS NULL)))
628            AND (   (Recinfo.global_attribute18 =  X_global_attribute18)
629                 OR (    (Recinfo.global_attribute18 IS NULL)
630                     AND (X_global_attribute18 IS NULL)))
631            AND (   (Recinfo.global_attribute19 =  X_global_attribute19)
632                 OR (    (Recinfo.global_attribute19 IS NULL)
633                     AND (X_global_attribute19 IS NULL)))
634            AND (   (Recinfo.global_attribute20 =  X_global_attribute20)
635                 OR (    (Recinfo.global_attribute20 IS NULL)
636                     AND (X_global_attribute20 IS NULL)))
637       ) then
638       return;
639     else
640       FND_MESSAGE.Set_Name('FND', 'FORM_RECORD_CHANGED');
641       APP_EXCEPTION.Raise_Exception;
642     end if;
643 
644     EXCEPTION
645        WHEN OTHERS THEN
646          IF (SQLCODE <> -20001) THEN
647            IF (SQLCODE = -54) THEN
648              FND_MESSAGE.SET_NAME('SQLAP','AP_RESOURCE_BUSY');
649            ELSE
650              FND_MESSAGE.SET_NAME('SQLAP','AP_DEBUG');
651              FND_MESSAGE.SET_TOKEN('ERROR',SQLERRM);
652              FND_MESSAGE.SET_TOKEN('CALLING_SEQUENCE',current_calling_sequence);
653              FND_MESSAGE.SET_TOKEN('PARAMETERS','REPORT_HEADER_ID = ' ||
654                                    X_Report_Header_Id);
655              FND_MESSAGE.SET_TOKEN('DEBUG_INFO',debug_info);
656            END IF;
657 	 END IF;
658          APP_EXCEPTION.RAISE_EXCEPTION;
659 
660   END Lock_Row;
661 
662 
663 
664   PROCEDURE Update_Row(X_Rowid                          VARCHAR2,
665                        X_Report_Header_Id               NUMBER,
666                        X_Employee_Id                    NUMBER DEFAULT NULL,
667                        X_Week_End_Date                  DATE,
668                        X_Last_Update_Date               DATE,
669                        X_Last_Updated_By                NUMBER,
670                        X_Vouchno                        NUMBER,
671                        X_Total                          NUMBER,
672                        X_Vendor_Id                      NUMBER DEFAULT NULL,
673                        X_Vendor_Site_Id                 NUMBER DEFAULT NULL,
674                        X_Expense_Check_Address_Flag     VARCHAR2 DEFAULT NULL,
675                        X_Reference_1                    NUMBER DEFAULT NULL,
676                        X_Reference_2                    VARCHAR2 DEFAULT NULL,
677                        X_Invoice_Num                    VARCHAR2 DEFAULT NULL,
678                        X_Expense_Report_Id              NUMBER DEFAULT NULL,
679                        X_Accts_Pay_Code_Combinat_Id  NUMBER DEFAULT NULL,
680                        X_Set_Of_Books_Id                NUMBER DEFAULT NULL,
681                        X_Source                         VARCHAR2 DEFAULT NULL,
682                        X_Purgeable_Flag                 VARCHAR2 DEFAULT NULL,
683                        X_Accounting_Date                DATE DEFAULT NULL,
684                        X_Employee_Ccid                  NUMBER DEFAULT NULL,
685                        X_Description                    VARCHAR2 DEFAULT NULL,
686                        X_Reject_Code                    VARCHAR2 DEFAULT NULL,
687                        X_Hold_Lookup_Code               VARCHAR2 DEFAULT NULL,
688                        X_Attribute_Category             VARCHAR2 DEFAULT NULL,
689                        X_Attribute1                     VARCHAR2 DEFAULT NULL,
690                        X_Attribute2                     VARCHAR2 DEFAULT NULL,
691                        X_Attribute3                     VARCHAR2 DEFAULT NULL,
692                        X_Attribute4                     VARCHAR2 DEFAULT NULL,
693                        X_Attribute5                     VARCHAR2 DEFAULT NULL,
694                        X_Default_Currency_Code          VARCHAR2,
695                        X_Default_Exchange_Rate_Type     VARCHAR2 DEFAULT NULL,
696                        X_Default_Exchange_Rate          NUMBER DEFAULT NULL,
697                        X_Default_Exchange_Date          DATE DEFAULT NULL,
701                        X_Payment_Cross_Rate             NUMBER,
698                        X_Payment_Currency_Code         VARCHAR2,
699                        X_Payment_Cross_Rate_Type        VARCHAR2,
700                        X_Payment_Cross_Rate_Date        DATE,
702 		       		   X_Apply_Advances_Flag			VARCHAR2,
703 		       		   X_Prepay_Num						VARCHAR2,
704 		       		   X_Prepay_Dist_Num				NUMBER,
705 		       		   X_Maximum_Amount_To_Apply		NUMBER,
706 		       		   X_Prepay_Gl_Date					DATE,
707 					   X_Advance_Invoice_To_Apply		NUMBER DEFAULT NULL,
708                        X_Last_Update_Login              NUMBER DEFAULT NULL,
709                        X_Voucher_Num                    VARCHAR2 DEFAULT NULL,
710                        X_Attribute11                    VARCHAR2 DEFAULT NULL,
711                        X_Attribute12                    VARCHAR2 DEFAULT NULL,
712                        X_Attribute13                    VARCHAR2 DEFAULT NULL,
713                        X_Attribute14                    VARCHAR2 DEFAULT NULL,
714                        X_Attribute6                     VARCHAR2 DEFAULT NULL,
715                        X_Attribute7                     VARCHAR2 DEFAULT NULL,
716                        X_Attribute8                     VARCHAR2 DEFAULT NULL,
717                        X_Attribute9                     VARCHAR2 DEFAULT NULL,
718                        X_Attribute10                    VARCHAR2 DEFAULT NULL,
719                        X_Attribute15                    VARCHAR2 DEFAULT NULL,
720                        X_Doc_Category_Code              VARCHAR2 DEFAULT NULL,
721                        X_Awt_Group_Id                   NUMBER DEFAULT NULL,
722                        X_Org_Id                         NUMBER DEFAULT NULL,
723                        X_Workflow_Approved_Flag         VARCHAR2 DEFAULT NULL,
724                        X_global_attribute_category      VARCHAR2 DEFAULT NULL,
725                        X_global_attribute1              VARCHAR2 DEFAULT NULL,
726                        X_global_attribute2              VARCHAR2 DEFAULT NULL,
727                        X_global_attribute3              VARCHAR2 DEFAULT NULL,
728                        X_global_attribute4              VARCHAR2 DEFAULT NULL,
729                        X_global_attribute5              VARCHAR2 DEFAULT NULL,
730                        X_global_attribute6              VARCHAR2 DEFAULT NULL,
731                        X_global_attribute7              VARCHAR2 DEFAULT NULL,
732                        X_global_attribute8              VARCHAR2 DEFAULT NULL,
733                        X_global_attribute9              VARCHAR2 DEFAULT NULL,
734                        X_global_attribute10             VARCHAR2 DEFAULT NULL,
735                        X_global_attribute11             VARCHAR2 DEFAULT NULL,
736                        X_global_attribute12             VARCHAR2 DEFAULT NULL,
737                        X_global_attribute13             VARCHAR2 DEFAULT NULL,
738                        X_global_attribute14             VARCHAR2 DEFAULT NULL,
739                        X_global_attribute15             VARCHAR2 DEFAULT NULL,
740                        X_global_attribute16             VARCHAR2 DEFAULT NULL,
741                        X_global_attribute17             VARCHAR2 DEFAULT NULL,
742                        X_global_attribute18             VARCHAR2 DEFAULT NULL,
746 
743                        X_global_attribute19             VARCHAR2 DEFAULT NULL,
744                        X_global_attribute20             VARCHAR2 DEFAULT NULL,
745 		       X_calling_sequence	IN	VARCHAR2
747   ) IS
748     current_calling_sequence    VARCHAR2(2000);
749     debug_info                  VARCHAR2(100);
750   BEGIN
751 --  Update the calling sequence
752 --
753     current_calling_sequence := 'AP_EXPENSE_REPORT_HEADERS_PKG.UPDATE_ROW<-' ||
754                                  X_calling_sequence;
755     debug_info := 'Update AP_EXPENSE_REPORT_HEADERS';
756     UPDATE AP_EXPENSE_REPORT_HEADERS
757     SET
758        report_header_id                =     X_Report_Header_Id,
759        employee_id                     =     X_Employee_Id,
760        week_end_date                   =     X_Week_End_Date,
761        last_update_date                =     X_Last_Update_Date,
762        last_updated_by                 =     X_Last_Updated_By,
763        vouchno                         =     X_Vouchno,
764        total                           =     X_Total,
765        vendor_id                       =     X_Vendor_Id,
766        vendor_site_id                  =     X_Vendor_Site_Id,
767        expense_check_address_flag      =     X_Expense_Check_Address_Flag,
768        reference_1                     =     X_Reference_1,
769        reference_2                     =     X_Reference_2,
770        invoice_num                     =     X_Invoice_Num,
771        expense_report_id               =     X_Expense_Report_Id,
772        accts_pay_code_combination_id   =     X_Accts_Pay_Code_Combinat_Id,
776        accounting_date                 =     X_Accounting_Date,
773        set_of_books_id                 =     X_Set_Of_Books_Id,
774        source                          =     X_Source,
775        purgeable_flag                  =     X_Purgeable_Flag,
777        employee_ccid                   =     X_Employee_Ccid,
778        description                     =     X_Description,
779        reject_code                     =     X_Reject_Code,
780        hold_lookup_code                =     X_Hold_Lookup_Code,
781        attribute_category              =     X_Attribute_Category,
782        attribute1                      =     X_Attribute1,
783        attribute2                      =     X_Attribute2,
784        attribute3                      =     X_Attribute3,
785        attribute4                      =     X_Attribute4,
786        attribute5                      =     X_Attribute5,
787        default_currency_code           =     X_Default_Currency_Code,
788        default_exchange_rate_type      =     X_Default_Exchange_Rate_Type,
789        default_exchange_rate           =     X_Default_Exchange_Rate,
790        default_exchange_date           =     X_Default_Exchange_Date,
791        payment_currency_code           =     X_Payment_Currency_Code,
792        payment_cross_rate_type         =     X_Payment_Cross_Rate_Type,
793        payment_cross_rate_date         =     X_Payment_Cross_Rate_Date,
794        payment_cross_rate              =     X_Payment_Cross_Rate,
795    	   apply_advances_default	       =     X_Apply_Advances_Flag,
796        prepay_num		       		   =     X_Prepay_Num,
797        prepay_dist_num		       	   =     X_Prepay_Dist_Num,
798        maximum_amount_to_apply	       =     X_Maximum_Amount_To_Apply,
799        prepay_gl_date		       	   =     X_Prepay_Gl_Date,
800 	   advance_invoice_to_apply 	   = 	 X_Advance_Invoice_To_Apply,
801        last_update_login               =     X_Last_Update_Login,
802        voucher_num                     =     X_Voucher_Num,
803        attribute11                     =     X_Attribute11,
804        attribute12                     =     X_Attribute12,
805        attribute13                     =     X_Attribute13,
806        attribute14                     =     X_Attribute14,
807        attribute6                      =     X_Attribute6,
808        attribute7                      =     X_Attribute7,
809        attribute8                      =     X_Attribute8,
810        attribute9                      =     X_Attribute9,
811        attribute10                     =     X_Attribute10,
812        attribute15                     =     X_Attribute15,
813        doc_category_code               =     X_Doc_Category_Code,
814        awt_group_id                    =     X_Awt_Group_Id,
815        workflow_approved_flag          =     X_Workflow_Approved_Flag,
816        global_attribute_category       =     X_global_attribute_category,
817        global_attribute1               =     X_global_attribute1,
818        global_attribute2               =     X_global_attribute2,
819        global_attribute3               =     X_global_attribute3,
820        global_attribute4               =     X_global_attribute4,
821        global_attribute5               =     X_global_attribute5,
822        global_attribute6               =     X_global_attribute6,
823        global_attribute7               =     X_global_attribute7,
824        global_attribute8               =     X_global_attribute8,
825        global_attribute9               =     X_global_attribute9,
826        global_attribute10              =     X_global_attribute10,
827        global_attribute11              =     X_global_attribute11,
828        global_attribute12              =     X_global_attribute12,
829        global_attribute13              =     X_global_attribute13,
830        global_attribute14              =     X_global_attribute14,
831        global_attribute15              =     X_global_attribute15,
832        global_attribute16              =     X_global_attribute16,
833        global_attribute17              =     X_global_attribute17,
834        global_attribute18              =     X_global_attribute18,
835        global_attribute19              =     X_global_attribute19,
836        global_attribute20              =     X_global_attribute20
837     WHERE rowid = X_Rowid;
838 
839     if (SQL%NOTFOUND) then
840       Raise NO_DATA_FOUND;
841     end if;
842 
843     EXCEPTION
844         WHEN OTHERS THEN
845            IF (SQLCODE <> -20001) THEN
846               FND_MESSAGE.SET_NAME('SQLAP','AP_DEBUG');
847               FND_MESSAGE.SET_TOKEN('ERROR',SQLERRM);
848               FND_MESSAGE.SET_TOKEN('CALLING_SEQUENCE',current_calling_sequence);
849               FND_MESSAGE.SET_TOKEN('PARAMETERS','REPORT_HEADER_ID = ' ||
850                                     X_Report_Header_Id);
851               FND_MESSAGE.SET_TOKEN('DEBUG_INFO',debug_info);
852            END IF;
853            APP_EXCEPTION.RAISE_EXCEPTION;
854 
855   END Update_Row;
856 
857   PROCEDURE Delete_Row(X_Rowid 				VARCHAR2,
858 		       X_calling_sequence	IN	VARCHAR2
859   ) IS
860     current_calling_sequence    VARCHAR2(2000);
861     debug_info                  VARCHAR2(100);
862   BEGIN
863 --  Update the calling sequence
864 --
868     DELETE FROM AP_EXPENSE_REPORT_HEADERS
865     current_calling_sequence := 'AP_EXPENSE_REPORT_HEADERS_PKG.DELETE_ROW<-' ||
866                                  X_calling_sequence;
867     debug_info := 'Delete from AP_EXPENSE_REPORT_HEADERS';
869     WHERE rowid = X_Rowid;
870 
871     if (SQL%NOTFOUND) then
872       Raise NO_DATA_FOUND;
873     end if;
874 
875     EXCEPTION
876         WHEN OTHERS THEN
877            IF (SQLCODE <> -20001) THEN
878               FND_MESSAGE.SET_NAME('SQLAP','AP_DEBUG');
879               FND_MESSAGE.SET_TOKEN('ERROR',SQLERRM);
880               FND_MESSAGE.SET_TOKEN('CALLING_SEQUENCE',current_calling_sequence);
881               FND_MESSAGE.SET_TOKEN('PARAMETERS','ROWID = ' || X_Rowid);
882               FND_MESSAGE.SET_TOKEN('DEBUG_INFO',debug_info);
883            END IF;
884            APP_EXCEPTION.RAISE_EXCEPTION;
885 
886   END Delete_Row;
887 
888 
889 END AP_EXPENSE_REPORT_HEADERS_PKG;