DBA Data[Home] [Help]

PACKAGE: APPS.CZ_DIAGNOSTICS_PVT

Source


1 PACKAGE CZ_DIAGNOSTICS_PVT AUTHID CURRENT_USER AS
2 /*	$Header: czdiags.pls 120.1 2006/03/29 10:20:04 asiaston noship $		*/
3 ---------------------------------------------------------------------------------------
4 DEFAULT_MARK_FIXED_CHAR   CONSTANT VARCHAR2(1)  := '7';
5 ---------------------------------------------------------------------------------------
6 --This procedure traverses product structure and explosion in parallel, and reports the
7 --first encountered problem. It does not continue after the first problems because most
8 --errors in explosion will induce other errors, which would go away after the first one
9 --is corrected.
10 --
11 --p_debug_flag      if 1, writes the detailed message log to cz_db_logs, otherwise just
12 --                  returns one error message in the output parameter x_msg_data.
13 --
14 --x_return_status   FND_API.G_RET_STS_ERROR / FND_API.G_RET_STS_SUCCESS
15 
16 PROCEDURE verify_structure(p_api_version     IN NUMBER,
17                            p_devl_project_id IN NUMBER,
18                            p_debug_flag      IN PLS_INTEGER,
19                            x_run_id          IN OUT NOCOPY NUMBER,
20                            x_return_status   IN OUT NOCOPY VARCHAR2,
21                            x_msg_count       IN OUT NOCOPY NUMBER,
22                            x_msg_data        IN OUT NOCOPY VARCHAR2);
23 ---------------------------------------------------------------------------------------
24 --This procedure traverses product structure and explosion in parallel, and reports the
25 --first encountered problem. It does not continue after the first problems because most
26 --errors in explosion will induce other errors, which would go away after the first one
27 --is corrected.
28 --
29 --p_debug_flag      if 1, writes the detailed message log to cz_db_logs, otherwise just
30 --                  returns one error message in the output parameter x_msg_data.
31 --
32 --p_fix_extra_flag  in case when extra records are found the procedure can be requested
33 --                  to automatically delete them with this parameter set to 1.
34 --
35 --p_mark_fixed_char if deleting explosions, deleted_flag will be set to this character.
36 --
37 --x_return_status   FND_API.G_RET_STS_ERROR / FND_API.G_RET_STS_SUCCESS
38 
39 PROCEDURE verify_structure(p_api_version     IN NUMBER,
40                            p_devl_project_id IN NUMBER,
41                            p_debug_flag      IN PLS_INTEGER,
42                            p_fix_extra_flag  IN PLS_INTEGER,
43                            p_mark_fixed_char IN VARCHAR2,
44                            x_run_id          IN OUT NOCOPY NUMBER,
45                            x_return_status   IN OUT NOCOPY VARCHAR2,
46                            x_msg_count       IN OUT NOCOPY NUMBER,
47                            x_msg_data        IN OUT NOCOPY VARCHAR2);
48 ---------------------------------------------------------------------------------------
49 --Example if use:
50 --   SELECT cz_diagnostics_pvt.fast_verify(623160) FROM DUAL;
51 
52 FUNCTION fast_verify(p_devl_project_id IN NUMBER) RETURN VARCHAR2;
53 ---------------------------------------------------------------------------------------
54 --Example if use:
55 --   SET SERVEROUTPUT ON
56 --   BEGIN DBMS_OUTPUT.PUT_LINE(cz_diagnostics_pvt.fast_debug(623160)); END;
57 --   /
58 --   SELECT message FROM cz_db_logs WHERE run_id = <value> ORDER BY message_id;
59 
60 FUNCTION fast_debug(p_devl_project_id IN NUMBER) RETURN NUMBER;
61 ---------------------------------------------------------------------------------------
62 --This procedure can be used to automatically fix the explosions - it runs until the
63 --return status is successful. However, currently it can only delete extra explosion
64 --records, and has not been thoroughly tested. It is relatively safe, when the extra
65 --records is the only type of problem.
66 --
67 --It will mark the records it deletes with the character in p_mark_fixed_char, which
68 --must be specified. It is best if this character is not present in the deleted_flag
69 --before the run - this makes it easy to rollback the changes.
70 --
71 --Because the procedure may run many times, the debug output is disabled.
72 --
73 --Example of use: EXECUTE cz_diagnostics_pvt.fast_fix_extra(623160, '7');
74 
75 PROCEDURE fast_fix_extra(p_devl_project_id IN NUMBER, p_mark_fixed_char IN VARCHAR2);
76 ---------------------------------------------------------------------------------------
77 END;