DBA Data[Home] [Help]

PACKAGE BODY: APPS.WIP_DIAG_REPETITIVE

Source


1 package body WIP_DIAG_REPETITIVE as
2 /* $Header: WIPDREPB.pls 120.0.12000000.1 2007/07/10 10:33:28 mraman noship $ */
3 
4 PROCEDURE Uncosted_mat_txn_rep(inputs IN  JTF_DIAG_INPUTTBL,
5                         report OUT NOCOPY JTF_DIAG_REPORT,
6                         reportClob OUT NOCOPY CLOB) IS
7  reportStr   LONG;           -- REPORT
8  sqltxt    VARCHAR2(9999);  -- SQL select statement
9  c_username  VARCHAR2(50);   -- accept input for username
10  statusStr   VARCHAR2(50);   -- SUCCESS or FAILURE
11  errStr      VARCHAR2(4000); -- error message
12  fixInfo     VARCHAR2(4000); -- fix tip
13  isFatal     VARCHAR2(50);   -- TRUE or FALSE
14  dummy_num   NUMBER;
15  row_limit   NUMBER;
16  l_item_id   NUMBER;
17  l_org_id    NUMBER;
18  we_dyn_where_clause VARCHAR2(1000):= null;
19 BEGIN
20 JTF_DIAGNOSTIC_ADAPTUTIL.setUpVars;
21 JTF_DIAGNOSTIC_ADAPTUTIL.addStringToReport('@html');
22 JTF_DIAGNOSTIC_COREAPI.insert_style_sheet;
23 row_limit := 1000;
24 -- accept input
25 l_org_id := JTF_DIAGNOSTIC_ADAPTUTIL.getInputValue('OrganizationId',inputs);
26 
27 if (l_org_id IS NOT NULL) then
28    reportStr := '<U> Input Parameters : </U><BR>';
29    reportStr := reportStr || 'Organization Id = ' || l_org_id || ' <BR>';
30    JTF_DIAGNOSTIC_ADAPTUTIL.addStringToReport(reportClob,reportStr);
31 end if;
32 
33 if (l_org_id IS NOT NULL) then
34   we_dyn_where_clause := 'AND we.organization_id = '|| l_org_id  || ' ';
35 end if;
36 
37 sqltxt :=
38 'SELECT we.wip_entity_name Repetitive_Assembly,  '||
39 '       wl.line_code Repetitive_Line, '||
40 '       mmt.organization_id, '||
41 '       mmta.repetitive_schedule_id, '||
42 '       mmt.transaction_id, '||
43 '       mmt.transaction_source_id, '||
44 '       mmt.completion_transaction_id, '||
45 '       mmt.move_transaction_id, '||
46 '       mmt.costed_flag, '||
47 '       decode(mmt.transaction_action_id, '||
48 '             1, ''Issue'', '||
49 '            27, ''Receipt'', '||
50 '            30, ''Wip scrap'', '||
51 '            31, ''Assy Complete'', '||
52 '            32, ''Assy return'', '||
53 '            33, ''-ve CompIssue'', '||
54 '            34, ''-ve CompReturn'', '||
55 '            40, ''Inv Lot Split'', '||
56 '            41, ''Inv Lot Merge'', '||
57 '            42, ''Inv Lot Translate'', '||
58 '            42, ''Inv Lot Translate'', '||
59 '            mmt.transaction_action_id) txn_action_meaning, '||
60 '       mmt.error_code, '||
61 '       SubStrB(mmt.error_explanation, 1, 50) err_explain '||
62 'FROM   mtl_material_transactions mmt,  '||
63 '       wip_entities we, wip_lines wl, '||
64 '       mtl_material_txn_allocations mmta '||
65 'WHERE  mmt.transaction_source_type_id = 5 '||
66 'AND    mmt.costed_flag IN (''N'',''E'') '||
67 'AND    mmt.transaction_source_id = we.wip_entity_id '||
68 'AND    mmt.organization_id = we.organization_id '||
69 'AND    we.entity_type = 2 '||we_dyn_where_clause||
70 'AND    mmt.transaction_id = mmta.transaction_id '||
71 'AND    mmt.organization_id = mmta.organization_id '||
72 'AND    mmt.repetitive_line_id = wl.line_id '||
73 'AND    mmt.organization_id = wl.organization_id '||
74 'AND    NOT EXISTS '||
75 '       (SELECT ''x'' FROM wip_period_balances wpb '||
76 '        WHERE  WPB.WIP_ENTITY_ID = MMT.TRANSACTION_SOURCE_ID '||
77 '        AND    WPB.REPETITIVE_SCHEDULE_ID = MMTA.REPETITIVE_SCHEDULE_ID '||
78 '        AND    WPB.ORGANIZATION_ID = MMT.ORGANIZATION_ID '||
79 '        AND    WPB.ACCT_PERIOD_ID = mmt.ACCT_PERIOD_ID) '||
80 'ORDER BY mmt.organization_id, we.wip_entity_name, mmt.transaction_id';
81 
82 dummy_num:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt,
83 		'Transactions that erred due to missing record in WIP_PERIOD_BALANCES for Repetitive Schedule. (CST_NO_BALANCE_ROW)',true,null,'Y',row_limit);
84 
85 IF (dummy_num = row_limit) THEN
86    JTF_DIAGNOSTIC_COREAPI.Line_Out('<BR> Output limited to the first '|| row_limit || ' rows to prevent an excessively large output file. <BR>');
87 END IF;
88 
89 IF (dummy_num > 0) THEN
90   reportStr := 'The rows returned above signify data-inconsistency in material transactions related to repetitive schedules. These are erred transactions due to missing record in WIP_PERIOD_BALANCES.';
91   JTF_DIAGNOSTIC_COREAPI.ErrorPrint(reportStr);
92   JTF_DIAGNOSTIC_COREAPI.ActionErrorLink('Please refer to Metalink note ', 402202.1, 'to get the root-cause patch and steps to correct the data.<BR><BR>');
93 END IF;
94 
95 statusStr := 'SUCCESS';
96 isFatal := 'FALSE';
97 fixInfo := 'OK';
98 errStr :='No Error!';
99 
100 sqltxt :=
101 'SELECT we.wip_entity_name Repetitive_Assembly,  '||
102 '       wl.line_code Repetitive_Line, '||
103 '       mmt.organization_id, '||
104 '       mmt.transaction_id, '||
105 '       mmt.transaction_source_id, '||
106 '       mmt.completion_transaction_id, ' ||
107 '       mmt.move_transaction_id, ' ||
108 '       mmt.organization_id, ' ||
109 '       mmt.costed_flag, ' ||
110 '       decode(mmt.transaction_action_id, ' ||
111 '                  1, ''Issue'', ' ||
112 '                  27, ''Receipt'', ' ||
113 '            30, ''Wip scrap'', ' ||
114 '            31, ''Assy Complete'', ' ||
115 '            32, ''Assy return'', ' ||
116 '            33, ''-ve CompIssue'', ' ||
117 '            34, ''-ve CompReturn'', ' ||
118 '            40, ''Inv Lot Split'', ' ||
119 '            41, ''Inv Lot Merge'', ' ||
120 '            42, ''Inv Lot Translate'', ' ||
121 '            42, ''Inv Lot Translate'', ' ||
122 '             mmt.transaction_action_id) txn_action_meaning, ' ||
123 '       mmt.error_code, ' ||
124 '       SubStrB(mmt.error_explanation, 1, 50) err_explain ' ||
125 'FROM   mtl_material_transactions mmt,  ' ||
126 '       wip_entities we, ' ||
127 '       wip_lines wl '||
128 'WHERE  mmt.transaction_action_id IN (1, 27, 33, 34) ' ||
129 'AND    mmt.transaction_source_type_id = 5 ' ||
130 'AND    mmt.costed_flag IN (''N'',''E'') ' ||
131 'AND    mmt.completion_transaction_id IS NULL  ' ||
132 'AND    mmt.move_transaction_id IS NULL  ' ||
133 'AND    mmt.transaction_source_id = we.wip_entity_id ' ||
134 'AND    mmt.organization_id = we.organization_id ' ||
135 'AND    we.entity_type = 2 ' ||we_dyn_where_clause||
136 'AND    mmt.repetitive_line_id = wl.line_id '||
137 'AND    we.organization_id = wl.organization_id '||
138 'AND    NOT EXISTS (SELECT 1 ' ||
139 '                   FROM   mtl_material_txn_allocations mmta ' ||
140 '                   WHERE  mmta.transaction_id = mmt.transaction_id ' ||
141 '                   AND    mmta.organization_id = mmt.organization_id) '||
142 'ORDER BY mmt.organization_id, we.wip_entity_name, mmt.transaction_id';
143 
144 dummy_num:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt,
145 		'Missing Allocations for Repetitive Schedule Transactions resulted from Manual Transaction or Component Pick Release process.',true,null,'Y',row_limit);
146 
147 IF (dummy_num = row_limit) THEN
148    JTF_DIAGNOSTIC_COREAPI.Line_Out('<BR> Output limited to the first '|| row_limit ||' rows to prevent an excessively large output file. <BR>');
149 END IF;
150 
151 IF (dummy_num > 0) THEN
152   reportStr := 'The rows returned above signify data-inconsistency in material transactions related to repetitive schedules. ' ||
153                'These are transactions resulted from Manual Transaction or Component Pick Release process, in error due to missing repetitive schedule allocations.';
154   JTF_DIAGNOSTIC_COREAPI.ErrorPrint(reportStr);
155   JTF_DIAGNOSTIC_COREAPI.ActionErrorLink('Please refer to Metalink note ', 402202.1, 'to get the root-cause patch and steps to correct the data.<BR><BR>');
156 END IF;
157 
158 statusStr := 'SUCCESS';
159 isFatal := 'FALSE';
160 fixInfo := 'OK';
161 errStr :='No Error!';
162 
163 sqltxt :=
164 'SELECT we.wip_entity_name Repetitive_Assembly,  '||
165 '       wl.line_code Repetitive_Line, '||
166 '       mmt.organization_id, '||
167 '       mmt.transaction_id, '||
168 '       mmt.transaction_source_id, '||
169 '       mmt.completion_transaction_id, ' ||
170 '       mmt.move_transaction_id, ' ||
171 '       mmt.organization_id, ' ||
172 '       mmt.costed_flag, ' ||
173 '       decode(mmt.transaction_action_id, ' ||
174 '                  1, ''Issue'', ' ||
175 '                  27, ''Receipt'', ' ||
176 '                30, ''Wip scrap'', ' ||
177 '                31, ''Assy Complete'', ' ||
178 '                32, ''Assy return'', ' ||
179 '                33, ''-ve CompIssue'', ' ||
180 '                34, ''-ve CompReturn'', ' ||
181 '                40, ''Inv Lot Split'', ' ||
182 '                41, ''Inv Lot Merge'', ' ||
183 '                42, ''Inv Lot Translate'', ' ||
184 '                42, ''Inv Lot Translate'', ' ||
185 '             mmt.transaction_action_id) txn_action_meaning, ' ||
186 '       mmt.error_code, ' ||
187 '       SubStrB(mmt.error_explanation, 1, 50) err_explain ' ||
188 'FROM   mtl_material_transactions mmt,  ' ||
189 '       wip_entities we, ' ||
190 '       wip_lines wl ' ||
191 'WHERE  mmt.transaction_action_id IN (1, 27, 33, 34) ' ||
192 'AND    mmt.transaction_source_type_id = 5 ' ||
193 'AND    mmt.costed_flag IN (''N'',''E'')   ' ||
194 'AND    mmt.move_transaction_id IS NOT NULL  ' ||
195 'AND    mmt.transaction_source_id = we.wip_entity_id ' ||
196 'AND    mmt.organization_id = we.organization_id ' ||
197 'AND    we.entity_type = 2 ' ||we_dyn_where_clause||
198 'AND    mmt.repetitive_line_id = wl.line_id '||
199 'AND    mmt.organization_id = wl.organization_id '||
200 'AND    NOT EXISTS (SELECT 1 ' ||
201 '                   FROM   mtl_material_txn_allocations mmta ' ||
202 '                   WHERE  mmta.transaction_id = mmt.transaction_id ' ||
203 '                   AND    mmta.organization_id = mmt.organization_id) '||
204 'ORDER BY mmt.organization_id, we.wip_entity_name, mmt.transaction_id';
205 
206 
207 dummy_num:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt,
208        'Missing Allocations for Repetitive Schedule Transactions resulted from Move Transactions.',true,null,'Y',row_limit);
209 
210 IF (dummy_num = row_limit) THEN
211    JTF_DIAGNOSTIC_COREAPI.Line_Out('<BR> Output limited to the first '|| row_limit ||' rows to prevent an excessively large output file. <BR>');
212 END IF;
213 
214 IF (dummy_num > 0) THEN
215   reportStr := 'The rows returned above signify data-inconsistency in material transactions related to repetitive schedules. ' ||
216                'These are transactions resulted from Move Transactions, in error due to missing repetitive schedule allocations.';
217   JTF_DIAGNOSTIC_COREAPI.ErrorPrint(reportStr);
218   JTF_DIAGNOSTIC_COREAPI.ActionErrorLink('Please refer to Metalink note ', 402202.1, 'to get the root-cause patch and steps to correct the data.<BR><BR>');
219 END IF;
220 
221 statusStr := 'SUCCESS';
222 isFatal := 'FALSE';
223 fixInfo := 'OK';
224 errStr :='No Error!';
225 
226 sqltxt :=
227 'SELECT we.wip_entity_name Repetitive_Assembly,  '||
228 '       wl.line_code Repetitive_Line, '||
229 '       mmt.organization_id, '||
230 '       mmt.transaction_id, '||
231 '       mmt.transaction_source_id, '||
232 '       mmt.completion_transaction_id, ' ||
233 '       mmt.move_transaction_id, ' ||
234 '       mmt.organization_id, ' ||
235 '       mmt.costed_flag, ' ||
236 '       decode(mmt.transaction_action_id, ' ||
237 '                  1, ''Issue'', ' ||
238 '                  27, ''Receipt'', ' ||
239 '                30, ''Wip scrap'', ' ||
240 '                31, ''Assy Complete'', ' ||
241 '                32, ''Assy return'', ' ||
242 '                33, ''-ve CompIssue'', ' ||
243 '                34, ''-ve CompReturn'', ' ||
244 '                40, ''Inv Lot Split'', ' ||
245 '                41, ''Inv Lot Merge'', ' ||
246 '                42, ''Inv Lot Translate'', ' ||
247 '                42, ''Inv Lot Translate'', ' ||
248 '             mmt.transaction_action_id) txn_action_meaning, ' ||
249 '       mmt.error_code, ' ||
250 '       SubStrB(mmt.error_explanation, 1, 50) err_explain ' ||
251 'FROM   mtl_material_transactions mmt,  ' ||
252 '       wip_entities we, ' ||
253 '       wip_lines wl '||
254 'WHERE  mmt.transaction_action_id IN (1, 27, 33, 34) ' ||
255 'AND    mmt.transaction_source_type_id = 5 ' ||
256 'AND    mmt.costed_flag IN (''N'',''E'')   ' ||
257 'AND    mmt.move_transaction_id IS NULL  ' ||
258 'AND    mmt.completion_transaction_id IS NOT NULL ' ||
259 'AND    mmt.transaction_source_id = we.wip_entity_id ' ||
260 'AND    mmt.organization_id = we.organization_id ' ||
261 'AND    we.entity_type = 2 ' ||we_dyn_where_clause||
262 'AND    mmt.repetitive_line_id = wl.line_id '||
263 'AND    mmt.organization_id = wl.organization_id '||
264 'AND    NOT EXISTS (SELECT 1 ' ||
265 '                   FROM   mtl_material_txn_allocations mmta ' ||
266 '                   WHERE  mmta.transaction_id = mmt.transaction_id ' ||
267 '                   AND    mmta.organization_id = mmt.organization_id) '||
268 'ORDER BY mmt.organization_id, we.wip_entity_name, mmt.transaction_id';
269 
270 dummy_num:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt,
271         'Missing Allocations for Repetitive Schedule Transactions resulted from Completion / Return / Scrap / Return From Scrap Transactions.',true,null,'Y',row_limit);
272 
273 IF (dummy_num = row_limit) THEN
274    JTF_DIAGNOSTIC_COREAPI.Line_Out('<BR> Output limited to the first '|| row_limit ||' rows to prevent an excessively large output file. <BR>');
275 END IF;
276 
277 IF (dummy_num > 0) THEN
278   reportStr := 'The rows returned above signify data-inconsistency in material transactions related to repetitive schedules. '||
279                'These are transactions resulted from Completion / Return / Scrap / Return from Scrap Transactions, in error due to missing repetitive schedule allocations.';
280   JTF_DIAGNOSTIC_COREAPI.ErrorPrint(reportStr);
281   JTF_DIAGNOSTIC_COREAPI.ActionErrorLink('Please refer to Metalink note ', 402202.1, 'to get the root-cause patch and steps to correct the data.<BR><BR>');
282 END IF;
283 
284 statusStr := 'SUCCESS';
285 isFatal := 'FALSE';
286 fixInfo := 'OK';
287 errStr :='No Error!';
288 
289 sqltxt :=
290 'SELECT we.wip_entity_name Repetitive_Assembly,  '||
291 '       wl.line_code Repetitive_Line, '||
292 '       mmt.organization_id, '||
296 '       mmt.completion_transaction_id, ' ||
293 '       mmta.repetitive_schedule_id, '||
294 '       mmt.transaction_id, '||
295 '       mmt.transaction_source_id, '||
297 '       mmt.move_transaction_id, ' ||
298 '       mmt.organization_id, ' ||
299 '       mmt.costed_flag, ' ||
300 '       decode(mmt.transaction_action_id, ' ||
301 '                  1, ''Issue'', ' ||
302 '                  27, ''Receipt'', ' ||
303 '                30, ''Wip scrap'', ' ||
304 '                31, ''Assy Complete'', ' ||
305 '                32, ''Assy return'', ' ||
306 '                33, ''-ve CompIssue'', ' ||
307 '                34, ''-ve CompReturn'', ' ||
308 '                40, ''Inv Lot Split'', ' ||
309 '                41, ''Inv Lot Merge'', ' ||
310 '                42, ''Inv Lot Translate'', ' ||
311 '                42, ''Inv Lot Translate'', ' ||
312 '             mmt.transaction_action_id) txn_action_meaning, ' ||
313 '       mmt.error_code, ' ||
314 '       SubStrB(mmt.error_explanation, 1, 50) err_explain ' ||
315 'FROM   mtl_material_transactions mmt,  ' ||
316 '       mtl_material_txn_allocations mmta, ' ||
317 '       wip_entities we, wip_lines wl ' ||
318 'WHERE  mmt.transaction_action_id IN (1, 27, 33, 34) ' ||
319 'AND    mmt.transaction_source_type_id = 5 ' ||
320 'AND    mmt.costed_flag IN (''N'',''E'')   ' ||
321 'AND    mmt.move_transaction_id IS NOT NULL  ' ||
322 'AND    mmt.transaction_id = mmta.transaction_id ' ||
323 'AND    mmt.organization_id = mmta.organization_id ' ||
324 'AND    mmt.transaction_source_id = we.wip_entity_id '||
325 'AND    mmt.organization_id = we.organization_id '||
326 'AND    we.entity_type = 2 '||we_dyn_where_clause||
327 'AND    mmt.repetitive_line_id = wl.line_id '||
328 'AND    mmt.organization_id = wl.organization_id '||
329 'AND    NOT EXISTS (SELECT 1 ' ||
330 '                   FROM   wip_move_txn_allocations wmta ' ||
331 '                   WHERE  wmta.transaction_id = mmt.move_transaction_id ' ||
332 '                   AND    wmta.organization_id = mmt.organization_id ' ||
333 '                   AND    wmta.repetitive_schedule_id = mmta.repetitive_schedule_id) '||
334 'ORDER BY mmt.organization_id, we.wip_entity_name, mmt.transaction_id';
335 
336 dummy_num:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt,'Incorrect WIP Material Allocations for Repetitive Schedule Transactions resulted from Move Transactions.',true,null,'Y',row_limit);
337 
338 IF (dummy_num = row_limit) THEN
339    JTF_DIAGNOSTIC_COREAPI.Line_Out('<BR> Output limited to the first '|| row_limit ||' rows to prevent an excessively large output file. <BR>');
340 END IF;
341 
342 IF (dummy_num > 0) THEN
343   reportStr := 'The rows returned above signify data-inconsistency in material transactions related to repetitive schedules. '||
344                'These are transactions resulted from Move Transactions, in error due to incorrect repetitive schedule allocations.';
345   JTF_DIAGNOSTIC_COREAPI.ErrorPrint(reportStr);
346   JTF_DIAGNOSTIC_COREAPI.ActionErrorLink('Please refer to Metalink note ', 402202.1, 'to get the root-cause patch and steps to correct the data.<BR><BR>');
347 END IF;
348 
349 statusStr := 'SUCCESS';
350 isFatal := 'FALSE';
351 fixInfo := 'OK';
352 errStr :='No Error!';
353 
354 sqltxt :=
355 'SELECT we.wip_entity_name Repetitive_Assembly,  '||
356 '       wl.line_code Repetitive_Line, '||
357 '       mmt.organization_id, '||
358 '       mmta.repetitive_schedule_id, '||
359 '       mmt.transaction_id, '||
360 '       mmt.transaction_source_id, '||
361 '       mmt.completion_transaction_id, ' ||
362 '       mmt.move_transaction_id, ' ||
363 '       mmt.organization_id, ' ||
364 '       mmt.costed_flag, ' ||
365 '       decode(mmt.transaction_action_id, ' ||
366 '                  1, ''Issue'', ' ||
367 '                  27, ''Receipt'', ' ||
368 '                30, ''Wip scrap'', ' ||
369 '                31, ''Assy Complete'', ' ||
370 '                32, ''Assy return'', ' ||
371 '                33, ''-ve CompIssue'', ' ||
372 '                34, ''-ve CompReturn'', ' ||
373 '                40, ''Inv Lot Split'', ' ||
374 '                41, ''Inv Lot Merge'', ' ||
375 '                42, ''Inv Lot Translate'', ' ||
376 '                42, ''Inv Lot Translate'', ' ||
377 '             mmt.transaction_action_id) txn_action_meaning, ' ||
378 '       mmt.error_code, ' ||
379 '       SubStrB(mmt.error_explanation, 1, 50) err_explain ' ||
380 'FROM   mtl_material_transactions mmt,  ' ||
381 '       mtl_material_txn_allocations mmta, ' ||
382 '       wip_entities we, wip_lines wl '||
383 'WHERE  mmt.transaction_action_id IN (1, 27, 33, 34) ' ||
384 'AND    mmt.transaction_source_type_id = 5 ' ||
385 'AND    mmt.costed_flag IN (''N'',''E'')   ' ||
386 'AND    mmt.move_transaction_id IS NULL  ' ||
387 'AND    mmt.completion_transaction_id IS NOT NULL  ' ||
388 'AND    mmt.transaction_id = mmta.transaction_id ' ||
389 'AND    mmt.organization_id = mmta.organization_id ' ||
390 'AND    mmt.transaction_source_id = we.wip_entity_id '||
391 'AND    mmt.organization_id = we.organization_id '||
392 'AND    we.entity_type = 2 '||we_dyn_where_clause||
393 'AND    mmt.repetitive_line_id = wl.line_id '||
394 'AND    mmt.organization_id = wl.organization_id '||
395 'AND    NOT EXISTS (SELECT 1 ' ||
396 '                   FROM   mtl_material_transactions mmt1, ' ||
397 '                          mtl_material_txn_allocations mmta1 ' ||
398 '                   WHERE  mmt1.transaction_action_id NOT IN (1, 27, 33, 34) ' ||
399 '                   AND    mmt1.transaction_source_type_id = 5 ' ||
400 '                   AND    mmt1.transaction_source_id = mmt.transaction_source_id ' ||
401 '                   AND    mmt1.organization_id = mmt.organization_id ' ||
402 '                   AND    mmt1.completion_transaction_id = mmt.completion_transaction_id ' ||
403 '                   AND    mmt1.transaction_id = mmta1.transaction_id ' ||
404 '                   AND    mmt1.organization_id = mmt1.organization_id ' ||
408 dummy_num:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt,
405 '                   AND    mmta1.repetitive_schedule_id = mmta.repetitive_schedule_id) '||
406 'ORDER BY mmt.organization_id, we.wip_entity_name, mmt.transaction_id';
407 
409         'Incorrect WIP Allocations for Repetitive Schedule Transactions resulted from Completion / Return / Scrap / Return From Scrap Transactions.',true,null,'Y',row_limit);
410 
411 IF (dummy_num = row_limit) THEN
412    JTF_DIAGNOSTIC_COREAPI.Line_Out('<BR> Output limited to the first '|| row_limit ||' rows to prevent an excessively large output file. <BR>');
413 END IF;
414 
415 IF (dummy_num > 0) THEN
416   reportStr := 'The rows returned above signify data-inconsistency in material transactions related to repetitive schedules. '||
417                'These are transactions resulted from Completion / Return / Scrap / Return from Scrap Transactions, in error due to incorrect repetitive schedule allocations.';
418   JTF_DIAGNOSTIC_COREAPI.ErrorPrint(reportStr);
419   JTF_DIAGNOSTIC_COREAPI.ActionErrorLink('Please refer to Metalink note ', 402202.1, 'to get the root-cause patch and steps to correct the data.<BR><BR>');
420 END IF;
421 
422 statusStr := 'SUCCESS';
423 isFatal := 'FALSE';
424 fixInfo := 'OK';
425 errStr :='No Error!';
426 
427  <<l_test_end>>
428  report := JTF_DIAGNOSTIC_ADAPTUTIL.constructReport(statusStr,errStr,fixInfo,isFatal);
429  reportClob := JTF_DIAGNOSTIC_ADAPTUTIL.getReportClob;
430 
431 END Uncosted_mat_txn_rep;
432 
433 END;