40:
41: BEGIN
42: JTF_DIAGNOSTIC_ADAPTUTIL.setUpVars;
43: JTF_DIAGNOSTIC_ADAPTUTIL.addStringToReport('@html');
44: JTF_DIAGNOSTIC_COREAPI.insert_style_sheet;
45:
46: /*Initializing local vars */
47: row_limit :=1000; /* Set Row Limit to 1000 (i.e.) Max Number of records to be fetched by each sql*/
48: l_count := 0;
51: l_org_id := JTF_DIAGNOSTIC_ADAPTUTIL.getInputValue('OrgId',inputs);
52: l_item_id :=JTF_DIAGNOSTIC_ADAPTUTIL.getInputValue('ItemId',inputs);
53:
54: If l_item_id is NULL then
55: JTF_DIAGNOSTIC_COREAPI.errorprint('Input Item Id is mandatory.');
56: JTF_DIAGNOSTIC_COREAPI.ActionErrorPrint(' Please provide a valid value for the Item Id.');
57: statusStr := 'FAILURE';
58: isFatal := 'TRUE';
59: fixInfo := ' Please review the error message below and take corrective action. ';
52: l_item_id :=JTF_DIAGNOSTIC_ADAPTUTIL.getInputValue('ItemId',inputs);
53:
54: If l_item_id is NULL then
55: JTF_DIAGNOSTIC_COREAPI.errorprint('Input Item Id is mandatory.');
56: JTF_DIAGNOSTIC_COREAPI.ActionErrorPrint(' Please provide a valid value for the Item Id.');
57: statusStr := 'FAILURE';
58: isFatal := 'TRUE';
59: fixInfo := ' Please review the error message below and take corrective action. ';
60: errStr := ' Invalid value for input field Item Id. It is a mandatory input.';
67: FETCH c_item_valid INTO l_count;
68: CLOSE c_item_valid;
69:
70: IF (l_count IS NULL) OR (l_count = 0) THEN
71: JTF_DIAGNOSTIC_COREAPI.errorprint('Invalid Item and Organization Combination');
72: JTF_DIAGNOSTIC_COREAPI.ActionErrorPrint('Please enter right combination of Item and Organization ');
73: statusStr := 'FAILURE';
74: errStr := 'Invalid Item and Organization Combination';
75: fixInfo := ' Please review the error message below and take corrective action. ';
68: CLOSE c_item_valid;
69:
70: IF (l_count IS NULL) OR (l_count = 0) THEN
71: JTF_DIAGNOSTIC_COREAPI.errorprint('Invalid Item and Organization Combination');
72: JTF_DIAGNOSTIC_COREAPI.ActionErrorPrint('Please enter right combination of Item and Organization ');
73: statusStr := 'FAILURE';
74: errStr := 'Invalid Item and Organization Combination';
75: fixInfo := ' Please review the error message below and take corrective action. ';
76: isFatal := 'TRUE';
82:
83:
84: /* Get the application installation info. References to Data Dictionary Objects without schema name
85: included in WHERE predicate are not allowed (GSCC Check: file.sql.47). Schema name has to be passed
86: as an input parameter to JTF_DIAGNOSTIC_COREAPI.Column_Exists API. */
87:
88: l_ret_status := fnd_installation.get_app_info ('INV'
89: , l_status
90: , l_industry
90: , l_industry
91: , l_oracle_schema
92: );
93:
94: /*JTF_DIAGNOSTIC_COREAPI.Line_Out(' l_oracle_schema: '||l_oracle_schema);*/
95:
96:
97: /* Start the diagnostic test scripts */
98: sqltxt := 'SELECT '||
226: sqltxt :=sqltxt||' and rownum < '||row_limit;
227: sqltxt :=sqltxt||' order by mp.organization_code,mif.padded_item_number';
228: end if;
229:
230: num_rows:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt, ' Item Attributes');
231: If (num_rows = row_limit -1 ) Then
232: JTF_DIAGNOSTIC_COREAPI.Line_Out('
Output of the above table is limited to the first '||(row_limit-1)||' rows to prevent an excessively big output file.
');
233: End If;
234:
228: end if;
229:
230: num_rows:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt, ' Item Attributes');
231: If (num_rows = row_limit -1 ) Then
232: JTF_DIAGNOSTIC_COREAPI.Line_Out('
Output of the above table is limited to the first '||(row_limit-1)||' rows to prevent an excessively big output file.
');
233: End If;
234:
235: statusStr := 'SUCCESS';
236: isFatal := 'FALSE';
347:
348: sqltxt :=sqltxt||' and rownum < '||row_limit;
349: sqltxt :=sqltxt||' order by mp.organization_code,mif.padded_item_number';
350:
351: num_rows:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt, ' Item Attributes (Contd 1..)');
352: If (num_rows = row_limit -1 ) Then
353: JTF_DIAGNOSTIC_COREAPI.Line_Out('
Output of the above table is limited to the first '||(row_limit-1)||' rows to prevent an excessively big output file.
');
354: End If;
355:
349: sqltxt :=sqltxt||' order by mp.organization_code,mif.padded_item_number';
350:
351: num_rows:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt, ' Item Attributes (Contd 1..)');
352: If (num_rows = row_limit -1 ) Then
353: JTF_DIAGNOSTIC_COREAPI.Line_Out('
Output of the above table is limited to the first '||(row_limit-1)||' rows to prevent an excessively big output file.
');
354: End If;
355:
356: statusStr := 'SUCCESS';
357: isFatal := 'FALSE';
510:
511: sqltxt :=sqltxt||' and rownum < '||row_limit;
512: sqltxt :=sqltxt||' order by mp.organization_code,mif.padded_item_number';
513:
514: num_rows:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt, ' Item Attributes (Contd 2..)');
515: If (num_rows = row_limit -1 ) Then
516: JTF_DIAGNOSTIC_COREAPI.Line_Out('
Output of the above table is limited to the first '||(row_limit-1)||' rows to prevent an excessively big output file.
');
517: End If;
518: statusStr := 'SUCCESS';
512: sqltxt :=sqltxt||' order by mp.organization_code,mif.padded_item_number';
513:
514: num_rows:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt, ' Item Attributes (Contd 2..)');
515: If (num_rows = row_limit -1 ) Then
516: JTF_DIAGNOSTIC_COREAPI.Line_Out('
Output of the above table is limited to the first '||(row_limit-1)||' rows to prevent an excessively big output file.
');
517: End If;
518: statusStr := 'SUCCESS';
519: isFatal := 'FALSE';
520:
640:
641: sqltxt :=sqltxt||' and rownum < '||row_limit;
642: sqltxt :=sqltxt||' order by mp.organization_code ,mif.padded_item_number';
643:
644: num_rows:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt, ' Item Attributes (Contd 3..)');
645: If (num_rows = row_limit -1 ) Then
646: JTF_DIAGNOSTIC_COREAPI.Line_Out('
Output of the above table is limited to the first '||(row_limit-1)||' rows to prevent an excessively big output file.
');
647: End If;
648: statusStr := 'SUCCESS';
642: sqltxt :=sqltxt||' order by mp.organization_code ,mif.padded_item_number';
643:
644: num_rows:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt, ' Item Attributes (Contd 3..)');
645: If (num_rows = row_limit -1 ) Then
646: JTF_DIAGNOSTIC_COREAPI.Line_Out('
Output of the above table is limited to the first '||(row_limit-1)||' rows to prevent an excessively big output file.
');
647: End If;
648: statusStr := 'SUCCESS';
649: isFatal := 'FALSE';
650:
717:
718: sqltxt :=sqltxt||' and rownum < '||row_limit;
719: sqltxt :=sqltxt||' order by mp.organization_code ,mif.padded_item_number';
720:
721: num_rows:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt, ' Item Attributes (Contd 4..)');
722: If (num_rows = row_limit -1 ) Then
723: JTF_DIAGNOSTIC_COREAPI.Line_Out('
Output of the above table is limited to the first '||(row_limit-1)||' rows to prevent an excessively big output file.
');
724: End If;
725:
719: sqltxt :=sqltxt||' order by mp.organization_code ,mif.padded_item_number';
720:
721: num_rows:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt, ' Item Attributes (Contd 4..)');
722: If (num_rows = row_limit -1 ) Then
723: JTF_DIAGNOSTIC_COREAPI.Line_Out('
Output of the above table is limited to the first '||(row_limit-1)||' rows to prevent an excessively big output file.
');
724: End If;
725:
726: statusStr := 'SUCCESS';
727: isFatal := 'FALSE';
757:
758: sqltxt :=sqltxt||' and rownum < '||row_limit;
759: sqltxt :=sqltxt||' order by mp1.organization_code, mif1.padded_item_number, msitl.language';
760:
761: num_rows:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt, ' Item Translation Details');
762: If (num_rows = row_limit -1 ) Then
763: JTF_DIAGNOSTIC_COREAPI.Line_Out('
Output of the above table is limited to the first '||(row_limit-1)||' rows to prevent an excessively big output file.
');
764: End If;
765:
759: sqltxt :=sqltxt||' order by mp1.organization_code, mif1.padded_item_number, msitl.language';
760:
761: num_rows:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt, ' Item Translation Details');
762: If (num_rows = row_limit -1 ) Then
763: JTF_DIAGNOSTIC_COREAPI.Line_Out('
Output of the above table is limited to the first '||(row_limit-1)||' rows to prevent an excessively big output file.
');
764: End If;
765:
766: statusStr := 'SUCCESS';
767: isFatal := 'FALSE';
831:
832: sqltxt :=sqltxt||' and rownum < '||row_limit;
833: sqltxt :=sqltxt||' order by mp1.organization_code, mif1.padded_item_number, mirb.revision';
834:
835: num_rows:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt, ' Item Revisions');
836: If (num_rows = row_limit -1 ) Then
837: JTF_DIAGNOSTIC_COREAPI.Line_Out('
Output of the above table is limited to the first '||(row_limit-1)||' rows to prevent an excessively big output file.
');
838: End If;
839:
833: sqltxt :=sqltxt||' order by mp1.organization_code, mif1.padded_item_number, mirb.revision';
834:
835: num_rows:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt, ' Item Revisions');
836: If (num_rows = row_limit -1 ) Then
837: JTF_DIAGNOSTIC_COREAPI.Line_Out('
Output of the above table is limited to the first '||(row_limit-1)||' rows to prevent an excessively big output file.
');
838: End If;
839:
840: statusStr := 'SUCCESS';
841: isFatal := 'FALSE';
876:
877: sqltxt :=sqltxt||' and rownum < '||row_limit;
878: sqltxt :=sqltxt||' order by mp1.organization_code, mif1.padded_item_number, mirtl.revision_id, mirtl.language';
879:
880: num_rows:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt, ' Item Revision Translation Details');
881: If (num_rows = row_limit -1 ) Then
882: JTF_DIAGNOSTIC_COREAPI.Line_Out('
Output of the above table is limited to the first '||(row_limit-1)||' rows to prevent an excessively big output file.
');
883: End If;
884:
878: sqltxt :=sqltxt||' order by mp1.organization_code, mif1.padded_item_number, mirtl.revision_id, mirtl.language';
879:
880: num_rows:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt, ' Item Revision Translation Details');
881: If (num_rows = row_limit -1 ) Then
882: JTF_DIAGNOSTIC_COREAPI.Line_Out('
Output of the above table is limited to the first '||(row_limit-1)||' rows to prevent an excessively big output file.
');
883: End If;
884:
885: statusStr := 'SUCCESS';
886: isFatal := 'FALSE';
921:
922: sqltxt :=sqltxt||' and rownum < '||row_limit;
923: sqltxt :=sqltxt||' order by mif1.padded_item_number, mdev.element_name';
924:
925: num_rows:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt, ' Item Catalog Descriptive Elements ');
926: If (num_rows = row_limit -1 ) Then
927: JTF_DIAGNOSTIC_COREAPI.Line_Out('
Output of the above table is limited to the first '||(row_limit-1)||' rows to prevent an excessively big output file.
');
928: End If;
929:
923: sqltxt :=sqltxt||' order by mif1.padded_item_number, mdev.element_name';
924:
925: num_rows:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt, ' Item Catalog Descriptive Elements ');
926: If (num_rows = row_limit -1 ) Then
927: JTF_DIAGNOSTIC_COREAPI.Line_Out('
Output of the above table is limited to the first '||(row_limit-1)||' rows to prevent an excessively big output file.
');
928: End If;
929:
930: statusStr := 'SUCCESS';
931: isFatal := 'FALSE';
977: sqltxt :=sqltxt||' and rownum < '||row_limit;
978: sqltxt :=sqltxt||' order by mp1.organization_code, mif1.padded_item_number, '||
979: ' mpis.effective_date,mpis.status_code ';
980:
981: num_rows:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt, ' Item Pending Statuses ');
982: If (num_rows = row_limit -1 ) Then
983: JTF_DIAGNOSTIC_COREAPI.Line_Out('
Output of the above table is limited to the first '||(row_limit-1)||' rows to prevent an excessively big output file.
');
984: End If;
985:
979: ' mpis.effective_date,mpis.status_code ';
980:
981: num_rows:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt, ' Item Pending Statuses ');
982: If (num_rows = row_limit -1 ) Then
983: JTF_DIAGNOSTIC_COREAPI.Line_Out('
Output of the above table is limited to the first '||(row_limit-1)||' rows to prevent an excessively big output file.
');
984: End If;
985:
986: statusStr := 'SUCCESS';
987: isFatal := 'FALSE';
1053: sqltxt :=sqltxt||' and rownum < '||row_limit;
1054: sqltxt :=sqltxt||' order by mp1.organization_code, mif1.padded_item_number, '||
1055: ' mcr.cross_reference_type,mcr.cross_reference ';
1056:
1057: num_rows:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt, ' Item Cross References ');
1058: If (num_rows = row_limit -1 ) Then
1059: JTF_DIAGNOSTIC_COREAPI.Line_Out('
Output of the above table is limited to the first '||(row_limit-1)||' rows to prevent an excessively big output file.
');
1060: End If;
1061:
1055: ' mcr.cross_reference_type,mcr.cross_reference ';
1056:
1057: num_rows:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt, ' Item Cross References ');
1058: If (num_rows = row_limit -1 ) Then
1059: JTF_DIAGNOSTIC_COREAPI.Line_Out('
Output of the above table is limited to the first '||(row_limit-1)||' rows to prevent an excessively big output file.
');
1060: End If;
1061:
1062: statusStr := 'SUCCESS';
1063: isFatal := 'FALSE';
1102: sqltxt :=sqltxt||' and rownum < '||row_limit;
1103: sqltxt :=sqltxt||' order by mp1.organization_code, mif1.padded_item_number, '||
1104: ' MCRB.cross_reference_type,MCRB.cross_reference,mcrt.cross_reference_id, mcrt.language ';
1105:
1106: num_rows:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt, ' Item Cross References Transalation Details');
1107: If (num_rows = row_limit -1 ) Then
1108: JTF_DIAGNOSTIC_COREAPI.Line_Out('
Output of the above table is limited to the first '||(row_limit-1)||' rows to prevent an excessively big output file.
');
1109: End If;
1110:
1104: ' MCRB.cross_reference_type,MCRB.cross_reference,mcrt.cross_reference_id, mcrt.language ';
1105:
1106: num_rows:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt, ' Item Cross References Transalation Details');
1107: If (num_rows = row_limit -1 ) Then
1108: JTF_DIAGNOSTIC_COREAPI.Line_Out('
Output of the above table is limited to the first '||(row_limit-1)||' rows to prevent an excessively big output file.
');
1109: End If;
1110:
1111: statusStr := 'SUCCESS';
1112: isFatal := 'FALSE';
1175:
1176: sqltxt :=sqltxt||' and rownum < '||row_limit;
1177: sqltxt :=sqltxt||' order by mp1.organization_code, mif.padded_item_number, mcix.customer_item_number';
1178:
1179: num_rows:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt, ' Customer Item Cross References ');
1180: If (num_rows = row_limit -1 ) Then
1181: JTF_DIAGNOSTIC_COREAPI.Line_Out('
Output of the above table is limited to the first '||(row_limit-1)||' rows to prevent an excessively big output file.
');
1182: End If;
1183:
1177: sqltxt :=sqltxt||' order by mp1.organization_code, mif.padded_item_number, mcix.customer_item_number';
1178:
1179: num_rows:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt, ' Customer Item Cross References ');
1180: If (num_rows = row_limit -1 ) Then
1181: JTF_DIAGNOSTIC_COREAPI.Line_Out('
Output of the above table is limited to the first '||(row_limit-1)||' rows to prevent an excessively big output file.
');
1182: End If;
1183:
1184: statusStr := 'SUCCESS';
1185: isFatal := 'FALSE';
1246:
1247: sqltxt :=sqltxt||' and rownum < '||row_limit;
1248: sqltxt :=sqltxt||' order by mp1.organization_code,mmpn.manufacturer_name,mmpn.mfg_part_num ';
1249:
1250: num_rows:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt, ' Manufacturer Part Numbers ');
1251: If (num_rows = row_limit -1 ) Then
1252: JTF_DIAGNOSTIC_COREAPI.Line_Out('
Output of the above table is limited to the first '||(row_limit-1)||' rows to prevent an excessively big output file.
');
1253: End If;
1254:
1248: sqltxt :=sqltxt||' order by mp1.organization_code,mmpn.manufacturer_name,mmpn.mfg_part_num ';
1249:
1250: num_rows:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt, ' Manufacturer Part Numbers ');
1251: If (num_rows = row_limit -1 ) Then
1252: JTF_DIAGNOSTIC_COREAPI.Line_Out('
Output of the above table is limited to the first '||(row_limit-1)||' rows to prevent an excessively big output file.
');
1253: End If;
1254:
1255: statusStr := 'SUCCESS';
1256: isFatal := 'FALSE';
1345: sqltxt :=sqltxt||' and rownum < '||row_limit;
1346: sqltxt :=sqltxt||' order by mp1.organization_code,mif1.padded_item_number, '||
1347: ' mif2.padded_item_number,mri.relationship_type_id ';
1348:
1349: num_rows:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt, ' Item Relationships ');
1350: If (num_rows = row_limit -1 ) Then
1351: JTF_DIAGNOSTIC_COREAPI.Line_Out('
Output of the above table is limited to the first '||(row_limit-1)||' rows to prevent an excessively big output file.
');
1352: End If;
1353:
1347: ' mif2.padded_item_number,mri.relationship_type_id ';
1348:
1349: num_rows:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt, ' Item Relationships ');
1350: If (num_rows = row_limit -1 ) Then
1351: JTF_DIAGNOSTIC_COREAPI.Line_Out('
Output of the above table is limited to the first '||(row_limit-1)||' rows to prevent an excessively big output file.
');
1352: End If;
1353:
1354: statusStr := 'SUCCESS';
1355: isFatal := 'FALSE';
1397: ' , moq.subinventory_code, moq.locator_id ' ||
1398: ' , mil.concatenated_segments, mil.description ' ||
1399: ' , moq.revision, moq.lot_number ';
1400:
1401: num_rows:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt,' Item Onhand Quantity ');
1402:
1403: statusStr := 'SUCCESS';
1404: isFatal := 'FALSE';
1405: /* End of item relationships*/
1423:
1424: sqltxt :=sqltxt||' and rownum < '||row_limit;
1425: sqltxt :=sqltxt||' order by mdcs.functional_area_id,mdcs.category_set_name';
1426:
1427: num_rows:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt, ' Default Category Sets ');
1428: If (num_rows = row_limit -1 ) Then
1429: JTF_DIAGNOSTIC_COREAPI.Line_Out('
Output of the above table is limited to the first '||(row_limit-1)||' rows to prevent an excessively big output file.
');
1430: End If;
1431:
1425: sqltxt :=sqltxt||' order by mdcs.functional_area_id,mdcs.category_set_name';
1426:
1427: num_rows:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt, ' Default Category Sets ');
1428: If (num_rows = row_limit -1 ) Then
1429: JTF_DIAGNOSTIC_COREAPI.Line_Out('
Output of the above table is limited to the first '||(row_limit-1)||' rows to prevent an excessively big output file.
');
1430: End If;
1431:
1432: statusStr := 'SUCCESS';
1433: isFatal := 'FALSE';
1476:
1477: sqltxt :=sqltxt||' and rownum < '||row_limit;
1478: sqltxt :=sqltxt||' order by mcsvl.category_set_name,fifsv.id_flex_structure_name';
1479:
1480: num_rows:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt, ' Category Sets ');
1481: If (num_rows = row_limit -1 ) Then
1482: JTF_DIAGNOSTIC_COREAPI.Line_Out('
Output of the above table is limited to the first '||(row_limit-1)||' rows to prevent an excessively big output file.
');
1483: End If;
1484:
1478: sqltxt :=sqltxt||' order by mcsvl.category_set_name,fifsv.id_flex_structure_name';
1479:
1480: num_rows:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt, ' Category Sets ');
1481: If (num_rows = row_limit -1 ) Then
1482: JTF_DIAGNOSTIC_COREAPI.Line_Out('
Output of the above table is limited to the first '||(row_limit-1)||' rows to prevent an excessively big output file.
');
1483: End If;
1484:
1485: statusStr := 'SUCCESS';
1486: isFatal := 'FALSE';
1526: sqltxt :=sqltxt||' and rownum < '||row_limit;
1527: sqltxt :=sqltxt||' order by mp1.organization_code, mif1.padded_item_number, '||
1528: ' mic.category_set_name, mic.category_concat_segs ';
1529:
1530: num_rows:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt, ' Item Category Assignments ');
1531: If (num_rows = row_limit -1 ) Then
1532: JTF_DIAGNOSTIC_COREAPI.Line_Out('
Output of the above table is limited to the first '||(row_limit-1)||' rows to prevent an excessively big output file.
');
1533: End If;
1534:
1528: ' mic.category_set_name, mic.category_concat_segs ';
1529:
1530: num_rows:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt, ' Item Category Assignments ');
1531: If (num_rows = row_limit -1 ) Then
1532: JTF_DIAGNOSTIC_COREAPI.Line_Out('
Output of the above table is limited to the first '||(row_limit-1)||' rows to prevent an excessively big output file.
');
1533: End If;
1534:
1535: statusStr := 'SUCCESS';
1536: isFatal := 'FALSE';
1539:
1540: /* Start of BOM, RTG scripts*/
1541: /* Get the application installation info. References to Data Dictionary Objects without schema name
1542: included in WHERE predicate are not allowed (GSCC Check: file.sql.47). Schema name has to be passed
1543: as an input parameter to JTF_DIAGNOSTIC_COREAPI.Column_Exists API. */
1544:
1545: l_ret_status := fnd_installation.get_app_info ('BOM'
1546: , l_status
1547: , l_industry
1546: , l_status
1547: , l_industry
1548: , l_oracle_schema
1549: );
1550: /*JTF_DIAGNOSTIC_COREAPI.Line_Out(' l_oracle_schema: '||l_oracle_schema);*/
1551:
1552:
1553: /* SQL to Fetch Bill Header Details */
1554: sqltxt := 'SELECT ' ||
1630: end if;
1631:
1632: sqltxt :=sqltxt||' and rownum < '||row_limit;
1633: sqltxt :=sqltxt||' order by mp1.organization_code, mif1.padded_item_number, bsb.alternate_bom_designator';
1634: num_rows:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt, ' Bill Headers ');
1635: If (num_rows = row_limit -1 ) Then
1636: JTF_DIAGNOSTIC_COREAPI.Line_Out('
Output of the above table is limited to the first '||(row_limit-1)||' rows to prevent an excessively big output file.
');
1637: End If;
1638: statusStr := 'SUCCESS';
1632: sqltxt :=sqltxt||' and rownum < '||row_limit;
1633: sqltxt :=sqltxt||' order by mp1.organization_code, mif1.padded_item_number, bsb.alternate_bom_designator';
1634: num_rows:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt, ' Bill Headers ');
1635: If (num_rows = row_limit -1 ) Then
1636: JTF_DIAGNOSTIC_COREAPI.Line_Out('
Output of the above table is limited to the first '||(row_limit-1)||' rows to prevent an excessively big output file.
');
1637: End If;
1638: statusStr := 'SUCCESS';
1639: isFatal := 'FALSE';
1640:
1792: end if;
1793:
1794: sqltxt :=sqltxt||' and rownum < '||row_limit;
1795: sqltxt :=sqltxt||' order by mp1.organization_code, mif1.padded_item_number, BSB.alternate_bom_designator, BCB.operation_seq_num ,mif2.padded_item_number';
1796: num_rows:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt, 'Bill Components ');
1797: If (num_rows = row_limit -1 ) Then
1798: JTF_DIAGNOSTIC_COREAPI.Line_Out('
Output of the above table is limited to the first '||(row_limit-1)||' rows to prevent an excessively big output file.
');
1799: End If;
1800: statusStr := 'SUCCESS';
1794: sqltxt :=sqltxt||' and rownum < '||row_limit;
1795: sqltxt :=sqltxt||' order by mp1.organization_code, mif1.padded_item_number, BSB.alternate_bom_designator, BCB.operation_seq_num ,mif2.padded_item_number';
1796: num_rows:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt, 'Bill Components ');
1797: If (num_rows = row_limit -1 ) Then
1798: JTF_DIAGNOSTIC_COREAPI.Line_Out('
Output of the above table is limited to the first '||(row_limit-1)||' rows to prevent an excessively big output file.
');
1799: End If;
1800: statusStr := 'SUCCESS';
1801: isFatal := 'FALSE';
1802:
1871: sqltxt :=sqltxt||' order by mp1.organization_code, mif1.padded_item_number, bsb.alternate_bom_designator, '||
1872: ' bcb.operation_seq_num, bcb.item_num, '||
1873: ' mif2.padded_item_number, brd.component_reference_designator';
1874:
1875: num_rows:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt, 'Bill Reference Designators ');
1876: If (num_rows = row_limit -1 ) Then
1877: JTF_DIAGNOSTIC_COREAPI.Line_Out('
Output of the above table is limited to the first '||(row_limit-1)||' rows to prevent an excessively big output file.
');
1878: End If;
1879: statusStr := 'SUCCESS';
1873: ' mif2.padded_item_number, brd.component_reference_designator';
1874:
1875: num_rows:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt, 'Bill Reference Designators ');
1876: If (num_rows = row_limit -1 ) Then
1877: JTF_DIAGNOSTIC_COREAPI.Line_Out('
Output of the above table is limited to the first '||(row_limit-1)||' rows to prevent an excessively big output file.
');
1878: End If;
1879: statusStr := 'SUCCESS';
1880: isFatal := 'FALSE';
1881:
1958:
1959: sqltxt :=sqltxt||' and rownum < '||row_limit;
1960: sqltxt :=sqltxt||' order by mp1.organization_code, mif1.padded_item_number, bsb.alternate_bom_designator, '||
1961: ' BCB.operation_seq_num ,mif2.padded_item_number, mif3.padded_item_number';
1962: num_rows:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt, 'Bill Substitute Components ');
1963: If (num_rows = row_limit -1 ) Then
1964: JTF_DIAGNOSTIC_COREAPI.Line_Out('
Output of the above table is limited to the first '||(row_limit-1)||' rows to prevent an excessively big output file.
');
1965: End If;
1966: statusStr := 'SUCCESS';
1960: sqltxt :=sqltxt||' order by mp1.organization_code, mif1.padded_item_number, bsb.alternate_bom_designator, '||
1961: ' BCB.operation_seq_num ,mif2.padded_item_number, mif3.padded_item_number';
1962: num_rows:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt, 'Bill Substitute Components ');
1963: If (num_rows = row_limit -1 ) Then
1964: JTF_DIAGNOSTIC_COREAPI.Line_Out('
Output of the above table is limited to the first '||(row_limit-1)||' rows to prevent an excessively big output file.
');
1965: End If;
1966: statusStr := 'SUCCESS';
1967: isFatal := 'FALSE';
1968:
2048:
2049: sqltxt :=sqltxt||' and rownum < '||row_limit;
2050: sqltxt :=sqltxt||' order by mp1.organization_code, mif1.padded_item_number, bor1.alternate_routing_designator';
2051:
2052: num_rows:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt, 'Routing Headers ');
2053: If (num_rows = row_limit -1 ) Then
2054: JTF_DIAGNOSTIC_COREAPI.Line_Out('
Output of the above table is limited to the first '||(row_limit-1)||' rows to prevent an excessively big output file.
');
2055: End If;
2056: statusStr := 'SUCCESS';
2050: sqltxt :=sqltxt||' order by mp1.organization_code, mif1.padded_item_number, bor1.alternate_routing_designator';
2051:
2052: num_rows:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt, 'Routing Headers ');
2053: If (num_rows = row_limit -1 ) Then
2054: JTF_DIAGNOSTIC_COREAPI.Line_Out('
Output of the above table is limited to the first '||(row_limit-1)||' rows to prevent an excessively big output file.
');
2055: End If;
2056: statusStr := 'SUCCESS';
2057: isFatal := 'FALSE';
2058:
2182: sqltxt :=sqltxt||' and rownum < '||row_limit;
2183: sqltxt :=sqltxt||' order by mp.organization_code, mif.padded_item_number, bor.alternate_routing_designator,'||
2184: ' bos.operation_seq_num ';
2185:
2186: num_rows:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt, 'Routing Operations ');
2187: If (num_rows = row_limit -1 ) Then
2188: JTF_DIAGNOSTIC_COREAPI.Line_Out('
Output of the above table is limited to the first '||(row_limit-1)||' rows to prevent an excessively big output file.
');
2189: End If;
2190: statusStr := 'SUCCESS';
2184: ' bos.operation_seq_num ';
2185:
2186: num_rows:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt, 'Routing Operations ');
2187: If (num_rows = row_limit -1 ) Then
2188: JTF_DIAGNOSTIC_COREAPI.Line_Out('
Output of the above table is limited to the first '||(row_limit-1)||' rows to prevent an excessively big output file.
');
2189: End If;
2190: statusStr := 'SUCCESS';
2191: isFatal := 'FALSE';
2192: /* End of Routing Operation Details */
2279: sqltxt :=sqltxt||' and rownum < '||row_limit;
2280: sqltxt :=sqltxt||' order by mp.organization_code, mif.padded_item_number, bor.alternate_routing_designator,'||
2281: ' bos.operation_seq_num, bore.resource_seq_num, br.resource_code ';
2282:
2283: num_rows:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt, 'Routing Operation Resources ');
2284: If (num_rows = row_limit -1 ) Then
2285: JTF_DIAGNOSTIC_COREAPI.Line_Out('
Output of the above table is limited to the first '||(row_limit-1)||' rows to prevent an excessively big output file.
');
2286: End If;
2287: statusStr := 'SUCCESS';
2281: ' bos.operation_seq_num, bore.resource_seq_num, br.resource_code ';
2282:
2283: num_rows:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt, 'Routing Operation Resources ');
2284: If (num_rows = row_limit -1 ) Then
2285: JTF_DIAGNOSTIC_COREAPI.Line_Out('
Output of the above table is limited to the first '||(row_limit-1)||' rows to prevent an excessively big output file.
');
2286: End If;
2287: statusStr := 'SUCCESS';
2288: isFatal := 'FALSE';
2289:
2380: sqltxt :=sqltxt||' and rownum < '||row_limit;
2381: sqltxt :=sqltxt||' order by mp.organization_code, mif.padded_item_number, bor.alternate_routing_designator,'||
2382: ' bos.operation_seq_num,bsor.substitute_group_num,bsor.replacement_group_num,br.resource_code';
2383:
2384: num_rows:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt, 'Routing Operation Sub Resources ');
2385: If (num_rows = row_limit -1 ) Then
2386: JTF_DIAGNOSTIC_COREAPI.Line_Out('
Output of the above table is limited to the first '||(row_limit-1)||' rows to prevent an excessively big output file.
');
2387: End If;
2388: statusStr := 'SUCCESS';
2382: ' bos.operation_seq_num,bsor.substitute_group_num,bsor.replacement_group_num,br.resource_code';
2383:
2384: num_rows:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt, 'Routing Operation Sub Resources ');
2385: If (num_rows = row_limit -1 ) Then
2386: JTF_DIAGNOSTIC_COREAPI.Line_Out('
Output of the above table is limited to the first '||(row_limit-1)||' rows to prevent an excessively big output file.
');
2387: End If;
2388: statusStr := 'SUCCESS';
2389: isFatal := 'FALSE';
2390: /* End of Operation Resource Details */
2444:
2445: sqltxt :=sqltxt||' and rownum < '||row_limit;
2446: sqltxt :=sqltxt||' order by mp.organization_code, mif.padded_item_number, mrir.process_revision';
2447:
2448: num_rows:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt, 'Routing Revisions ');
2449: If (num_rows = row_limit -1 ) Then
2450: JTF_DIAGNOSTIC_COREAPI.Line_Out('
Output of the above table is limited to the first '||(row_limit-1)||' rows to prevent an excessively big output file.
');
2451: End If;
2452: statusStr := 'SUCCESS';
2446: sqltxt :=sqltxt||' order by mp.organization_code, mif.padded_item_number, mrir.process_revision';
2447:
2448: num_rows:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt, 'Routing Revisions ');
2449: If (num_rows = row_limit -1 ) Then
2450: JTF_DIAGNOSTIC_COREAPI.Line_Out('
Output of the above table is limited to the first '||(row_limit-1)||' rows to prevent an excessively big output file.
');
2451: End If;
2452: statusStr := 'SUCCESS';
2453: isFatal := 'FALSE';
2454:
2516: sqltxt :=sqltxt||' and rownum < '||row_limit;
2517: sqltxt :=sqltxt||' order by mp.organization_code, mif.padded_item_number, bor.alternate_routing_designator,'||
2518: ' bos.operation_seq_num, bon.from_op_seq_id, bon.to_op_seq_id ';
2519:
2520: num_rows:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt, 'Routing Operation Networks ');
2521: If (num_rows = row_limit -1 ) Then
2522: JTF_DIAGNOSTIC_COREAPI.Line_Out('
Output of the above table is limited to the first '||(row_limit-1)||' rows to prevent an excessively big output file.
');
2523: End If;
2524:
2518: ' bos.operation_seq_num, bon.from_op_seq_id, bon.to_op_seq_id ';
2519:
2520: num_rows:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt, 'Routing Operation Networks ');
2521: If (num_rows = row_limit -1 ) Then
2522: JTF_DIAGNOSTIC_COREAPI.Line_Out('
Output of the above table is limited to the first '||(row_limit-1)||' rows to prevent an excessively big output file.
');
2523: End If;
2524:
2525: statusStr := 'SUCCESS';
2526: isFatal := 'FALSE';
2527: /* End of Operation Network Details */
2528:
2529:
2530: <
2531: JTF_DIAGNOSTIC_COREAPI.Line_Out('
This data collection script completed as expected
');
2532: report := JTF_DIAGNOSTIC_ADAPTUTIL.constructReport(statusStr,errStr,fixInfo,isFatal);
2533: reportClob := JTF_DIAGNOSTIC_ADAPTUTIL.getReportClob;
2534:
2535: EXCEPTION
2533: reportClob := JTF_DIAGNOSTIC_ADAPTUTIL.getReportClob;
2534:
2535: EXCEPTION
2536: when others then
2537: JTF_DIAGNOSTIC_COREAPI.errorprint('Error: '||sqlerrm);
2538: JTF_DIAGNOSTIC_COREAPI.ActionErrorPrint('If this error repeats, please contact Oracle Support Services');
2539: statusStr := 'FAILURE';
2540: errStr := sqlerrm ||' occurred in script. ';
2541: fixInfo := 'Unexpected Exception in BOMDGIBB.pls';
2534:
2535: EXCEPTION
2536: when others then
2537: JTF_DIAGNOSTIC_COREAPI.errorprint('Error: '||sqlerrm);
2538: JTF_DIAGNOSTIC_COREAPI.ActionErrorPrint('If this error repeats, please contact Oracle Support Services');
2539: statusStr := 'FAILURE';
2540: errStr := sqlerrm ||' occurred in script. ';
2541: fixInfo := 'Unexpected Exception in BOMDGIBB.pls';
2542: isFatal := 'FALSE';