1 PACKAGE BODY INV_DEBUG_INTERFACE as
2 /* $Header: INVDBGIB.pls 115.2 2002/11/23 00:18:11 mdevassy noship $ */
3
4 /*===========================================================================
5
6 PROCEDURE NAME: start_inv_debugger
7
8 DESCRIPTION This procedure is used to turn on the Inventory Debugger by other
9 products
10 ============================================================================*/
11 PROCEDURE start_inv_debugger
12 (
13 p_dir_name IN VARCHAR2,
14 p_file_name IN VARCHAR2,
15 p_file_handle IN utl_file.file_type
16 )
17 is
18 l_dir_file_name varchar2(256) ;
19 l_dir_separator varchar2(1);
20 l_ndx number;
21
22 BEGIN
23
24 IF ( nvl(fnd_global.conc_request_id, -1) > 0 )
25 THEN
26 fnd_profile.put('INV_DEBUG_LEVEL','10');
27 fnd_profile.put('INV_DEBUG_TRACE',1);
28 fnd_profile.put('INV_DEBUG_FILE','Dummy');
29 RETURN;
30 END IF;
31
32 IF p_dir_name IS NOT NULL
33 AND p_file_name IS NOT NULL
34 AND utl_file.is_open(p_file_handle)
35 THEN
36 fnd_profile.put('INV_DEBUG_LEVEL','10');
37 fnd_profile.put('INV_DEBUG_TRACE',1);
38
39 --- Concatenate directory and file name based on OS
40 l_dir_separator := '/';
41 l_ndx := instr(p_dir_name,l_dir_separator);
42 if (l_ndx = 0) then
43 l_dir_separator := '\';
44 end if;
45 l_dir_file_name := p_dir_name||l_dir_separator||p_file_name;
46
47 fnd_profile.put('INV_DEBUG_FILE',l_dir_file_name);
48 g_file_handle := p_file_handle;
49 --
50 END IF;
51
52 EXCEPTION
53 WHEN OTHERS THEN
54 NULL;
55 END start_inv_debugger;
56
57
58 /*===========================================================================
59
60 PROCEDURE NAME: stop_inv_debugger
61
62 DESCRIPTION This procedure is used to turn off the Inventory Debugger by other
63 products
64
65 ============================================================================*/
66 PROCEDURE stop_inv_debugger
67 IS
68 BEGIN
69
70 fnd_profile.put('INV_DEBUG_LEVEL','NULL');
71 fnd_profile.put('INV_DEBUG_TRACE',2);
72 fnd_profile.put('INV_DEBUG_FILE',NULL);
73 g_file_handle := NULL;
74
75 EXCEPTION
76 WHEN OTHERS THEN
77 NULL;
78 END stop_inv_debugger;
79
80 END INV_DEBUG_INTERFACE;