28: l_org_exists NUMBER;
29: BEGIN
30: JTF_DIAGNOSTIC_ADAPTUTIL.setUpVars;
31: JTF_DIAGNOSTIC_ADAPTUTIL.addStringToReport('@html');
32: JTF_DIAGNOSTIC_COREAPI.insert_style_sheet;
33:
34: /* Set Row Limit to 1000 (i.e.) Max Number of records to be fetched by each sql*/
35: row_limit :=1000;
36: l_org_exists :=0; /* Initialize to zero */
48: where organization_id=l_org_id;
49: Exception
50: When others Then
51: l_org_exists :=0;
52: JTF_DIAGNOSTIC_COREAPI.errorprint('Invalid Organization Id');
53: JTF_DIAGNOSTIC_COREAPI.ActionErrorPrint(' Please either provide a valid value for the Organization Id or leave it blank.');
54: statusStr := 'FAILURE';
55: isFatal := 'TRUE';
56: fixInfo := ' Please review the error message below and take corrective action. ';
49: Exception
50: When others Then
51: l_org_exists :=0;
52: JTF_DIAGNOSTIC_COREAPI.errorprint('Invalid Organization Id');
53: JTF_DIAGNOSTIC_COREAPI.ActionErrorPrint(' Please either provide a valid value for the Organization Id or leave it blank.');
54: statusStr := 'FAILURE';
55: isFatal := 'TRUE';
56: fixInfo := ' Please review the error message below and take corrective action. ';
57: errStr := ' Invalid value for input field Organization Id ';
89:
90: sqltxt :=sqltxt||' and rownum< '||row_limit;
91: sqltxt :=sqltxt||' order by mp.organization_code, mif.item_number, mrir.process_revision ';
92:
93: num_rows:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt, 'Orphan Routing Revisions - Routing Revisions exist for non-existent Routings');
94:
95: If (num_rows = 0) Then /* Corrupt Data Not Found for this case*/
96: JTF_DIAGNOSTIC_COREAPI.Line_Out('No corrupt data found for this case.
');
97: ElsIf (num_rows > 0) Then /* Show Impact and Action only if rows are returned */
92:
93: num_rows:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt, 'Orphan Routing Revisions - Routing Revisions exist for non-existent Routings');
94:
95: If (num_rows = 0) Then /* Corrupt Data Not Found for this case*/
96: JTF_DIAGNOSTIC_COREAPI.Line_Out('No corrupt data found for this case.
');
97: ElsIf (num_rows > 0) Then /* Show Impact and Action only if rows are returned */
98: If (num_rows = row_limit -1 ) Then
99: JTF_DIAGNOSTIC_COREAPI.Line_Out('
Output of the above table is limited to the first '||(row_limit-1)||' rows
100:
to prevent an excessively big output file.
');
95: If (num_rows = 0) Then /* Corrupt Data Not Found for this case*/
96: JTF_DIAGNOSTIC_COREAPI.Line_Out('No corrupt data found for this case.
');
97: ElsIf (num_rows > 0) Then /* Show Impact and Action only if rows are returned */
98: If (num_rows = row_limit -1 ) Then
99: JTF_DIAGNOSTIC_COREAPI.Line_Out('
Output of the above table is limited to the first '||(row_limit-1)||' rows
100:
to prevent an excessively big output file.
');
101: End If;
102: JTF_DIAGNOSTIC_COREAPI.Line_Out('
IMPACT:
103:
Users will not be able to create Routings for these items. ');
98: If (num_rows = row_limit -1 ) Then
99: JTF_DIAGNOSTIC_COREAPI.Line_Out('
Output of the above table is limited to the first '||(row_limit-1)||' rows
100:
to prevent an excessively big output file.
');
101: End If;
102: JTF_DIAGNOSTIC_COREAPI.Line_Out('
IMPACT:
103:
Users will not be able to create Routings for these items. ');
104:
105: reportStr := '
ACTION:
106:
Important: Try this action plan on a TEST INSTANCE first.
134: statusStr := 'SUCCESS';
135: isFatal := 'FALSE';
136:
137: <
138: JTF_DIAGNOSTIC_COREAPI.Line_Out('
This Health Check test completed as expected
');
139: report := JTF_DIAGNOSTIC_ADAPTUTIL.constructReport(statusStr,errStr,fixInfo,isFatal);
140: reportClob := JTF_DIAGNOSTIC_ADAPTUTIL.getReportClob;
141: End If; /* End of l_org_id is null or l_org_exists=1 */
142:
141: End If; /* End of l_org_id is null or l_org_exists=1 */
142:
143: EXCEPTION
144: when others then
145: JTF_DIAGNOSTIC_COREAPI.errorprint('Error: '||sqlerrm);
146: JTF_DIAGNOSTIC_COREAPI.ActionErrorPrint('If this error repeats, please contact Oracle Support Services');
147: statusStr := 'FAILURE';
148: errStr := sqlerrm ||' occurred in script. ';
149: fixInfo := 'Unexpected Exception in BOMDGRTB.pls';
142:
143: EXCEPTION
144: when others then
145: JTF_DIAGNOSTIC_COREAPI.errorprint('Error: '||sqlerrm);
146: JTF_DIAGNOSTIC_COREAPI.ActionErrorPrint('If this error repeats, please contact Oracle Support Services');
147: statusStr := 'FAILURE';
148: errStr := sqlerrm ||' occurred in script. ';
149: fixInfo := 'Unexpected Exception in BOMDGRTB.pls';
150: isFatal := 'FALSE';