1 PACKAGE WIP_MASS_LOAD_UTILITIES AUTHID CURRENT_USER AS
2 /* $Header: wipmluts.pls 115.8 2002/12/12 15:02:09 rmahidha ship $ */
3
4
5 --
6 -- Errors out records of p_group_id in p_table matching p_where_clause.
7 -- Updates p_table.PROCESS_STATUS to p_new_process_status if its record
8 -- is in error. Inserts an error record in WIP_INTERFACE_ERRORS,
9 -- setting the ERROR_TYPE column to p_error_type, and setting the
10 -- message to the text of P_ERROR_MSG. Commits.
11 --
12 PROCEDURE Error (
13 P_Group_Id IN NUMBER,
14 P_Table IN VARCHAR2,
15 P_New_Process_Status IN NUMBER,
16 P_Where_Clause IN VARCHAR2,
17 P_Error_Type IN NUMBER,
18 P_Error_Msg IN VARCHAR2
19 ) ;
20
21
22 --
23 -- Valid error types.
24 --
25 MSG_ERROR CONSTANT NUMBER := 1;
26 MSG_WARNING CONSTANT NUMBER := 2;
27 MSG_LOG CONSTANT NUMBER := 3;
28 MSG_COLUMN CONSTANT NUMBER := 4;
29 MSG_CONC CONSTANT NUMBER := 5;
30
31 --
32 -- private facilities
33 --
34
35 -- Facilities for Storing and Retreiving Mass Load Messages
36
37 -- The procedure set_current_message() stores its argument for later
38 -- retrieval by get_current_message(). The function get_current_message()
39 -- can be called within a SQL select clause. The (original) reason for
40 -- these procedures is to store away an AOL message so that it can be
41 -- retreived multiple times -- the function fnd_message.get() works
42 -- only once.
43
44 procedure set_current_message(message varchar2) ;
45
46 function get_current_message return varchar2;
47 pragma restrict_references(get_current_message,WNDS,WNPS) ;
48
49 -- Buffer in which we store messages
50 CURRENT_MESSAGE varchar2(2000) ;
51
52
53 -- Dynamic SQL Facilities
54
55 -- Executes the argument statement.
56 function dynamic_sql(x_statement varchar2,
57 P_Group_Id IN NUMBER) return number;
58
59 -- Helper for dynamic_sql. Records erronious SQL statements in
60 -- WIP_INTERFACE_ERRORS with a null group_id, interface_id of -1,
61 -- error type of 1, and the creation_date set to sysdate.
62 -- Does not commit.
63 -- Note: If ever this procedure is called, and if ever there are
64 -- rows in WIP_INTERFACE_ERRORS with an interface_id of -1, that means
65 -- that there is a bug in some WIP dynamic SQL. Examine the statement
66 -- fragments recorded in the table to figure out which statement has
67 -- a problem.
68 procedure record_bad_query(x_statement in varchar2) ;
69
70
71 END WIP_MASS_LOAD_UTILITIES;