[Home] [Help]
PACKAGE BODY: APPS.POS_GLOBAL_VARS_SV
Source
1 PACKAGE BODY POS_GLOBAL_VARS_SV AS
2 /* $Header: POSMESGB.pls 115.1 99/10/01 09:14:56 porting ship $*/
3
4
5
6
7
8
9 /* -------------- Public Procedure Implementation -------------- */
10
11 /* InitializeMessageArray
12 * ----------------------
13 */
14 PROCEDURE InitializeMessageArray IS
15
16 CURSOR c_messageName IS
17 select distinct m.message_name
18 from fnd_new_messages m,
19 fnd_application a
20 where m.message_name like 'ICX_POS%'
21 and m.application_id = a.application_id
22 and a.application_short_name = 'ICX';
23
24 v_messageText VARCHAR2(2000);
25 v_c_info c_messageName%ROWTYPE;
26 x_progress VARCHAR2(3);
27
28 BEGIN
29
30 OPEN c_messageName;
31
32 htp.p('FND_MESSAGES = new Object();');
33 LOOP
34
35 FETCH c_messageName INTO v_c_info;
36 EXIT WHEN c_messageName%NOTFOUND;
37
38 x_progress := '001';
39 v_messageText := fnd_message.get_string('ICX', v_c_info.message_name);
40
41 -- replace carriage return with \n for javascript.
42
43 v_messageText := replace(v_messageText, '
44 ', '\n');
45
46 htp.p('FND_MESSAGES["' || v_c_info.message_name ||
47 '"] = ' || '"' || v_messageText || '";' );
48
49 END LOOP;
50
51 CLOSE c_messageName;
52
53
54
55 EXCEPTION
56 WHEN OTHERS THEN
57 -- should probably close the cursor if it is already open.
58 -- also need some trace messages
59 NULL;
60
61
62 END InitializeMessageArray;
63
64
65
66 /* InitializeOtherVars
67 * -------------------
68 */
69 PROCEDURE InitializeOtherVars(p_scriptName VARCHAR2) IS
70 BEGIN
71
72 htp.p('var scriptName = "' || p_scriptName || '";');
73 htp.p('var whereAmI = "SELECT";');
74 htp.p('top.IS_TOP = true;');
75
76 END InitializeOtherVars;
77
78
79 END POS_GLOBAL_VARS_SV;