DBA Data[Home] [Help]

APPS.OKC_CONTEXT dependencies on OKC_CONTEXT

Line 1: Package body OKC_CONTEXT AS

1: Package body OKC_CONTEXT AS
2: /*$Header: OKCPCTXB.pls 120.7.12010000.2 2010/02/10 08:41:17 spingali ship $*/
3: l_debug VARCHAR2(1) := NVL(FND_PROFILE.VALUE('AFLOG_ENABLED'),'N');
4:
5: g_okc_organization_id NUMBER;

Line 11: -- Procedure sets the okc context values for Multi Org. If the parameters are not passed procedure reads

7: g_moac_access_mode VARCHAR2(3);
8: g_moac_current_org_id NUMBER;
9:
10: -- Procedure set_okc_org_context(p_org_id IN NUMBER DEFAULT NULL,p_organization_id IN NUMBER DEFAULT NULL)
11: -- Procedure sets the okc context values for Multi Org. If the parameters are not passed procedure reads
12: -- the calue from user profile options.
13:
14: PROCEDURE set_okc_org_context(p_org_id IN NUMBER ,
15: p_organization_id IN NUMBER ) IS

Line 52: DBMS_SESSION.SET_CONTEXT('OKC_CONTEXT','ORG_ID',NVL(FND_PROFILE.VALUE('ORG_ID'),-99));

48: -- Sets the org_id to a context namespace attribute.
49: IF p_org_id IS NULL OR p_org_id = -99 THEN
50: --mmadhavi changes for MOAC project
51: /*
52: DBMS_SESSION.SET_CONTEXT('OKC_CONTEXT','ORG_ID',NVL(FND_PROFILE.VALUE('ORG_ID'),-99));
53: ELSE
54: DBMS_SESSION.SET_CONTEXT('OKC_CONTEXT','ORG_ID',p_org_id);
55: END IF;
56: */

Line 54: DBMS_SESSION.SET_CONTEXT('OKC_CONTEXT','ORG_ID',p_org_id);

50: --mmadhavi changes for MOAC project
51: /*
52: DBMS_SESSION.SET_CONTEXT('OKC_CONTEXT','ORG_ID',NVL(FND_PROFILE.VALUE('ORG_ID'),-99));
53: ELSE
54: DBMS_SESSION.SET_CONTEXT('OKC_CONTEXT','ORG_ID',p_org_id);
55: END IF;
56: */
57:
58: mo_utils.get_default_ou(l_default_org_id, l_default_ou_name, l_ou_count);

