DBA Data[Home] [Help]

PACKAGE BODY: APPS.JAI_FBT_PAYMENT_P

Source


1 PACKAGE BODY JAI_FBT_PAYMENT_P AS
2 --$Header: jainfbtpay.plb 120.0.12010000.1 2008/11/27 07:10:32 huhuliu noship $
3 --+=======================================================================+
4 --|               Copyright (c) 1998 Oracle Corporation                   |
5 --|                       Redwood Shores, CA, USA                         |
6 --|                         All rights reserved.                          |
7 --+=======================================================================+
8 --| FILENAME                                                              |
9 --|     jainfbtpay.plb                                                     |
10 --|                                                                       |
11 --| DESCRIPTION                                                           |
12 --|     To be called by the concurrent program for inserting the          |
13 --|      data into jai_fbt_payment table and  ap interface tables         |
14 --|                                                                       |
15 --| PROCEDURE LIST                                                        |
16 --|      PROCEDURE Insert_Fbt_Payment                                     |
17 --|      PROCEDURE Insert_Interface_Table                                 |
18 --|      PROCEDURE Fbt_Payment                                            |
19 --|                                                                       |
20 --| HISTORY                                                               |
21 --|     2008/10/21 Eric Ma       Created                                  |
22 --+======================================================================*/
23 
24 --==========================================================================
25 --  PROCEDURE NAME:
26 --
27 --    Insert_Fbt_Payment                        Private
28 --
29 --  DESCRIPTION:
30 --
31 --    This procedure is to insert the data into jai_fbt_payment
32 --
33 --  PARAMETERS:
34 --      In:  p_fbt_payment jai_fbt_repository record type
35 --
36 --  DESIGN REFERENCES:
37 --    FBT Technical Design Document 1.1.doc
38 --
39 --  CHANGE HISTORY:
40 --
41 --           18-OCT-2007   Eric Ma  created
42 
43 PROCEDURE Insert_Fbt_Payment
44 ( p_fbt_payment IN jai_fbt_payment%ROWTYPE
45 )
46 IS
47 lv_procedure_name VARCHAR2(40):='Insert_Fbt_Payment';
48 ln_dbg_level      NUMBER:=FND_LOG.G_CURRENT_RUNTIME_LEVEL;
49 ln_proc_level     NUMBER:=FND_LOG.LEVEL_PROCEDURE;
50 
51 BEGIN
52   --logging for debug
53   IF (ln_proc_level >= ln_dbg_level)
54   THEN
55     FND_LOG.STRING( ln_proc_level
56                   , GV_MODULE_PREFIX ||'.' || lv_procedure_name || '.begin'
57                   , 'Enter procedure'
58                   );
59   END IF; --l_proc_level>=l_dbg_level
60 
61   -- insert into jai_fbt_payment
62   INSERT INTO jai_fbt_payment
63               ( fbt_payment_id
64               , legal_entity_id
65               , fbt_year
66               , status_date
67               , invoice_reference
68               , invoice_date
69               , inv_supplier_id
70               , inv_supplier_site_id
71               , inv_ou_id
72               , creation_date
73               , created_by
74               , last_update_date
75               , last_updated_by
76               , last_update_login
77               , deposit_date
78               , bank_name
79               , branch_name
80               , it_challan
81               , bsr_code
82               , fbt_tax_amount
83               , fbt_surcharge_amount
84               , fbt_edu_cess_amount
85               , fbt_sh_cess_amount
86               )
87 
88   VALUES      ( p_fbt_payment.fbt_payment_id
89               , p_fbt_payment.legal_entity_id
90               , p_fbt_payment.fbt_year
91               , p_fbt_payment.status_date
92               , p_fbt_payment.invoice_reference
93               , p_fbt_payment.invoice_date
94               , p_fbt_payment.inv_supplier_id
95               , p_fbt_payment.inv_supplier_site_id
96               , p_fbt_payment.inv_ou_id
97               , p_fbt_payment.creation_date
98               , p_fbt_payment.created_by
99               , p_fbt_payment.last_update_date
100               , p_fbt_payment.last_updated_by
101               , p_fbt_payment.last_update_login
102               , p_fbt_payment.deposit_date
103               , p_fbt_payment.bank_name
104               , p_fbt_payment.branch_name
105               , p_fbt_payment.it_challan
106               , p_fbt_payment.bsr_code
107               , p_fbt_payment.fbt_tax_amount
108               , p_fbt_payment.fbt_surcharge_amount
109               , p_fbt_payment.fbt_edu_cess_amount
110               , p_fbt_payment.fbt_sh_cess_amount
111               );
112 
113   --logging for debug
114   IF (ln_proc_level >= ln_dbg_level)
115   THEN
116     FND_LOG.STRING( ln_proc_level
117                   , GV_MODULE_PREFIX ||'.' || lv_procedure_name || '.end'
118                   , 'Exit procedure'
119                   );
120   END IF; -- (ln_proc_level>=ln_dbg_level)
121 
122 EXCEPTION
123   WHEN OTHERS THEN
124     IF(FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL)
125     THEN
126       FND_LOG.STRING( FND_LOG.LEVEL_UNEXPECTED
127                     , GV_MODULE_PREFIX ||'.' || lv_procedure_name || '.Other_Exception '
128                     , Sqlcode||Sqlerrm);
129     END IF; -- (FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL)
130 END Insert_Fbt_Payment;
131 
132 --==========================================================================
133 --  PROCEDURE NAME:
134 --
135 --    Insert_Interface_Table                        Private
136 --
137 --  DESCRIPTION:
138 --
139 --    This procedure is to ap_invoices_interface,
140 --    ap_invoice_lines_interface tables
141 --
142 --  PARAMETERS:
143 --      In:  p_inv_interface       inv_interface_rec_type record type
144 --           p_inv_lines_interface inv_lines_interface_rec_type record type
145 --
146 --  DESIGN REFERENCES:
147 --    FBT Technical Design Document 1.1.doc
148 --
149 --  CHANGE HISTORY:
150 --
151 --           18-OCT-2007   Eric Ma  created
152 
153 PROCEDURE Insert_Interface_Table
154 ( p_inv_interface       IN inv_interface_rec_type
155 , p_inv_lines_interface IN inv_lines_interface_rec_type
156 )
157 IS
158 lv_procedure_name VARCHAR2(40):='Insert_Interface_Table';
159 ln_dbg_level      NUMBER:=FND_LOG.G_CURRENT_RUNTIME_LEVEL;
160 ln_proc_level     NUMBER:=FND_LOG.LEVEL_PROCEDURE;
161 
162 BEGIN
163   --logging for debug
164   IF (ln_proc_level >= ln_dbg_level)
165   THEN
166     FND_LOG.STRING( ln_proc_level
167                   , GV_MODULE_PREFIX ||'.' || lv_procedure_name || '.begin'
168                   , 'Enter procedure'
169                   );
170   END IF; --l_proc_level>=l_dbg_level
171 
172   -- insert into ap_invoices_interface
173   INSERT INTO ap_invoices_interface
174               ( invoice_id
175               , invoice_num
176               , invoice_date
177               , vendor_id
178               , vendor_site_id
179               , invoice_amount
180               , invoice_currency_code
181               , accts_pay_code_combination_id
182               , source
183               , org_id
184               , legal_entity_id
185               , payment_method_lookup_code
186               , created_by
187               , creation_date
188               , last_updated_by
189               , last_update_date
190               , last_update_login
191               )
192   VALUES      ( p_inv_interface.invoice_id
193               , p_inv_interface.invoice_num
194               , p_inv_interface.invoice_date
195               , p_inv_interface.vendor_id
196               , p_inv_interface.vendor_site_id
197               , p_inv_interface.invoice_amount
198               , p_inv_interface.invoice_currency_code
199               , p_inv_interface.accts_pay_ccid
200               , p_inv_interface.source
201               , p_inv_interface.org_id
202               , p_inv_interface.legal_entity_id
203               , p_inv_interface.payment_method_lookup_code
204               , p_inv_interface.created_by
205               , p_inv_interface.creation_date
206               , p_inv_interface.last_updated_by
207               , p_inv_interface.last_update_date
208               , p_inv_interface.last_update_login
209               );
210 
211   -- insert into ap_invoice_lines_interface
212   INSERT INTO ap_invoice_lines_interface
213               ( invoice_id
214               , invoice_line_id
215               , line_number
216               , line_type_lookup_code
217               , amount
218               , accounting_date
219               , description
220               , dist_code_combination_id
221               , org_id
222               , created_by
223               , creation_date
224               , last_updated_by
225               , last_update_date
226               , last_update_login
227               )
228   VALUES      ( p_inv_lines_interface.invoice_id
229               , p_inv_lines_interface.invoice_line_id
230               , p_inv_lines_interface.line_number
231               , p_inv_lines_interface.line_type_lookup_code
232               , p_inv_lines_interface.amount
233               , p_inv_lines_interface.accounting_date
234               , p_inv_lines_interface.description
235               , p_inv_lines_interface.dist_code_combination_id
236               , p_inv_lines_interface.org_id
237               , p_inv_lines_interface.created_by
238               , p_inv_lines_interface.creation_date
239               , p_inv_lines_interface.last_updated_by
240               , p_inv_lines_interface.last_update_date
241               , p_inv_lines_interface.last_update_login
242               );
243   --logging for debug
244   IF (ln_proc_level >= ln_dbg_level)
245   THEN
246     FND_LOG.STRING( ln_proc_level
247                   , GV_MODULE_PREFIX ||'.' || lv_procedure_name || '.end'
248                   , 'Exit procedure'
249                   );
250   END IF; -- (ln_proc_level>=ln_dbg_level)
251 
252 EXCEPTION
253   WHEN OTHERS THEN
254     IF(FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL)
255     THEN
256       FND_LOG.STRING( FND_LOG.LEVEL_UNEXPECTED
257                     , GV_MODULE_PREFIX ||'.' || lv_procedure_name || '.Other_Exception '
258                     , Sqlcode||Sqlerrm);
259     END IF; -- (FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL)
260 END Insert_Interface_Table;
261 
262 --==========================================================================
263 --  PROCEDURE NAME:
264 --
265 --    Fbt_Payment                        Public
266 --
267 --  DESCRIPTION:
268 --
269 --    This is the main procedure which will be called by the concurrent
270 --    program  for inserting the data into jai_fbt_payment table and
271 --    ap interface tables
272 --
273 --  PARAMETERS:
274 --     In:   pn_legal_entity_id        Identifier of legal entity
275 --           pn_fbt_year               Fbt year
276 --           pn_fbt_amount             Total fbt tax amount
277 --           pn_supplier_id            Identifier of supplier
278 --           pn_supplier_site_id       Identifier of supplier site
279 --           pn_ou_id                  Identifier of Operating unit
280 --           pn_fbt_tax_amount         The amount of fbt tax
281 --           pn_fbt_surcharge_amount   The amount of surcharge tax
282 --           pn_fbt_edu_cess_amount    The amount of edu cess tax
283 --           pn_fbt_sh_cess_amount     The amount of sh cess tax
284 --
285 --      Out: pv_errbuf           Returns the error if concurrent program
286 --                               does not execute completely
287 --           pv_retcode          Returns success or failure
288 --
289 --  DESIGN REFERENCES:
290 --    FBT Technical Design Document 1.1.doc
291 --
292 --  CHANGE HISTORY:
293 --
294 --           21-OCT-2008   Eric Ma  created
295 
296 PROCEDURE Fbt_Payment
297 ( pv_errbuf                OUT NOCOPY VARCHAR2
298 , pv_retcode               OUT NOCOPY VARCHAR2
299 , pn_legal_entity_id       IN  jai_fbt_payment.legal_entity_id%TYPE
300 , pn_fbt_year              IN  jai_fbt_payment.fbt_year%TYPE
301 , pn_fbt_amount            IN  NUMBER
302 , pn_supplier_id           IN  jai_fbt_payment.inv_supplier_id%TYPE
303 , pn_supplier_site_id      IN  jai_fbt_payment.inv_supplier_site_id%TYPE
304 , pn_ou_id                 IN  jai_fbt_payment.inv_ou_id%TYPE
305 , pn_fbt_tax_amount        IN  jai_fbt_payment.fbt_tax_amount%TYPE
306 , pn_fbt_surcharge_amount  IN  jai_fbt_payment.fbt_surcharge_amount%TYPE
307 , pn_fbt_edu_cess_amount   IN  jai_fbt_payment.fbt_edu_cess_amount%TYPE
308 , pn_fbt_sh_cess_amount    IN  jai_fbt_payment.fbt_sh_cess_amount%TYPE
309 , pv_status_date           IN  VARCHAR2
310 )
311 IS
312 --ln_org_id               NUMBER;
313 ln_invoice_amout        NUMBER;
314 fbt_payment_rec         jai_fbt_payment%ROWTYPE;
315 ln_invoice_id           ap_invoices_interface.invoice_id%TYPE;
316 ln_invoice_num          ap_invoices_interface.invoice_num%TYPE;
317 lv_currency_code        ap_invoices_interface.invoice_currency_code%TYPE;
318 ln_accts_pay_ccid       ap_invoices_interface.accts_pay_code_combination_id%TYPE;
319 lv_payment_method_code  ap_invoices_interface.payment_method_lookup_code%TYPE;
320 ln_invoice_line_id      ap_invoice_lines_interface.invoice_line_id%TYPE;
321 inv_interface_rec       inv_interface_rec_type;
322 inv_lines_interface_rec inv_lines_interface_rec_type;
323 ln_user_id              NUMBER := fnd_global.user_id;
324 ln_login_id             NUMBER := fnd_global.login_id;
325 ln_precision            NUMBER;
326 lv_date_mask            VARCHAR2(11) :='YYYY-MON-DD';
327 pn_invoice_number_seq   NUMBER;
328 ld_invoice_date         DATE :=SYSDATE;
329 ld_status_date          DATE :=TRUNC(FND_DATE.DISPLAYDT_TO_DATE(pv_status_date));
330 ln_fbt_payment_id       NUMBER;
331 
332 lv_procedure_name       VARCHAR2(40):='Fbt_Payment';
333 ln_dbg_level            NUMBER:=FND_LOG.G_CURRENT_RUNTIME_LEVEL;
334 ln_proc_level           NUMBER:=FND_LOG.LEVEL_PROCEDURE;
335 
336 CURSOR po_vendors_cur IS
337 SELECT
338 --  pvsa.org_id,
339   pvsa.accts_pay_code_combination_id
340 , pvsa.payment_method_lookup_code
341 FROM po_vendor_sites_all pvsa
342 WHERE pvsa.vendor_site_id = pn_supplier_site_id;
343 
344 
345 
346 CURSOR currency_code_cur IS
347 SELECT
348   gsob.currency_code
349 FROM
350   gl_sets_of_books   gsob
351 , xle_fp_ou_ledger_v xfolv
352 WHERE gsob.set_of_books_id = xfolv.ledger_id
353   AND xfolv.legal_entity_id = pn_legal_entity_id;
354 
355 
356 --modified by eric for R12.1  21-Oct-2008,begin
357 -----------------------------------------------------------------------------------
358 /*
359 CURSOR currency_code_cur
360 IS
361 SELECT
362   gsob.currency_code
363 FROM
364   gl_sets_of_books   gsob
365 WHERE gsob.set_of_books_id IN
366       ( SELECT
367           org_information3 --set of book id
368         FROM
369           hr_organization_information b
370         WHERE b.org_information2 = pn_legal_entity_id --LEGAL ENTITY ID
371           AND b.ORG_INFORMATION_CONTEXT='Operating Unit Information'
372        );
373 */
374 -----------------------------------------------------------------------------------
375 --modified by eric for R12.1  21-Oct-2008,end
376 
377 ln_fbt_acct_ccid ap_invoice_lines_interface.dist_code_combination_id%TYPE;
378 
379 CURSOR get_fbt_account_ccid_cur
380 IS
381 SELECT fbt_account_ccid
382   FROM JAI_FBT_SETUP_HEADERS
383  WHERE legal_entity_id = pn_legal_entity_id
384    and fbt_year        = pn_fbt_year;
385 
386 BEGIN
387   --logging for debug
388   IF (ln_proc_level >= ln_dbg_level)
389   THEN
390     FND_LOG.STRING( ln_proc_level
391                   , GV_MODULE_PREFIX ||'.' || lv_procedure_name || '.begin'
392                   , 'Enter procedure'
393                   );
394   END IF; --l_proc_level>=l_dbg_level
395 
396   -- get the precision
397   SELECT
398     NVL(fc.precision, 2)
399   INTO
400     ln_precision
401   FROM
402     gl_sets_of_books gsob
403   , fnd_currencies   fc
404   WHERE gsob.set_of_books_id = fnd_profile.VALUE('GL_SET_OF_BKS_ID')
405     AND gsob.currency_code = fc.currency_code;
406 
407   -- get invoice_id for ap_invoices_interface,ap_invoice_lines_interface
408   -- and JAI_FBT_PAYMENT
409   SELECT
410     ap_invoices_interface_s.nextval
411   INTO
412     ln_invoice_id
413   FROM dual;
414 
415   -- get the payment id
416   SELECT jai_fbt_payment_s.NEXTVAL
417   INTO ln_fbt_payment_id
418   FROM dual;
419 
420   -- get the org id, accts_pay_code_combination_id, payment_method_lookup_code
421   OPEN po_vendors_cur;
422   FETCH po_vendors_cur
423   INTO
424   --  ln_org_id,
425   ln_accts_pay_ccid
426   , lv_payment_method_code;
427   CLOSE po_vendors_cur;
428 
429   --add lock on the jai_fbt_payment table
430   UPDATE
431     jai_fbt_payment
432   SET
433     invoice_date = invoice_date
434   WHERE TRUNC(invoice_date)  = TRUNC(invoice_date)
435     AND legal_entity_id      = pn_legal_entity_id;
436 
437   -- get the sequence number for invoice number
438   SELECT
439     COUNT(fbt_payment_id)+1
440   INTO
441     pn_invoice_number_seq
442   FROM
443     jai_fbt_payment
444   WHERE TRUNC(invoice_date) = TRUNC(ld_invoice_date)
445     AND legal_entity_id     = pn_legal_entity_id;
446 
447   SELECT 'FBT/Invoice/'||pn_legal_entity_id||'/'|| TO_CHAR(ld_invoice_date,lv_date_mask)||'/'|| pn_invoice_number_seq
448   INTO ln_invoice_num
449   FROM dual;
450 
451   -- insert the data into the table jai_fbt_payment
452   fbt_payment_rec.fbt_payment_id       := ln_fbt_payment_id;
453   fbt_payment_rec.legal_entity_id      := pn_legal_entity_id;
454   fbt_payment_rec.fbt_year             := pn_fbt_year;
455   fbt_payment_rec.status_date          := ld_status_date;
456 
457   fbt_payment_rec.invoice_reference    := ln_invoice_num;
458   fbt_payment_rec.invoice_date         := ld_invoice_date;
459   fbt_payment_rec.inv_supplier_id      := pn_supplier_id;
460   fbt_payment_rec.inv_supplier_site_id := pn_supplier_site_id;
461   fbt_payment_rec.inv_ou_id            := pn_ou_id;
462 
463   fbt_payment_rec.FBT_TAX_AMOUNT       := pn_fbt_tax_amount       ;
464   fbt_payment_rec.FBT_SURCHARGE_AMOUNT := pn_fbt_surcharge_amount ;
465   fbt_payment_rec.FBT_EDU_CESS_AMOUNT  := pn_fbt_edu_cess_amount  ;
466   fbt_payment_rec.FBT_SH_CESS_AMOUNT   := pn_fbt_sh_cess_amount   ;
467 
468   --leave the below 5 fileds blank in the insert action
469   --fbt_payment_rec.it_challan           := NULL;
470   --fbt_payment_rec.bank_name            := NULL;
471   --fbt_payment_rec.branch_name          := NULL;
472   --fbt_payment_rec.deposit_date         := '';
473   --fbt_payment_rec.bsr_code             := NULL;
474   ------------------------------------------------------------------
475 
476   fbt_payment_rec.creation_date        := SYSDATE;
477   fbt_payment_rec.created_by           := ln_user_id;
478   fbt_payment_rec.last_update_date     := SYSDATE;
479   fbt_payment_rec.last_updated_by      := ln_user_id;
480   fbt_payment_rec.last_update_login    := ln_login_id;
481 
482   Insert_Fbt_Payment(fbt_payment_rec);
483 
484   -- get currency code
485    OPEN currency_code_cur;
486   FETCH currency_code_cur
487    INTO lv_currency_code;
488   CLOSE currency_code_cur;
489 
490   ln_invoice_amout := ROUND(pn_fbt_amount, ln_precision);
491 
492   inv_interface_rec.invoice_id                 := ln_invoice_id;
493   inv_interface_rec.invoice_num                := ln_invoice_num;
494   inv_interface_rec.invoice_date               := ld_invoice_date;
495   inv_interface_rec.vendor_id                  := pn_supplier_id;
496   inv_interface_rec.vendor_site_id             := pn_supplier_site_id;
497   inv_interface_rec.invoice_amount             := ln_invoice_amout;
498   inv_interface_rec.invoice_currency_code      := lv_currency_code;
499   inv_interface_rec.accts_pay_ccid             := ln_accts_pay_ccid;
500   inv_interface_rec.source                     := 'FBT';
501   --Replace the searched result with input parameter
502   --Modified by Eric Ma for FBT 12.1  on 2008-11-18
503   --inv_interface_rec.org_id                   := ln_org_id;
504   inv_interface_rec.org_id                     := pn_ou_id;
505   inv_interface_rec.legal_entity_id            := pn_legal_entity_id;
506   inv_interface_rec.payment_method_lookup_code := lv_payment_method_code;
507   inv_interface_rec.creation_date              := SYSDATE;
508   inv_interface_rec.created_by                 := ln_user_id;
509   inv_interface_rec.last_update_date           := SYSDATE;
510   inv_interface_rec.last_updated_by            := ln_user_id;
511   inv_interface_rec.last_update_login          := ln_login_id;
512 
513 
514   -- ap_invoice_lines_interface
515   -- get invoice line id
516   SELECT ap_invoice_lines_interface_s.nextval
517   INTO ln_invoice_line_id
518   FROM dual;
519 
520   --added by eric ma for bug 7325833 on 18-Aug-2008,begin
521   -----------------------------------------------------------------------------------
522   OPEN   get_fbt_account_ccid_cur;
523   FETCH  get_fbt_account_ccid_cur
524    INTO  ln_fbt_acct_ccid;
525   CLOSE  get_fbt_account_ccid_cur;
526   -----------------------------------------------------------------------------------
527   --added by eric ma for bug 7325833 on 18-Aug-2008,end
528 
529   inv_lines_interface_rec.invoice_id               := ln_invoice_id;
530   inv_lines_interface_rec.invoice_line_id          := ln_invoice_line_id;
531   inv_lines_interface_rec.line_number              := 1;
532   inv_lines_interface_rec.line_type_lookup_code    := 'ITEM';
533   inv_lines_interface_rec.amount                   := ln_invoice_amout;
534   inv_lines_interface_rec.accounting_date          := SYSDATE;
535   inv_lines_interface_rec.description              := 'Invoice for FBT Payment';
536   --added by eric ma for bug 7325833 on 18-Aug-2008,begin
537   -----------------------------------------------------------------------------------
538   --inv_lines_interface_rec.dist_code_combination_id := ln_accts_pay_ccid;
539   inv_lines_interface_rec.dist_code_combination_id :=ln_fbt_acct_ccid;
540   -----------------------------------------------------------------------------------
541   --added by eric ma for bug 7325833 on 18-Aug-2008,end
542 
543   --Replace the searched result with input parameter
544   --Modified by Eric Ma for FBT 12.1  on 2008-11-18
545   --inv_lines_interface_rec.org_id                 := ln_org_id;
546   inv_interface_rec.org_id                         := pn_ou_id;
547   inv_lines_interface_rec.creation_date            := SYSDATE;
548   inv_lines_interface_rec.created_by               := ln_user_id;
549   inv_lines_interface_rec.last_update_date         := SYSDATE;
550   inv_lines_interface_rec.last_updated_by          := ln_user_id;
551   inv_lines_interface_rec.last_update_login        := ln_login_id;
552 
553   Insert_Interface_Table( inv_interface_rec
554                           , inv_lines_interface_rec
555                           );
556 
557   COMMIT;
558   --logging for debug
559   IF (ln_proc_level >= ln_dbg_level)
560   THEN
561     FND_LOG.STRING( ln_proc_level
562                   , GV_MODULE_PREFIX ||'.' || lv_procedure_name || '.end'
563                   , 'Exit procedure'
564                   );
565   END IF; -- (ln_proc_level>=ln_dbg_level)
566 
567 
568 EXCEPTION
569   WHEN OTHERS THEN
570     pv_retcode    :=2;
571     pv_errbuf  := Sqlerrm;
572     ROLLBACK;
573     IF(FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL)
574     THEN
575       FND_LOG.STRING( FND_LOG.LEVEL_UNEXPECTED
576                     , GV_MODULE_PREFIX ||'.' || lv_procedure_name || '.Other_Exception '
577                     , Sqlcode||Sqlerrm);
578     END IF; -- (FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL)
579 END Fbt_Payment;
580 
581 END JAI_FBT_PAYMENT_P;