[Home] [Help]
PACKAGE BODY: APPS.JL_CO_FA_POST_PKG
Source
1 PACKAGE BODY jl_co_fa_post_pkg AS
2 /* $Header: jlcofgpb.pls 120.7 2011/05/19 08:24:45 gkumares ship $ */
3
4 /* ======================================================================*
5 | FND Logging infrastructure |
6 * ======================================================================*/
7 G_PKG_NAME CONSTANT VARCHAR2(30) := 'JL_CO_FA_POST_PKG';
8 G_CURRENT_RUNTIME_LEVEL CONSTANT NUMBER := FND_LOG.G_CURRENT_RUNTIME_LEVEL;
9 G_LEVEL_UNEXPECTED CONSTANT NUMBER := FND_LOG.LEVEL_UNEXPECTED;
10 G_LEVEL_ERROR CONSTANT NUMBER := FND_LOG.LEVEL_ERROR;
11 G_LEVEL_EXCEPTION CONSTANT NUMBER := FND_LOG.LEVEL_EXCEPTION;
12 G_LEVEL_EVENT CONSTANT NUMBER := FND_LOG.LEVEL_EVENT;
13 G_LEVEL_PROCEDURE CONSTANT NUMBER := FND_LOG.LEVEL_PROCEDURE;
14 G_LEVEL_STATEMENT CONSTANT NUMBER := FND_LOG.LEVEL_STATEMENT;
15 G_MODULE_NAME CONSTANT VARCHAR2(80) := 'JL.PLSQL.JL_CO_FA_POST_PKG.';
16
17 x_last_updated_by NUMBER(15);
18 x_last_update_login NUMBER(15);
19 x_request_id NUMBER(15);
20 x_program_application_id NUMBER(15);
21 x_program_id NUMBER(15);
22 x_sysdate DATE;
23 x_statement VARCHAR2(20);
24
25 PROCEDURE find_who_columns;
26
27 ----------------------------------------------------------------------------
28 -- PROCEDURE --
29 -- purge_adjustment --
30 -- --
31 -- DESCRIPTION --
32 -- Use this procedure for posting from jl_co_fa_adjustments table to --
33 -- gl_interface table. --
34 -- PURPOSE: --
35 -- Oracle Applications Rel 11.0 --
36 -- --
37 -- PARAMETERS: --
38 -- p_book --
39 -- --
40 -- HISTORY: --
41 -- 08/21/98 Sujit Dalai Created --
42 -- 10/23/98 Sujit Dalai Changed the messages --
43 ----------------------------------------------------------------------------
44
45 PROCEDURE post(ERRBUF OUT NOCOPY VARCHAR2,
46 RETCODE OUT NOCOPY VARCHAR2,
47 p_book VARCHAR2) IS
48
49 x_set_of_book_id fa_book_controls.set_of_books_id%TYPE;
50 x_deprn_calendar fa_book_controls.deprn_calendar%TYPE;
51 x_gl_je_source xla_subledgers.je_source_name%TYPE; -- Bug 5136047
52 x_distribution_source_book fa_book_controls.distribution_source_book%TYPE;
53 x_period_counter VARCHAR2(150);
54 x_period_closed VARCHAR2(150);
55 x_user_je_source_name gl_je_sources.user_je_source_name%TYPE;
56 x_currency_code gl_sets_of_books.currency_code%TYPE;
57 x_period_name fa_deprn_periods.period_name%TYPE;
58 x_end_date fa_calendar_periods.end_date%TYPE;
59 x_status VARCHAR2(50) := 'NEW';
60 x_actual_flag VARCHAR2(1) := 'A';
61 x_batch_name VARCHAR2(150);
62 x_batch_description VARCHAR2(150);
63 x_journal_entry_name VARCHAR2(150);
64 x_journal_entry_description VARCHAR2(150);
65 x_entered_dr NUMBER;
66 x_entered_cr NUMBER;
67 call_status BOOLEAN;
68 err_num NUMBER;
69 err_msg VARCHAR2(200);
70 SAME_AS_PERIOD_CLOSED EXCEPTION;
71 PERIOD_NOT_DEFINED EXCEPTION;
72 l_api_name CONSTANT VARCHAR2(30) := 'POST';
73
74
75 CURSOR c_category IS
76 SELECT c.je_category_name,
77 c.user_je_category_name
78 FROM gl_je_categories c,
79 fa_book_controls b
80 WHERE b.book_type_code = p_book
81 AND c.je_category_name IN ( b.global_attribute6,
82 b.global_attribute7,
83 b.global_attribute8,
84 b.global_attribute9,
85 b.global_attribute10,
86 b.global_attribute11,
87 b.global_attribute12,
88 b.global_attribute13,
89 b.global_attribute14,
90 b.global_attribute15,
91 b.global_attribute16,
92 b.global_attribute17,
93 b.global_attribute18)
94 UNION
95 SELECT c.je_category_name,
96 c.user_je_category_name
97 FROM gl_je_categories c
98 WHERE c.je_category_name IN
99 (SELECT b.je_category_name
100 FROM xla_event_class_attrs b
101 WHERE b.application_id = 140);
102
103 CURSOR c_adjustment(p_counter NUMBER,
104 p_je_category_name VARCHAR2) IS
105 SELECT source_type_code,
106 debit_credit_flag,
107 code_combination_id,
108 sum(adjustment_amount) x_amount
109 FROM jl_co_fa_adjustments
110 WHERE book_type_code = p_book
111 AND period_counter_created = p_counter
112 AND je_category_name = p_je_category_name
113 AND NVL(posting_flag, 'E') <> 'C'
114 GROUP BY source_type_code,
115 debit_credit_flag,
116 code_combination_id;
117
118
119
120 BEGIN
121
122 IF ( G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL) THEN
123 FND_LOG.STRING(G_LEVEL_PROCEDURE,G_MODULE_NAME||l_api_name||'.BEGIN',G_PKG_NAME||': '||l_api_name||'(+)');
124 END IF;
125
126 fnd_message.set_name('JL', 'JL_CO_FA_PARAMETER');
127 fnd_file.put_line( FND_FILE.LOG, fnd_message.get);
128 fnd_file.put_line(FND_FILE.LOG, '----------------------------------------');
129 fnd_message.set_name('JL', 'JL_CO_FA_BOOK');
130 fnd_message.set_token('BOOK', p_book);
131 fnd_file.put_line( 1, fnd_message.get);
132 fnd_file.put_line(FND_FILE.LOG, '----------------------------------------');
133
134 ---------------------------------------------------------
135 -- Find who_columns values --
136 ---------------------------------------------------------
137
138 find_who_columns;
139
140 ---------------------------------------------------------
141 -- Get Depreciation Book Parameter --
142 ---------------------------------------------------------
143 x_statement := 'BOOK_INFO';
144 /* Bug 5136047:
145 In R12 due to SLA uptake, core FA no longer allows "GL journal entry source"
146 to be entered using Book Controls window.
147 "GL journal entry source" is set at the application level in SLA.
148 Though, gl_je_source value is available in fa_book_controls
149 for books upgraded from R11i, the source of truth is always as follows.
150 The "GL journal entry source" will be derived from JE_SOURCE_NAME from
151 XLA_SUBLEDGERS for application_id = 140.
152 Hence, there is no need to look at fa_book_controls for books upgraded
153 from R1i.
154
155 SELECT bc.set_of_books_id,
156 bc.deprn_calendar,
157 bc.gl_je_source,
158 bc.distribution_source_book,
159 (bc.global_attribute19 +1), -- Period counter for which posting is to be performed.
160 bc.global_attribute5,
161 js.user_je_source_name
162 INTO x_set_of_book_id,
163 x_deprn_calendar,
164 x_gl_je_source,
165 x_distribution_source_book,
166 x_period_counter,
167 x_period_closed,
168 x_user_je_source_name
169 FROM fa_book_controls bc,
170 gl_je_sources js
171 WHERE book_type_code = p_book
172 AND js.je_source_name = bc.gl_je_source;
173 */
174
175 SELECT bc.set_of_books_id,
176 bc.deprn_calendar,
177 bc.distribution_source_book,
178 (bc.global_attribute19 +1), -- Period counter for which posting is to be performed.
179 bc.global_attribute5
180 INTO x_set_of_book_id,
181 x_deprn_calendar,
182 x_distribution_source_book,
183 x_period_counter,
184 x_period_closed
185 FROM fa_book_controls bc
186 WHERE book_type_code = p_book;
187
188 SELECT xs.je_source_name,
189 js.user_je_source_name
190 INTO x_gl_je_source,
191 x_user_je_source_name
192 FROM gl_je_sources js,
193 xla_subledgers xs
194 WHERE js.je_source_name = xs.je_source_name
195 AND xs.application_id = 140;
196
197
198 IF ( G_LEVEL_STATEMENT >= G_CURRENT_RUNTIME_LEVEL) THEN
199 fnd_file.put_line( 1, 'Set of book id :'||to_char(x_set_of_book_id));
200 FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'Set of book id :'||to_char(x_set_of_book_id));
201 fnd_file.put_line( 1, 'Depreciation Calender :'||x_deprn_calendar);
202 FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'Depreciation Calender :'||x_deprn_calendar);
203 fnd_file.put_line( 1, 'Gl je source :'||x_gl_je_source);
204 FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'Gl je source :'||x_gl_je_source);
205 fnd_file.put_line( 1, 'Distribution source book :'||x_distribution_source_book);
206 FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'Distribution source book :'||x_distribution_source_book);
207 fnd_file.put_line( 1, 'Period counter :'||x_period_counter);
208 FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'Period counter :'||x_period_counter);
209 fnd_file.put_line( 1, 'Period closed :'||x_period_closed);
210 FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'Period closed :'||x_period_closed);
211 fnd_file.put_line( 1, 'User je source name :'||x_user_je_source_name );
212 FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'User je source name :'||x_user_je_source_name );
213 END IF;
214
215 ---------------------------------------------------------
216 -- Get Calendar parameters --
217 ---------------------------------------------------------
218 x_statement := 'CAL_INFO';
219 SELECT period_name
220 INTO x_period_name
221 FROM fa_deprn_periods
222 WHERE book_type_code = p_book
223 AND period_counter = x_period_counter;
224
225 -----------------------------------------------------------------------------
226 -- Write close globalization period name on log file --
227 -----------------------------------------------------------------------------
228
229 fnd_message.set_name ('JL', 'JL_ZZ_FA_PERIOD_NAME');
230 fnd_message.set_token ('PERIOD_NAME', x_period_name);
231 fnd_file.put_line (1, fnd_message.get);
232
233 IF ( G_LEVEL_STATEMENT >= G_CURRENT_RUNTIME_LEVEL) THEN
234 fnd_file.put_line( 1, 'Period Name :'||x_period_name);
235 FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'Period Name :'||x_period_name);
236 END IF;
237
238
239 SELECT end_date
240 INTO x_end_date
241 FROM fa_calendar_periods
242 WHERE calendar_type = x_deprn_calendar
243 AND period_name = x_period_name;
244
245 IF ( G_LEVEL_STATEMENT >= G_CURRENT_RUNTIME_LEVEL) THEN
246 fnd_file.put_line( 1, 'End Date :'||x_end_date);
247 FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'End Date :'||x_end_date);
248 END IF;
249
250 ---------------------------------------------------------
251 -- If last period posted and period counters are not --
252 -- defined then stop the program with error --
253 ---------------------------------------------------------
254
255 IF ((x_period_counter IS NULL) OR (x_period_closed IS NULL)) THEN
256 RAISE PERIOD_NOT_DEFINED;
257 END IF;
258
259 x_statement := 'CURR_INFO';
260 SELECT currency_code
261 INTO x_currency_code
262 FROM gl_sets_of_books
263 WHERE set_of_books_id = x_set_of_book_id;
264
265 IF ( G_LEVEL_STATEMENT >= G_CURRENT_RUNTIME_LEVEL) THEN
266 fnd_file.put_line( 1, 'Currency Code :'||x_currency_code);
267 FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'Currency Code :'||x_currency_code);
268 END IF;
269
270 ---------------------------------------------------------
271 -- If last period posted is same as period closed by --
272 -- Globalization then stop the program with error --
273 ---------------------------------------------------------
274 IF (NVL(x_period_counter, -998) -1) = NVL(x_period_closed, -999) THEN
275 Raise SAME_AS_PERIOD_CLOSED;
276 END IF;
277
278 ---------------------------------------------------------
279 -- Process following for each gl_category_name --
280 ---------------------------------------------------------
281
282 FOR rec_category IN c_category LOOP
283
284 fnd_message.set_name('JL', 'JL_CO_FA_JE_CATEGORY');
285 fnd_message.set_token('JE_CATEGORY', rec_category.user_je_category_name);
286 fnd_file.put_line( 1, fnd_message.get);
287
288 IF ( G_LEVEL_STATEMENT >= G_CURRENT_RUNTIME_LEVEL) THEN
289 fnd_file.put_line( 1, 'Je category name :'||rec_category.je_category_name);
290 FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'Je category name :'||rec_category.je_category_name);
291 END IF;
292
293 x_batch_name := x_user_je_source_name||' '||rec_category.user_je_category_name||' '||
294 p_book||'/'||x_period_name;
295
296 IF ( G_LEVEL_STATEMENT >= G_CURRENT_RUNTIME_LEVEL) THEN
297 fnd_file.put_line( 1, 'Batch Name :'||x_batch_name);
298 FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'Batch Name :'||x_batch_name);
299 END IF;
300
301 x_batch_description := p_book||'/'||x_period_name||' '||x_user_je_source_name||' '||
302 rec_category.user_je_category_name;
303 IF ( G_LEVEL_STATEMENT >= G_CURRENT_RUNTIME_LEVEL) THEN
304 fnd_file.put_line( 1, 'Batch description :'||x_batch_description);
305 FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'Batch description :'||x_batch_description);
306 END IF;
307
308 x_journal_entry_name := x_batch_name;
309 x_journal_entry_description := x_batch_description;
310
311 IF ( G_LEVEL_STATEMENT >= G_CURRENT_RUNTIME_LEVEL) THEN
312 fnd_file.put_line( 1, 'Journal Entry_name :'||x_journal_entry_name);
313 FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'Journal Entry_name :'||x_journal_entry_name);
314 fnd_file.put_line( 1, 'Journal Entry description :'||x_batch_description);
315 FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'Journal Entry description :'||x_batch_description);
316 END IF;
317
318
319 FOR rec_adjustment IN c_adjustment(x_period_counter, rec_category.je_category_name) LOOP
320
321 IF ( G_LEVEL_STATEMENT >= G_CURRENT_RUNTIME_LEVEL) THEN
322 fnd_file.put_line( 1, 'Book_type_code :'||rec_adjustment.source_type_code);
323 FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'Book_type_code :'||rec_adjustment.source_type_code);
324 fnd_file.put_line( 1, 'debit credit flag :'||rec_adjustment.debit_credit_flag);
325 FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'debit credit flag :'||rec_adjustment.debit_credit_flag);
326 fnd_file.put_line( 1, 'code_combination_id :'||rec_adjustment.code_combination_id);
327 FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'code_combination_id :'||rec_adjustment.code_combination_id);
328 fnd_file.put_line( 1, 'Amount :'||to_char(rec_adjustment.x_amount));
329 FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'Amount :'||to_char(rec_adjustment.x_amount));
330 END IF;
331
332 IF rec_adjustment.x_amount <> 0 THEN
333
334 IF (rec_adjustment.debit_credit_flag = 'DR') then
335 x_entered_dr := rec_adjustment.x_amount;
336 x_entered_cr := 0;
337 ELSIF (rec_adjustment.debit_credit_flag = 'CR') then
338 x_entered_dr := 0;
339 x_entered_cr := rec_adjustment.x_amount;
340 ELSE
341 x_entered_dr := 0;
342 x_entered_cr := 0;
343 END IF;
344
345 IF (x_entered_dr > 0 OR x_entered_cr >0 ) THEN
346
347
348 IF ( G_LEVEL_STATEMENT >= G_CURRENT_RUNTIME_LEVEL) THEN
349 fnd_file.put_line( 1, 'Inserting row into GL_INTERFACE');
350 FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'Inserting row into GL_INTERFACE');
351 END IF;
352
353
354 INSERT INTO gl_interface (status,
355 set_of_books_id,
356 -- Bug 11799412 Start
357 ledger_id,
358 -- Bug 11799412 End
359 accounting_date,
360 currency_code,
361 date_created,
362 created_by,
363 actual_flag,
364 user_je_category_name,
365 user_je_source_name,
366 entered_dr,
367 entered_cr,
368 reference1,
369 reference2,
370 reference4,
371 reference6,
372 reference10,
373 reference21,
374 reference22,
375 code_combination_id)
376 VALUES( x_status,
377 x_set_of_book_id,
378 -- Bug 11799412 Start
379 x_set_of_book_id,
380 -- Bug 11799412 Start
381 x_end_date,
382 x_currency_code,
383 x_sysdate,
384 x_last_updated_by,
385 x_actual_flag,
386 rec_category.user_je_category_name,
387 x_user_je_source_name,
388 x_entered_dr,
389 x_entered_cr,
390 x_batch_name,
391 x_batch_description,
392 x_journal_entry_name,
393 p_book,
394 x_batch_description,
395 rec_category.je_category_name,
396 jl_co_fa_adj_je_header_s.NEXTVAL,
397 rec_adjustment.code_combination_id);
398
399
400 IF ( G_LEVEL_STATEMENT >= G_CURRENT_RUNTIME_LEVEL) THEN
401 fnd_file.put_line( 1, 'Inserted row into GL_INTERFACE');
402 FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'Inserted row into GL_INTERFACE');
403 END IF;
404
405
406 ---------------------------------------------------------
407 -- Update jl_co_fa_adjustments --
408 ---------------------------------------------------------
409
410 UPDATE jl_co_fa_adjustments
411 SET sequence_line = jl_co_fa_adj_je_header_s.CURRVAL,
412 posting_flag = 'C',
413 last_update_date = x_sysdate,
414 last_updated_by = x_last_updated_by,
415 last_update_login = x_last_update_login,
416 program_update_date = x_sysdate
417 WHERE book_type_code = p_book
418 AND je_category_name = rec_category.je_category_name
419 AND NVL(posting_flag, 'E') <> 'C'
420 AND period_counter_created = x_period_counter
421 AND code_combination_id = rec_adjustment.code_combination_id
422 AND debit_credit_flag = rec_adjustment.debit_credit_flag
423 AND source_type_code = rec_adjustment.source_type_code;
424
425 END IF;
426
427 END IF;
428
429 END LOOP;
430
431 END LOOP;
432
433 UPDATE fa_book_controls
434 SET global_attribute19 = x_period_counter,
435 last_update_date = x_sysdate,
436 last_updated_by = x_last_updated_by
437 WHERE book_type_code = p_book;
438
439 COMMIT;
440
441 IF ( G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL) THEN
442 FND_LOG.STRING(G_LEVEL_PROCEDURE,G_MODULE_NAME||l_api_name||'.END',G_PKG_NAME||': '||l_api_name||'(-)');
443 END IF;
444
445 EXCEPTION
446
447 WHEN PERIOD_NOT_DEFINED THEN
448 fnd_message.set_name('JL', 'JL_CO_FA_PERIOD_NOT_DEFINED');
449 fnd_message.set_token('BOOK', p_book);
450 -- err_msg := fnd_message.get;
451 fnd_file.put_line (fnd_file.log, fnd_message.get);
452 call_status := fnd_concurrent.set_completion_status('ERROR','');
453 /*
454 app_exception.raise_exception (exception_type => 'APP',
455 exception_code =>
456 jl_zz_fa_utilities_pkg.get_app_errnum('JL', 'JL_CO_FA_PERIOD_NOT_DEFINED'),
457 exception_text => err_msg);
458 */
459
460 WHEN SAME_AS_PERIOD_CLOSED THEN
461 fnd_message.set_name('JL', 'JL_CO_FA_SAME_AS_PERIOD_CLOSED');
462 fnd_message.set_token('BOOK', p_book);
463 fnd_message.set_token('PERIOD', x_period_name);
464 -- err_msg := fnd_message.get;
465 fnd_file.put_line (fnd_file.log, fnd_message.get);
466 call_status := fnd_concurrent.set_completion_status('ERROR','');
467 /*
468 app_exception.raise_exception (exception_type => 'APP',
469 exception_code =>
470 jl_zz_fa_utilities_pkg.get_app_errnum('JL', 'JL_CO_FA_SAME_AS_PERIOD_CLOSED'),
471 exception_text => err_msg);
472 */
473
474 WHEN OTHERS THEN
475 IF x_statement = 'BOOK_INFO' THEN
476 fnd_message.set_name('JL', 'JL_ZZ_FA_EXEC_FAILURE');
477 fnd_message.set_token('NUMBER', '1');
478 -- err_msg := fnd_message.get;
479 fnd_file.put_line (fnd_file.log, fnd_message.get);
480 ROLLBACK;
481 call_status := fnd_concurrent.set_completion_status('ERROR','');
482 /*
483 app_exception.raise_exception (exception_type => 'APP',
484 exception_code =>
485 jl_zz_fa_utilities_pkg.get_app_errnum('JL', 'JL_ZZ_FA_EXEC_FAILURE'),
486 exception_text => err_msg);
487 */
488
489 ELSIF x_statement = 'CURR_INFO' THEN
490 fnd_message.set_name('JL', 'JL_ZZ_FA_EXEC_FAILURE');
491 fnd_message.set_token('NUMBER', '2');
492 -- err_msg := fnd_message.get;
493 fnd_file.put_line (fnd_file.log, fnd_message.get);
494 ROLLBACK;
495 call_status := fnd_concurrent.set_completion_status('ERROR','');
496 /*
497 app_exception.raise_exception (exception_type => 'APP',
498 exception_code =>
499 jl_zz_fa_utilities_pkg.get_app_errnum('JL', 'JL_ZZ_FA_EXEC_FAILURE'),
500 exception_text => err_msg);
501 */
502
503 ELSIF x_statement = 'CAL_INFO' THEN
504 fnd_message.set_name('JL', 'JL_ZZ_FA_EXEC_FAILURE');
505 fnd_message.set_token('NUMBER', '3');
506 -- err_msg := fnd_message.get;
507 fnd_file.put_line (fnd_file.log, fnd_message.get);
508 ROLLBACK;
509 call_status := fnd_concurrent.set_completion_status('ERROR','');
510 /*
511 app_exception.raise_exception (exception_type => 'APP',
512 exception_code =>
513 jl_zz_fa_utilities_pkg.get_app_errnum('JL', 'JL_ZZ_FA_EXEC_FAILURE'),
514 exception_text => err_msg);
515 */
516
517 ELSE
518 fnd_message.set_name('JL', 'JL_CO_FA_GENERAL_ERROR');
519 fnd_file.put_line( fnd_file.log, fnd_message.get);
520 err_num := SQLCODE;
521 err_msg := substr(SQLERRM, 1, 200);
522 ROLLBACK;
523 RAISE_APPLICATION_ERROR( err_num, err_msg);
524 END IF;
525 END post;
526
527
528 ----------------------------------------------------------------------------
529 -- PROCEDURE --
530 -- find_who_columns --
531 -- --
532 -- DESCRIPTION --
533 -- Use this procedure to find the values for WHO columns. --
534 -- --
535 -- PURPOSE: --
536 -- Oracle Applications Rel 11.0 --
537 -- --
538 -- PARAMETERS: --
539 -- HISTORY: --
540 -- 08/12/98 Sujit Dalai Created --
541 ----------------------------------------------------------------------------
542
543 PROCEDURE find_who_columns IS
544
545 l_api_name CONSTANT VARCHAR2(30) := 'FIND_WHO_COLUMNS';
546
547 BEGIN
548
549 IF ( G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL) THEN
550 FND_LOG.STRING(G_LEVEL_PROCEDURE,G_MODULE_NAME||l_api_name||'.BEGIN',G_PKG_NAME||': '||l_api_name||'(+)');
551 END IF;
552
553 x_last_updated_by := fnd_global.user_id;
554 x_last_update_login := fnd_global.login_id;
555 x_request_id := fnd_global.conc_request_id;
556 x_program_application_id := fnd_global.prog_appl_id;
557 x_program_id := fnd_global.conc_program_id;
558 x_sysdate := SYSDATE;
559
560 IF ( G_LEVEL_STATEMENT >= G_CURRENT_RUNTIME_LEVEL) THEN
561 fnd_file.put_line( 1, 'last_update_login:'||to_char(x_last_update_login));
562 FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'last_update_login:'||to_char(x_last_update_login));
563 fnd_file.put_line( 1, 'last_updated_by:'||to_char(x_last_updated_by));
564 FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'last_updated_by:'||to_char(x_last_updated_by));
565 fnd_file.put_line( 1, 'last_request_id:'||to_char(x_request_id));
566 FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'last_request_id:'||to_char(x_request_id));
567 fnd_file.put_line( 1, 'x_program_application_id :'||to_char(x_program_application_id ));
568 FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'x_program_application_id :'||to_char(x_program_application_id ));
569 fnd_file.put_line( 1, 'x_program_id :'||to_char(x_program_id ));
570 FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'x_program_id :'||to_char(x_program_id ));
571 fnd_file.put_line( 1, 'x_sysdate :'||to_char(x_sysdate ));
572 FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'x_sysdate :'||to_char(x_sysdate ));
573 END IF;
574
575 IF ( G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL) THEN
576 FND_LOG.STRING(G_LEVEL_PROCEDURE,G_MODULE_NAME||l_api_name||'.END',G_PKG_NAME||': '||l_api_name||'(-)');
577 END IF;
578
579 END find_who_columns;
580
581 END jl_co_fa_post_pkg;