DBA Data[Home] [Help]

APPS.MSD_PURGE dependencies on MSD_CS_DATA

Line 10: * which information is deleted from the msd_cs_data table.

6: * information in the headers table for custom streams. There are
7: * two important cases:
8: *
9: * 1. When the date is specified: In this case it is not known
10: * which information is deleted from the msd_cs_data table.
11: * Therfore, each header needs to be checked if a row
12: * exists in the msd_cs_data table that refers to it.
13: *
14: * 2. When no date is specified the data from msd_cs_data_headers

Line 12: * exists in the msd_cs_data table that refers to it.

8: *
9: * 1. When the date is specified: In this case it is not known
10: * which information is deleted from the msd_cs_data table.
11: * Therfore, each header needs to be checked if a row
12: * exists in the msd_cs_data table that refers to it.
13: *
14: * 2. When no date is specified the data from msd_cs_data_headers
15: * can immediately be deleted.
16: */

Line 14: * 2. When no date is specified the data from msd_cs_data_headers

10: * which information is deleted from the msd_cs_data table.
11: * Therfore, each header needs to be checked if a row
12: * exists in the msd_cs_data table that refers to it.
13: *
14: * 2. When no date is specified the data from msd_cs_data_headers
15: * can immediately be deleted.
16: */
17:
18: /* If given the name of a stream this provides the definition id.

Line 46: TYPE cs_data_id_tab is table of msd_cs_data.cs_data_id%TYPE;

42: p_cs_designator IN varchar2,
43: p_from_date IN date,
44: p_to_date IN date ) IS
45:
46: TYPE cs_data_id_tab is table of msd_cs_data.cs_data_id%TYPE;
47:
48: t_cs_data_id cs_data_id_tab;
49:
50:

Line 53: from msd_cs_data

49:
50:
51: cursor get_cs_data is
52: select cs_data_id
53: from msd_cs_data
54: where cs_definition_id in (select cs_definition_id
55: from msd_cs_definitions
56: where cs_definition_id = nvl(p_cs_definition_id , cs_definition_id)
57: and ((p_cs_definition_id is not null) or

Line 77: DELETE FROM msd_cs_data

73:
74: if (t_cs_data_id.exists(1)) then
75:
76: FORALL i IN t_cs_data_id.FIRST..t_cs_data_id.LAST
77: DELETE FROM msd_cs_data
78: WHERE cs_data_id = t_cs_data_id(i);
79:
80: FORALL i IN t_cs_data_id.FIRST..t_cs_data_id.LAST
81: DELETE FROM msd_cs_data_ds

Line 81: DELETE FROM msd_cs_data_ds

77: DELETE FROM msd_cs_data
78: WHERE cs_data_id = t_cs_data_id(i);
79:
80: FORALL i IN t_cs_data_id.FIRST..t_cs_data_id.LAST
81: DELETE FROM msd_cs_data_ds
82: WHERE cs_data_id = t_cs_data_id(i);
83: else
84: exit;
85: end if;

Line 104: delete from msd_cs_data_headers

100: p_cs_name IN VARCHAR2) IS
101:
102: begin
103:
104: delete from msd_cs_data_headers
105: where instance = nvl(p_instance_id, instance)
106: and cs_definition_id = nvl(p_cs_def_id, cs_definition_id)
107: and cs_name = nvl(p_cs_name, cs_name);
108:

Line 114: /* Check for each header whether it contains a child row in msd_cs_data.

110:
111: end delete_cs_headers;
112:
113:
114: /* Check for each header whether it contains a child row in msd_cs_data.
115: * This procedure is called when date parameters are entered in purge.
116: */
117: procedure check_cs_headers (p_instance_id IN NUMBER,
118: p_cs_def_id IN NUMBER,

Line 125: from msd_cs_data

121: x_num_rows number := 1;
122:
123: cursor check_cs_data(p_instance_id in NUMBER, p_cs_id in number, p_cs_name in VARCHAR2) is
124: select 1
125: from msd_cs_data
126: where attribute_1 = p_instance_id
127: and cs_definition_id = p_cs_id
128: and cs_name = p_cs_name
129: and rownum = x_num_rows;

Line 133: from msd_cs_data_headers

129: and rownum = x_num_rows;
130:
131: cursor check_cs_data_headers is
132: select *
133: from msd_cs_data_headers
134: where instance = nvl(p_instance_id, instance)
135: and cs_definition_id = nvl(p_cs_def_id, cs_definition_id)
136: and cs_name = nvl(p_cs_name, cs_name)
137: and exists ( select 1

Line 139: where csd.cs_definition_id = msd_cs_data_headers.cs_definition_id

135: and cs_definition_id = nvl(p_cs_def_id, cs_definition_id)
136: and cs_name = nvl(p_cs_name, cs_name)
137: and exists ( select 1
138: from msd_cs_definitions csd
139: where csd.cs_definition_id = msd_cs_data_headers.cs_definition_id
140: and csd.system_flag = 'C' );
141:
142: x_count number := 0;
143:

Line 164: /* This procedure is called after data is deleted from msd_cs_data.

160:
161: end check_cs_headers;
162:
163:
164: /* This procedure is called after data is deleted from msd_cs_data.
165: * It will determine whether dates are defined and determine
166: * whether headers need to check for children in msd_cs_data
167: */
168:

Line 166: * whether headers need to check for children in msd_cs_data

162:
163:
164: /* This procedure is called after data is deleted from msd_cs_data.
165: * It will determine whether dates are defined and determine
166: * whether headers need to check for children in msd_cs_data
167: */
168:
169: procedure purge_cs_data_headers(p_instance_id IN NUMBER,
170: p_from_date IN VARCHAR2,

Line 177: /* Date is included so the msd_cs_data needs to be checked for rows

173: p_cs_name IN VARCHAR2) IS
174:
175: begin
176:
177: /* Date is included so the msd_cs_data needs to be checked for rows
178: * that are deleted.
179: */
180:
181: if (p_from_date is not null) or (p_to_date is not null) then

Line 183: /* Deletes data in headers checking date-filtered deletes in msd_cs_data */

179: */
180:
181: if (p_from_date is not null) or (p_to_date is not null) then
182:
183: /* Deletes data in headers checking date-filtered deletes in msd_cs_data */
184: check_cs_headers (p_instance_id, p_cs_def_id, p_cs_name);
185:
186: else
187:

Line 190: delete from msd_cs_data_headers

186: else
187:
188: /* Deletes directly from headers since no date filtering done. */
189:
190: delete from msd_cs_data_headers
191: where instance = nvl(p_instance_id, instance)
192: and cs_definition_id = nvl(p_cs_def_id, cs_definition_id)
193: and cs_name = nvl(p_cs_name, cs_name)
194: and exists ( select 1

Line 196: where csd.cs_definition_id = msd_cs_data_headers.cs_definition_id

192: and cs_definition_id = nvl(p_cs_def_id, cs_definition_id)
193: and cs_name = nvl(p_cs_name, cs_name)
194: and exists ( select 1
195: from msd_cs_definitions csd
196: where csd.cs_definition_id = msd_cs_data_headers.cs_definition_id
197: and csd.system_flag = 'C' );
198:
199: end if;
200:

Line 203: /* Check for each header whether it contains a child row in msd_cs_data.

199: end if;
200:
201: end purge_cs_data_headers;
202:
203: /* Check for each header whether it contains a child row in msd_cs_data.
204: * This procedure is called when date parameters are entered in purge.
205: */
206: procedure check_mfg_headers (p_instance_id IN NUMBER,
207: p_cs_def_id IN NUMBER,

Line 221: from msd_cs_data_headers

217: and rownum = x_num_rows;
218:
219: cursor check_cs_data_headers is
220: select *
221: from msd_cs_data_headers
222: where instance = nvl(p_instance_id, instance)
223: and cs_definition_id = nvl(p_cs_def_id, cs_definition_id)
224: and cs_name = nvl(p_cs_name, cs_name);
225:

Line 260: /* Date is included so the msd_cs_data needs to be checked for rows

256: p_cs_name IN VARCHAR2) IS
257:
258: begin
259:
260: /* Date is included so the msd_cs_data needs to be checked for rows
261: * that are deleted.
262: */
263:
264: if (p_l_date <> 0) then

Line 266: /* Deletes data in headers checking date-filtered deletes in msd_cs_data */

262: */
263:
264: if (p_l_date <> 0) then
265:
266: /* Deletes data in headers checking date-filtered deletes in msd_cs_data */
267: check_mfg_headers (p_instance_id, p_cs_def_id, p_cs_name);
268:
269: else
270:

Line 278: /* Check for each header whether it contains a child row in msd_cs_data.

274: end if;
275:
276: end purge_mfg_data_headers;
277:
278: /* Check for each header whether it contains a child row in msd_cs_data.
279: * This procedure is called when date parameters are entered in purge.
280: */
281: procedure check_int_headers (p_instance_id IN NUMBER,
282: p_cs_def_id IN NUMBER,

Line 289: from msd_cs_data

285: x_num_rows number := 1;
286:
287: cursor check_int_data(p_instance_id in NUMBER, p_cs_id in number, p_cs_name in VARCHAR2) is
288: select 1
289: from msd_cs_data
290: where attribute_1 = p_instance_id
291: and cs_definition_id = p_cs_id
292: and cs_name = p_cs_name
293: and rownum = x_num_rows;

Line 297: from msd_cs_data_headers

293: and rownum = x_num_rows;
294:
295: cursor check_cs_data_headers is
296: select *
297: from msd_cs_data_headers
298: where instance = nvl(p_instance_id, instance)
299: and cs_definition_id = p_cs_def_id
300: and cs_name = nvl(p_cs_name, cs_name);
301:

Line 324: /* This procedure is called after data is deleted from msd_cs_data.

320:
321: end check_int_headers;
322:
323:
324: /* This procedure is called after data is deleted from msd_cs_data.
325: * It will determine whether dates are defined and determine
326: * whether headers need to check for children in msd_cs_data
327: */
328:

Line 326: * whether headers need to check for children in msd_cs_data

322:
323:
324: /* This procedure is called after data is deleted from msd_cs_data.
325: * It will determine whether dates are defined and determine
326: * whether headers need to check for children in msd_cs_data
327: */
328:
329: procedure purge_int_data_headers(p_instance_id IN NUMBER,
330: p_from_date IN VARCHAR2,

Line 337: /* Date is included so the msd_cs_data needs to be checked for rows

333: p_cs_name IN VARCHAR2) IS
334:
335: begin
336:
337: /* Date is included so the msd_cs_data needs to be checked for rows
338: * that are deleted.
339: */
340:
341: if (p_from_date is not null) or (p_to_date is not null) then

Line 343: /* Deletes data in headers checking date-filtered deletes in msd_cs_data */

339: */
340:
341: if (p_from_date is not null) or (p_to_date is not null) then
342:
343: /* Deletes data in headers checking date-filtered deletes in msd_cs_data */
344: check_int_headers (p_instance_id, p_cs_def_id, p_cs_name);
345:
346: else
347:

Line 350: delete from msd_cs_data_headers

346: else
347:
348: /* Deletes directly from headers since no date filtering done. */
349:
350: delete from msd_cs_data_headers
351: where instance = nvl(p_instance_id, instance)
352: and cs_definition_id = p_cs_def_id
353: and cs_name = nvl(p_cs_name, cs_name);
354:

Line 789: delete from msd_cs_data_ds;

785: delete from msd_level_values_ds;
786:
787: delete from msd_dp_parameters_ds;
788:
789: delete from msd_cs_data_ds;
790:
791: update msd_demand_plans
792: set build_stripe_level_pk = null,
793: build_stripe_stream_name = null,