Line 80: DBMS_SESSION.SET_CONTEXT('OKC_CONTEXT','ORGANIZATION_ID',

76:
77: IF p_organization_id IS NULL THEN
78: -- Added By Jvorugan for Bug:4729941
79: IF l_org_id IS NOT NULL THEN
80: DBMS_SESSION.SET_CONTEXT('OKC_CONTEXT','ORGANIZATION_ID',
81: NVL(OE_PROFILE.VALUE('OE_ORGANIZATION_ID',l_org_id),-99)); --Mmadhavi replaced get_okc_org_id with l_org_id
82: ELSE
83: DBMS_SESSION.SET_CONTEXT('OKC_CONTEXT','ORGANIZATION_ID',-99);
84: END IF;

Line 83: DBMS_SESSION.SET_CONTEXT('OKC_CONTEXT','ORGANIZATION_ID',-99);

79: IF l_org_id IS NOT NULL THEN
80: DBMS_SESSION.SET_CONTEXT('OKC_CONTEXT','ORGANIZATION_ID',
81: NVL(OE_PROFILE.VALUE('OE_ORGANIZATION_ID',l_org_id),-99)); --Mmadhavi replaced get_okc_org_id with l_org_id
82: ELSE
83: DBMS_SESSION.SET_CONTEXT('OKC_CONTEXT','ORGANIZATION_ID',-99);
84: END IF;
85: -- End of changes for Bug:4729941
86: ELSE
87: DBMS_SESSION.SET_CONTEXT('OKC_CONTEXT','ORGANIZATION_ID',p_organization_id);

Line 87: DBMS_SESSION.SET_CONTEXT('OKC_CONTEXT','ORGANIZATION_ID',p_organization_id);

83: DBMS_SESSION.SET_CONTEXT('OKC_CONTEXT','ORGANIZATION_ID',-99);
84: END IF;
85: -- End of changes for Bug:4729941
86: ELSE
87: DBMS_SESSION.SET_CONTEXT('OKC_CONTEXT','ORGANIZATION_ID',p_organization_id);
88: END IF;
89:
90: -- Sets the Inventory business_group_id to a context namespace attribute.
91:

Line 92: --OPEN c_bus_grp(sys_context('OKC_CONTEXT','ORG_ID'));

88: END IF;
89:
90: -- Sets the Inventory business_group_id to a context namespace attribute.
91:
92: --OPEN c_bus_grp(sys_context('OKC_CONTEXT','ORG_ID'));
93: OPEN c_bus_grp(l_org_id); --Mmadhavi replaced get_okc_org_id with l_org_id
94: FETCH c_bus_grp INTO l_business_group_id;
95: CLOSE c_bus_grp;
96:

Line 99: DBMS_SESSION.SET_CONTEXT('OKC_CONTEXT','BUSINESS_GROUP_ID',l_business_group_id);

95: CLOSE c_bus_grp;
96:
97: l_business_group_id := NVL(l_business_group_id,-99);
98:
99: DBMS_SESSION.SET_CONTEXT('OKC_CONTEXT','BUSINESS_GROUP_ID',l_business_group_id);
100:
101: END set_okc_org_context;
102:
103: -- Procedure set_okc_org_context(p_chr_id IN NUMBER)

Line 104: -- Procedure sets the okc context values for Multi Org. These org values are obtained from the okc_k_headers_v

100:
101: END set_okc_org_context;
102:
103: -- Procedure set_okc_org_context(p_chr_id IN NUMBER)
104: -- Procedure sets the okc context values for Multi Org. These org values are obtained from the okc_k_headers_v
105: -- for the chr_id passed in.
106:
107: PROCEDURE set_okc_org_context(p_chr_id IN NUMBER) IS
108: CURSOR c_chr IS

Line 134: DBMS_SESSION.SET_CONTEXT('OKC_CONTEXT','CHR_ID',p_chr_id); -- bug#2155926

130: l_business_group_id NUMBER;
131: l_org_id hr_operating_units.organization_id%TYPE;
132:
133: BEGIN
134: DBMS_SESSION.SET_CONTEXT('OKC_CONTEXT','CHR_ID',p_chr_id); -- bug#2155926
135:
136: FOR l_c_chr IN c_chr
137: LOOP
138: --DBMS_SESSION.SET_CONTEXT('OKC_CONTEXT','ORG_ID',l_c_chr.authoring_org_id);

Line 138: --DBMS_SESSION.SET_CONTEXT('OKC_CONTEXT','ORG_ID',l_c_chr.authoring_org_id);

134: DBMS_SESSION.SET_CONTEXT('OKC_CONTEXT','CHR_ID',p_chr_id); -- bug#2155926
135:
136: FOR l_c_chr IN c_chr
137: LOOP
138: --DBMS_SESSION.SET_CONTEXT('OKC_CONTEXT','ORG_ID',l_c_chr.authoring_org_id);
139: --mmadhavi for MOAC project
140: mo_global.set_policy_context('S', l_c_chr.authoring_org_id);
141: DBMS_SESSION.SET_CONTEXT('OKC_CONTEXT','ORGANIZATION_ID',l_c_chr.inv_organization_id);
142: l_org_id := l_c_chr.authoring_org_id ;

Line 141: DBMS_SESSION.SET_CONTEXT('OKC_CONTEXT','ORGANIZATION_ID',l_c_chr.inv_organization_id);

137: LOOP
138: --DBMS_SESSION.SET_CONTEXT('OKC_CONTEXT','ORG_ID',l_c_chr.authoring_org_id);
139: --mmadhavi for MOAC project
140: mo_global.set_policy_context('S', l_c_chr.authoring_org_id);
141: DBMS_SESSION.SET_CONTEXT('OKC_CONTEXT','ORGANIZATION_ID',l_c_chr.inv_organization_id);
142: l_org_id := l_c_chr.authoring_org_id ;
143: END LOOP;
144:
145: -- Sets the Inventory business_group_id to a context namespace attribute.

Line 153: DBMS_SESSION.SET_CONTEXT('OKC_CONTEXT','BUSINESS_GROUP_ID',l_business_group_id);

149: CLOSE c_bus_grp;
150:
151: l_business_group_id := NVL(l_business_group_id,-99);
152:
153: DBMS_SESSION.SET_CONTEXT('OKC_CONTEXT','BUSINESS_GROUP_ID',l_business_group_id);
154: END set_okc_org_context;
155:
156: -- Function get_okc_organization_id RETURN NUMBER
157: -- Returns the Inventory organization id.

Line 161: RETURN(sys_context('OKC_CONTEXT','ORGANIZATION_ID'));

157: -- Returns the Inventory organization id.
158:
159: FUNCTION get_okc_organization_id RETURN NUMBER IS
160: BEGIN
161: RETURN(sys_context('OKC_CONTEXT','ORGANIZATION_ID'));
162: END get_okc_organization_id;
163:
164: -- Function get_okc_org_id RETURN NUMBER
165: -- Returns the org_id.

Line 169: --RETURN(sys_context('OKC_CONTEXT','ORG_ID'));

165: -- Returns the org_id.
166:
167: FUNCTION get_okc_org_id RETURN NUMBER IS
168: BEGIN
169: --RETURN(sys_context('OKC_CONTEXT','ORG_ID'));
170: --mmadhavi for MOAC
171: RETURN nvl(mo_global.get_current_org_id,-99);
172: END get_okc_org_id;
173:

Line 177: -- OKC_CONTEXT : ORGANIZATION_ID

173:
174:
175: --new procedure added to save the current OKC and MOAC contexts
176: --the following contexts are saved
177: -- OKC_CONTEXT : ORGANIZATION_ID
178: -- OKC_CONTEXT : BUSINESS_GROUP_ID
179: -- MOAC (via MO_GLOBAL.set_policy_context)
180: -- MO_GLOBAL.g_access_mode (MULTI_ORG : ACCESS_MODE)
181: -- MO_GLOBAL.g_current_org_id (MULTI_ORG2 : CURRENT_ORG_ID)

Line 178: -- OKC_CONTEXT : BUSINESS_GROUP_ID

174:
175: --new procedure added to save the current OKC and MOAC contexts
176: --the following contexts are saved
177: -- OKC_CONTEXT : ORGANIZATION_ID
178: -- OKC_CONTEXT : BUSINESS_GROUP_ID
179: -- MOAC (via MO_GLOBAL.set_policy_context)
180: -- MO_GLOBAL.g_access_mode (MULTI_ORG : ACCESS_MODE)
181: -- MO_GLOBAL.g_current_org_id (MULTI_ORG2 : CURRENT_ORG_ID)
182: PROCEDURE save_current_contexts

Line 187: g_okc_organization_id := sys_context('OKC_CONTEXT', 'ORGANIZATION_ID');

183: IS
184: BEGIN
185: g_moac_access_mode := MO_GLOBAL.get_access_mode;
186: g_moac_current_org_id := MO_GLOBAL.get_current_org_id;
187: g_okc_organization_id := sys_context('OKC_CONTEXT', 'ORGANIZATION_ID');
188: g_okc_business_group_id := sys_context('OKC_CONTEXT','BUSINESS_GROUP_ID');
189: END save_current_contexts;
190:
191:

Line 188: g_okc_business_group_id := sys_context('OKC_CONTEXT','BUSINESS_GROUP_ID');

184: BEGIN
185: g_moac_access_mode := MO_GLOBAL.get_access_mode;
186: g_moac_current_org_id := MO_GLOBAL.get_current_org_id;
187: g_okc_organization_id := sys_context('OKC_CONTEXT', 'ORGANIZATION_ID');
188: g_okc_business_group_id := sys_context('OKC_CONTEXT','BUSINESS_GROUP_ID');
189: END save_current_contexts;
190:
191:
192:

Line 199: DBMS_SESSION.SET_CONTEXT('OKC_CONTEXT','ORGANIZATION_ID',g_okc_organization_id);

195: /*PROCEDURE restore_contexts
196: IS
197: BEGIN
198: MO_GLOBAL.set_policy_context(g_moac_access_mode, g_moac_current_org_id);
199: DBMS_SESSION.SET_CONTEXT('OKC_CONTEXT','ORGANIZATION_ID',g_okc_organization_id);
200: DBMS_SESSION.SET_CONTEXT('OKC_CONTEXT','ORGANIZATION_ID',g_okc_business_group_id);
201: END restore_contexts;*/
202:
203: ---modified for bug8936332

Line 200: DBMS_SESSION.SET_CONTEXT('OKC_CONTEXT','ORGANIZATION_ID',g_okc_business_group_id);

196: IS
197: BEGIN
198: MO_GLOBAL.set_policy_context(g_moac_access_mode, g_moac_current_org_id);
199: DBMS_SESSION.SET_CONTEXT('OKC_CONTEXT','ORGANIZATION_ID',g_okc_organization_id);
200: DBMS_SESSION.SET_CONTEXT('OKC_CONTEXT','ORGANIZATION_ID',g_okc_business_group_id);
201: END restore_contexts;*/
202:
203: ---modified for bug8936332
204:

Line 208: DBMS_SESSION.SET_CONTEXT('OKC_CONTEXT','ORGANIZATION_ID',g_okc_organization_id);

204:
205: PROCEDURE restore_contexts IS
206: BEGIN
207: MO_GLOBAL.set_policy_context(g_moac_access_mode, g_moac_current_org_id);
208: DBMS_SESSION.SET_CONTEXT('OKC_CONTEXT','ORGANIZATION_ID',g_okc_organization_id);
209: DBMS_SESSION.SET_CONTEXT('OKC_CONTEXT','BUSINESS_GROUP_ID',g_okc_business_group_id);
210: END restore_contexts;
211:
212: ---modified for bug8936332

Line 209: DBMS_SESSION.SET_CONTEXT('OKC_CONTEXT','BUSINESS_GROUP_ID',g_okc_business_group_id);

205: PROCEDURE restore_contexts IS
206: BEGIN
207: MO_GLOBAL.set_policy_context(g_moac_access_mode, g_moac_current_org_id);
208: DBMS_SESSION.SET_CONTEXT('OKC_CONTEXT','ORGANIZATION_ID',g_okc_organization_id);
209: DBMS_SESSION.SET_CONTEXT('OKC_CONTEXT','BUSINESS_GROUP_ID',g_okc_business_group_id);
210: END restore_contexts;
211:
212: ---modified for bug8936332
213:

Line 214: END okc_context;

210: END restore_contexts;
211:
212: ---modified for bug8936332
213:
214: END okc_context;