DBA Data[Home] [Help]

PACKAGE: APPS.FND_DEBUG

Source


1 package FND_DEBUG AUTHID CURRENT_USER as
2 /* $Header: AFCPDWBS.pls 115.1 2004/01/14 02:37:06 vvengala noship $ */
3 
4   --
5   -- PUBLIC VARIABLES
6   -- debug components
7   REPORTS    VARCHAR2(30) := 'REPORTS';
8   FORMS      VARCHAR2(30) := 'FORM';
9   SQLPLUS_CP VARCHAR2(30) := 'SQLPLUS_CP';
10   PLSQL_CP   VARCHAR2(30) := 'PLSQL_CP';
11   JAVA_CP    VARCHAR2(30) := 'JAVA_CP';
12   FORM_FUNC  VARCHAR2(30) := 'FORM_FUNCTION';
13   PERL_CP    VARCHAR2(30) := 'PERL_CP';
14 
15 
16   -- Exceptions
17 
18   -- Exception Pragmas
19 
20   --
21   -- PUBLIC FUNCTIONS
22   --
23 
24   --
25   -- Name
26   --   enable_db_rules
27   -- Purpose
28   --   Based on debug rules currently active for the user / responsibility
29   --   it will execute the matching rules accordingly
30   --   return string which will contain the debug string for the
31   --   component instance to use.
32   --
33   -- return true if atleast one rule is executed in this call
34   --        other wise returns false (if no rule is executed)
35   /*
36     some examples to call this API
37     1. To execute all rules associated with this component having different debug options
38         enable_db_rules(FND_DEBUG.FORM, 'FNDRSRUN');
39 
40     2. To execute all rules associated with this component id and component application id
41         having different debug options (one of the component name or comp id and  comp appl id is required)
42         enable_db_rules(FND_DEBUG.FORM, null, 1,2);
43 
44     3. To execute rules specific to a request id having different debug options
45         enable_db_rules(FND_DEBUG.REPORT, 'FNDSCURS', null, null, 12345);
46 
47   */
48   function enable_db_rules (comp_type       in varchar2,
49                             comp_name       in varchar2,
50                             comp_appl_id    in number default null,
51                             comp_id         in number default null,
52                             req_id          in number default null
53                            ) return boolean;
54 
55 
56   --
57   -- Name
58   --   disable_db_rules
59   -- Purpose
60   --   Based on all debug rules currently active for the user / responsibility
61   --   it will disable the rules in the database session.
62   --
63   -- return true if atleast one rule is disabled
64   --        other wise returns false (if no rule is disabled)
65   function disable_db_rules return boolean;
66 
67   --
68   -- Name
69   --    get_os_rules
70   -- Purpose
71   --    Based on debug rules currently active for the user / responsibility
72   --    it will return debug string which contains debug string for the component
73   --    to use before running the component.
74   --    this will execute one and only one rule at a call
75   --    in case multiple rules are matching, the oldest rule will be picked
76   --
77   --  return string containing debug string for matched rule
78   /*
79     some examples to call this API
80     1. To execute rule associated with a component instance
81         get_os_rules(FND_DEBUG.REPORT, 'FNDSCURS', null, null, 12345, 0, 20420,1);
82 
83 
84   */
85   function get_os_rules ( comp_type          in varchar2,
86                           comp_name          in varchar2,
87                           comp_appl_id       in number default null,
88                           comp_id            in number default null,
89                           comp_inst_id       in number default null, /* request id */
90                           user_id            in number,
91                           resp_appl_id       in number,
92                           resp_id            in number
93                         ) return varchar2;
94 
95 
96   --
97   -- Name
98   --    get_ret_value
99   -- Purpose
100   --    A utility function to execute the passed routine as string
101   --
102   --  returns string containing the result of execution of passes string.
103   function get_ret_value(t_routine varchar2) return varchar2;
104 
105   --
106   -- Name
107   --    get_transaction_id
108   -- Purpose
109   --    Returns the transaction context id by calling
110   --    fnd_log_repository.init_trans_int_with_context api.
111 
112   FUNCTION get_transaction_id(force               boolean   default FALSE,
113                               comp_type           varchar2  default null,
114                               comp_inst_id        number    default null,
115                               comp_inst_appl_id   number    default null,
116                               user_id             number    default null,
117                               resp_id             number    default null,
118                               resp_appl_id        number    default null
119                             ) return number;
120 
121   --
122   -- Name
123   --    assign_request
124   -- Purpose
125   --    It will assign specified request_id to the debug_rule_execution.
126   --    In case of PL SQL Profiling we have to submit a request to get the
127   --    output of trace information.
128   -- Arguments:
129   --    Transaction_id : transaction_id for which we need to assign the
130   --                     request_id
131   --    request_id     : Request_id value we need to assign.
132   PROCEDURE assign_request(transaction_id   IN number,
133                            request_id       IN number);
134 
135  end FND_DEBUG;