DBA Data[Home] [Help]

PACKAGE BODY: APPS.PA_FCK_UTIL

Source


1 PACKAGE BODY PA_FCK_UTIL as
2 --/* $Header: PABFUTLB.pls 115.4 2003/03/22 00:35:21 skannoji noship $ */
3 
4 /* ********** ***********************
5 TO RUN THE DEBUG MODE USING TEMP TABLE do the following:
6 
7 1)uncomment the PRAGMA statement.
8 2)create temp table and indexes :
9 
10              drop table pa_buza_debug_log;
11              create table pa_buza_debug_log
12              (
13               sess_seq_id         number,
14               creation_date       date,
15               creation_date_chr   varchar2(30),
16               line_num            number,
17               message             varchar2(250) );
18              create sequence pa_buza_debug_log_s ;
19              create unique index
20               pa_buza_debug_log_U1
21                   on pa_buza_debug_log ( sess_seq_id,line_num);
22 3)Apply the package.
23 
24 ************************************* */
25 --
26 pa_buza_debug_mode VARCHAR2(1) := NULL;-- Added for bug 2838796
27 
28 PROCEDURE debug_msg ( p_msg             IN   VARCHAR2 )
29 IS
30 --PRAGMA AUTONOMOUS_TRANSACTION;
31 BEGIN
32 
33 --null;
34 
35  /* Added code for bug 2838796 to print the log messages only when the debug mode is Yes */
36    IF pa_buza_debug_mode IS NULL THEN
37      pa_buza_debug_mode := NVL(FND_PROFILE.value('PA_DEBUG_MODE'), 'N');
38    END IF;
39 
40    IF pa_buza_debug_mode  = 'Y' THEN
41      -- PA_DEBUG.Set_Curr_Function( p_function   => 'Buza Message->',
42      --                             p_debug_mode => pa_buza_debug_mode);
43       PA_DEBUG.g_err_stage := p_msg;
44       PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
45       --    PA_DEBUG.Reset_Curr_Function;
46    END IF;
47  /* Changes end here */
48 
49 
50 /* Commented out for bug 2838796 */
51 -- pa_debug.debug(p_msg);
52 /* Changes to bug 2838796 end here */
53 
54 /* *********
55 if ( g_session_seq_id is null ) then
56    select
57       pa_buza_debug_log_s.nextval into g_session_seq_id
58    from dual;
59    g_msg_num := 0;
60 --   DBMS_PROFILER.START_PROFILER('BUZA-PLSQL-PERF-'||to_char(g_session_seq_id));
61 else
62   g_msg_num := g_msg_num + 1;
63 end if;
64 
65    insert into pa_buza_debug_log
66        ( SESS_SEQ_ID,creation_date,
67          creation_date_chr,line_num,MESSAGE )
68    values ( g_session_seq_id,sysdate,
69             to_char(sysdate,'DD-MON-YYY HH24:MI:SS'), g_msg_num,p_msg);
70 commit;
71 * ************ */
72 END debug_msg;
73 
74 END PA_FCK_UTIL;