1: package body BOMPASGB as
2: /* $Header: BOMASGBB.pls 115.4 99/07/16 05:08:51 porting sh $ */
3: /*==========================================================================+
4: | Copyright (c) 1993 Oracle Corporation Belmont, California, USA |
5: | All rights reserved. |
4: | Copyright (c) 1993 Oracle Corporation Belmont, California, USA |
5: | All rights reserved. |
6: +===========================================================================+
7: | |
8: | File Name : BOMPASGB.plb |
9: | DESCRIPTION : This package contains functions used to assign bill |
10: | data in the interface tables |
11: | Parameters: org_id organization_id |
12: | all_org process all orgs or just current org |
143: commit;
144: return(0);
145: exception
146: when others then
147: err_text := 'BOMPASGB(bmablorg) ' || substrb(SQLERRM, 1, 60);
148: return(SQLCODE);
149: end bmablorg_assign_bill_orgid;
150:
151: /*------------------------ bmasrev_assign_revision --------------------------*/
290: IMPLEMENTATION_DATE = nvl(effectivity_date, sysdate)
291: where transaction_id = c1rec.TI;
292:
293: if (SQL%NOTFOUND) then
294: err_text := 'BOMPASGB(' || stmt_num || ')' ||
295: substrb(SQLERRM, 1, 60);
296: return(SQLCODE);
297: end if;
298:
310:
311: return(0);
312: EXCEPTION
313: when others then
314: err_text := 'BOMPASGB(bmasrev) ('|| stmt_num ||') ' ||
315: substrb(SQLERRM, 1, 60);
316: return(SQLCODE);
317:
318: END bmasrev_assign_revision;
617: process_flag = 99
618: where transaction_id = c1rec.TI;
619:
620: if (SQL%NOTFOUND) then
621: err_text := 'BOMPASGB(' || stmt_num || ')' ||
622: substrb(SQLERRM, 1, 60);
623: return(SQLCODE);
624: end if;
625: stmt_num := 8;
751:
752: return(0);
753: EXCEPTION
754: when others then
755: err_text := 'BOMPASGB(bmasbilh-' || stmt_num || ') ' ||
756: substrb(SQLERRM, 1, 60);
757: return(SQLCODE);
758: END bmasbilh_assign_bill_header;
759:
1059: return(ret_code);
1060: end if;
1061: goto continue_loop;
1062: when others then
1063: err_text := 'BOMPASGB(bmascomp) '||
1064: substrb(SQLERRM, 1, 60);
1065: return(SQLCODE);
1066: END;
1067: END;
1135: return(0);
1136:
1137: EXCEPTION
1138: when others then
1139: err_text := 'BOMPASGB(bmascomp-' || stmt_num || ')' ||
1140: substrb(SQLERRM, 1, 60);
1141: return(SQLCODE);
1142: END bmascomp_assign_comp;
1143:
1184: EXCEPTION
1185: when NO_DATA_FOUND then
1186: NULL;
1187: when others then
1188: err_text := 'BOMPASGB(bmgblsq) ' || substrb(SQLERRM, 1, 60);
1189: return(SQLCODE);
1190: END;
1191:
1192: select bill_sequence_id
1202: return(0);
1203:
1204: EXCEPTION
1205: when NO_DATA_FOUND then
1206: err_text := 'BOMPASGB(bmgblsq): Bill does not exist';
1207: return(9999);
1208: when others then
1209: bill_seq_id := -1;
1210: err_text := 'BOMPASGB(bmgblsq) ' || substrb(SQLERRM, 1, 60);
1206: err_text := 'BOMPASGB(bmgblsq): Bill does not exist';
1207: return(9999);
1208: when others then
1209: bill_seq_id := -1;
1210: err_text := 'BOMPASGB(bmgblsq) ' || substrb(SQLERRM, 1, 60);
1211: return(SQLCODE);
1212:
1213: END bmgblsq_get_bill_sequence;
1214:
1257: EXCEPTION
1258: when NO_DATA_FOUND then
1259: NULL;
1260: when others then
1261: err_text := 'BOMPASGB(bmgcpsq) ' || substrb(SQLERRM, 1, 60);
1262: return(SQLCODE);
1263: END;
1264:
1265: select component_sequence_id
1274: return(0);
1275:
1276: EXCEPTION
1277: when NO_DATA_FOUND then
1278: err_text := 'BOMPASGB(bmgcpsq): Component does not exist';
1279: return(9999);
1280: when others then
1281: cmp_seq_id := -1;
1282: err_text := 'BOMPASGB(bmgcpsq) ' || substrb(SQLERRM, 1, 60);
1278: err_text := 'BOMPASGB(bmgcpsq): Component does not exist';
1279: return(9999);
1280: when others then
1281: cmp_seq_id := -1;
1282: err_text := 'BOMPASGB(bmgcpsq) ' || substrb(SQLERRM, 1, 60);
1283: return(SQLCODE);
1284:
1285: END bmgcpsq_get_comp_sequence;
1286:
1324: EXCEPTION
1325: when NO_DATA_FOUND then
1326: NULL;
1327: when others then
1328: err_text := 'BOMPASGB(bmgblin) ' || substrb(SQLERRM, 1, 60);
1329: return(SQLCODE);
1330: END;
1331:
1332: select assembly_item_id, organization_id, alternate_bom_designator
1339: return(0);
1340:
1341: EXCEPTION
1342: when NO_DATA_FOUND then
1343: err_text := 'BOMPASGB(bmgblin): Bill sequence id does not exist';
1344: return(9999);
1345: when others then
1346: err_text := 'BOMPASGB(bmgblin) ' || substrb(SQLERRM, 1, 60);
1347: return(SQLCODE);
1342: when NO_DATA_FOUND then
1343: err_text := 'BOMPASGB(bmgblin): Bill sequence id does not exist';
1344: return(9999);
1345: when others then
1346: err_text := 'BOMPASGB(bmgblin) ' || substrb(SQLERRM, 1, 60);
1347: return(SQLCODE);
1348:
1349: END bmgblin_get_bill_info;
1350:
1438: commit;
1439: return(0);
1440: exception
1441: when others then
1442: err_text := 'BOMPASGB(bmasbitm) ' || substrb(SQLERRM, 1, 60);
1443: return(SQLCODE);
1444: end bmasbitm_assign_bom_item_id;
1445:
1446: /*---------------------- bmasbomid_assign_bom_seq_id -----------------------*/
1518:
1519: return(0);
1520: EXCEPTION
1521: when others then
1522: err_text := 'BOMPASGB(' || stmt_num || ') ' || substrb(SQLERRM, 1, 60);
1523: return(SQLCODE);
1524: END bmasbomid_assign_bom_seq_id;
1525:
1526: /*----------------------- bmascmpid_assign_cmp_seq_id -----------------------*/
1598: return(0);
1599:
1600: EXCEPTION
1601: when others then
1602: err_text := 'BOMPASGB(bmascmpid) ' || substrb(SQLERRM, 1, 60);
1603: return(SQLCODE);
1604: END bmascmpid_assign_cmp_seq_id;
1605:
1606: /*------------------------ bmgcpqy_get_comp_quantity ------------------------*/
1638: EXCEPTION
1639: when NO_DATA_FOUND then
1640: NULL;
1641: when others then
1642: err_text := 'BOMPASGB(bmgcpqy) ' || substrb(SQLERRM, 1, 60);
1643: return(SQLCODE);
1644: END;
1645:
1646: select component_quantity
1653: return(0);
1654:
1655: EXCEPTION
1656: when others then
1657: err_text := 'BOMPASGB(bmgcpqy) ' || substrb(SQLERRM, 1, 60);
1658: return(SQLCODE);
1659:
1660: END bmgcpqy_get_comp_quantity;
1661:
2066:
2067: return (0);
2068: EXCEPTION
2069: when others then
2070: err_text := 'BOMPASGB(bmasrefd) ' || substrb(SQLERRM, 1, 60);
2071: return(SQLCODE);
2072:
2073: END bmasrefd_assign_ref_desg_data;
2074:
2554:
2555: return (0);
2556: EXCEPTION
2557: when others then
2558: err_text := 'BOMPASGB(bmassubd) ' || substrb(SQLERRM, 1, 60);
2559: return(SQLCODE);
2560:
2561: END bmassubd_assign_sub_comp_data;
2562:
2560:
2561: END bmassubd_assign_sub_comp_data;
2562:
2563:
2564: END BOMPASGB;