1 PACKAGE WSH_UTIL AUTHID CURRENT_USER AS
2 /* $Header: WSHUUTLS.pls 115.0 99/07/16 08:24:36 porting ship $ */
3
4
5 --
6 -- Package Types
7 --
8 TYPE logTyp IS RECORD (
9 token VARCHAR2(15),
10 text_line VARCHAR2(80)
11 );
12
13 TYPE logTabTyp IS TABLE OF logTyp INDEX BY BINARY_INTEGER;
14
15 TYPE logCharTyp IS TABLE OF VARCHAR2(80) INDEX BY BINARY_INTEGER;
16 --
17 -- This function initializes the package. Should only be called if
18 -- you care about the flush variable which is set to 'N' by default.
19 -- Arguments:
20 -- p_flush -> 'Y' or 'N' depending on whether the line is to be
21 -- written to the file immediately or not.
22 --
23
24 FUNCTION Init (
25 p_flush IN VARCHAR2 DEFAULT 'N'
26 ) RETURN NUMBER;
27
28 --
29 -- This function returns if 'u' if calleWSHUOPNS.plsd form form or 'c' for
30 -- concurrent program
31 --
32
33 FUNCTION Wshsrc RETURN VARCHAR2;
34
35 --
36 -- This procedure writes a line of text to the log file.
37 -- Arguments:
38 -- p_text -> text to be logged, must be less that 50 chars per line
39 -- p_debug-level -> If set to 1,2,3 lok at debug flag, 0 always write
40 -- p_token -> if you want a token string to be attched to the line
41 -- for retrieveing specific lines in the log file
42 --
43
44 PROCEDURE Write_Log (
45 p_text IN VARCHAR2,
46 p_debug_level IN NUMBER DEFAULT 0,
47 p_token IN VARCHAR2 DEFAULT ''
48 );
49
50 --
51 -- This function will fetch the table which has all the lines
52 -- added into the log file
53 -- Arguments:
54 -- p_log -> log structure (cannot be used from forms, currently)
55 --
56
57 PROCEDURE Get_Log (
58 p_log OUT logCharTyp
59 );
60
61 --
62 -- This function gets the number of lines entered as log information
63 --
64
65 FUNCTION Get_Size RETURN NUMBER;
66
67 --
68 -- This procedure gets a specific line form the log file specified by
69 -- the line number
70 -- Arguments:
71 -- p_line -> Line number in the log file, if you know it
72 --
73
74 PROCEDURE Get_Line (
75 p_line IN NUMBER,
76 p_text OUT VARCHAR2,
77 p_status OUT NUMBER
78 );
79
80 --
81 -- This procedure gets a specific line form the log file specified by
82 -- the token
83 -- Arguments:
84 -- p_token -> Token associated with the line in the Log file
85 --
86
87 PROCEDURE Get_Line (
88 p_token IN VARCHAR2,
89 p_text OUT VARCHAR2,
90 p_status OUT NUMBER
91 );
92
93 --
94 -- This function will clear the logged information for the session
95 --
96
97 FUNCTION Clear_Log RETURN NUMBER;
98
99 /*
100 --
101 -- This function will flush the log information to a log file in the
102 -- server denoted by l<request_id>.log or l<time>.log. Your DBA can
103 -- assist you with the location of the log file.
104 --
105
106 FUNCTION Flush_Log (
107 p_close IN VARCHAR2
108 ) RETURN NUMBER;
109 */
110
111 --
112 -- This is the generic server side exception handler for shipping.
113 -- It should be called in the WHEN OTHERS clause.
114 -- Arguments:
115 -- function_name -> package_name.proc/func_name
116 -- msg_txt -> useful debugging text for exception
117 --
118
119 PROCEDURE Default_Handler (
120 function_name IN VARCHAR2,
121 msg_txt IN VARCHAR2 DEFAULT ''
122 );
123
124 --
125 -- Access to internal variables for debugging purposes
126 --
127
128 FUNCTION Get_Var (
129 var_name IN VARCHAR2
130 ) RETURN VARCHAR2;
131
132 PROCEDURE Set_Var (
133 var_name IN VARCHAR2,
134 var_val IN VARCHAR2
135 );
136
137 -- update the subinventory_code of the table mtl_item_locations
138 -- before update it, we check this combination is not used by
139 -- some other subinventory.
140 -- return value : TRUE if update successfully
141 -- : FALSE if this locator is used for
142 -- other subinventory
143
144 FUNCTION update_locator_flex( organization_id IN NUMBER,
145 locator_id IN NUMBER,
146 subinventory IN VARCHAR2)
147 RETURN BOOLEAN;
148
149 -- calling transaction manager for porcess online
150 -- please change cursor style before and after calling this function
151 FUNCTION sc_online( departure_id IN NUMBER,
152 delivery_id IN NUMBER,
153 so_reservations IN VARCHAR2) RETURN BOOLEAN;
154
155 END WSH_UTIL;