DBA Data[Home] [Help]

APPS.BOMPVALR dependencies on BOMPVALR

Line 1: package body BOMPVALR as

1: package body BOMPVALR as
2: /* $Header: BOMVALRB.pls 120.2.12010000.2 2008/11/14 16:41:56 snandana ship $
3: +===========================================================================+
4: | Copyright (c) 1993 Oracle Corporation Belmont, California, USA |
5: | All rights reserved. |

Line 8: | File Name : BOMPVALR.plb |

4: | Copyright (c) 1993 Oracle Corporation Belmont, California, USA |
5: | All rights reserved. |
6: +===========================================================================+
7: | |
8: | File Name : BOMPVALR.plb |
9: | DESCRIPTION : This package contains functions used to validate routing |
10: | data in the interface tables |
11: | Parameters: org_id organization_id |
12: | all_org process all orgs or just current org |

Line 714: err_text := 'BOMPVALR(bmvrtgh-' || stmt_num || ') ' || substrb(SQLERRM,1,60);

710: return(0);
711:
712: EXCEPTION
713: when others then
714: err_text := 'BOMPVALR(bmvrtgh-' || stmt_num || ') ' || substrb(SQLERRM,1,60);
715: return(SQLCODE);
716: END bmvrtgh_validate_rtg_header;
717:
718: /*------------------------ bmvopr_validate_operations -----------------------*/

Line 832: ret_code := BOMPVALR.bmvdupop_verify_duplicate_op (

828: /*
829: ** verify uniqueness of routing seq id, op seq num, and effectivity date
830: */
831: stmt_num := 3;
832: ret_code := BOMPVALR.bmvdupop_verify_duplicate_op (
833: rtg_seq_id => c1rec.RSI,
834: eff_date => c1rec.ED,
835: op_seq => c1rec.OSN,
836: err_text => err_text);

Line 1098: err_text := 'BOMPVALR(bmvopr-' || stmt_num || ') ' || substrb(SQLERRM,1,60);

1094:
1095: return(0);
1096: EXCEPTION
1097: when others then
1098: err_text := 'BOMPVALR(bmvopr-' || stmt_num || ') ' || substrb(SQLERRM,1,60);
1099: return(SQLCODE);
1100: END bmvopr_validate_operations;
1101:
1102: /*------------------------ bmvres_validate_resources ------------------------*/

Line 1257: err_text := 'BOMPVALR(bmvres) ' || substrb(SQLERRM,1,60);

1253: into dept_id, dummy_eff
1254: from bom_operation_sequences
1255: where operation_sequence_id = c1rec.OSI;
1256: when others then
1257: err_text := 'BOMPVALR(bmvres) ' || substrb(SQLERRM,1,60);
1258: return(SQLCODE);
1259: end;
1260:
1261: /*

Line 1625: ret_code := BOMPVALR.bmvauto_verify_autocharge (

1621: ** Only one PO move per operation
1622: ** Autocharge cannot be PO Move or PO Receipt if
1623: ** the department has no location
1624: */
1625: ret_code := BOMPVALR.bmvauto_verify_autocharge (
1626: op_seq => c1rec.OSI,
1627: dept_id => dept_id,
1628: err_text => err_text);
1629: if (ret_code <> 0) then

Line 1738: err_text := 'BOMPVALR(bmvres-' || stmt_num || ') ' || substrb(SQLERRM,1,60);

1734:
1735: return(0);
1736: EXCEPTION
1737: when others then
1738: err_text := 'BOMPVALR(bmvres-' || stmt_num || ') ' || substrb(SQLERRM,1,60);
1739: return(SQLCODE);
1740: END bmvres_validate_resources;
1741:
1742: /*---------------------- bmvunres_verify_unique_res -------------------------*/

Line 1786: err_text := 'BOMPVALR(bmvunres) ' || substrb(SQLERRM,1,60);

1782: null;
1783: when NOT_UNIQUE then
1784: raise NOT_UNIQUE;
1785: when others then
1786: err_text := 'BOMPVALR(bmvunres) ' || substrb(SQLERRM,1,60);
1787: return(SQLCODE);
1788: end;
1789:
1790: /*

Line 1815: err_text := 'BOMPVALR(bmvunres) ' ||'Duplicate resource seq nums';

1811: return(0);
1812: end if;
1813: exception
1814: when NOT_UNIQUE then
1815: err_text := 'BOMPVALR(bmvunres) ' ||'Duplicate resource seq nums';
1816: return(9999);
1817: when others then
1818: err_text := 'BOMPVALR(bmvunres) ' || substrb(SQLERRM,1,60);
1819: return(SQLCODE);

Line 1818: err_text := 'BOMPVALR(bmvunres) ' || substrb(SQLERRM,1,60);

1814: when NOT_UNIQUE then
1815: err_text := 'BOMPVALR(bmvunres) ' ||'Duplicate resource seq nums';
1816: return(9999);
1817: when others then
1818: err_text := 'BOMPVALR(bmvunres) ' || substrb(SQLERRM,1,60);
1819: return(SQLCODE);
1820: end bmvunres_verify_unique_res;
1821:
1822: /*------------------------ bmvrtgrev_validate_rtg_rev -----------------------*/

Line 2046: ret_code := BOMPVALR.bmvrev_validate_rev (

2042: while continue_loop loop
2043: for c1rec in c1 loop
2044: commit_cnt := commit_cnt + 1;
2045: stmt_num := 4;
2046: ret_code := BOMPVALR.bmvrev_validate_rev (
2047: org_id => c1rec.OI,
2048: assy_id => c1rec.AII,
2049: user_id => user_id,
2050: login_id => login_id,

Line 2076: err_text := 'BOMPVALR(bmvrtgrev)' || substrb(SQLERRM,1,60);

2072: return(0);
2073:
2074: EXCEPTION
2075: when others then
2076: err_text := 'BOMPVALR(bmvrtgrev)' || substrb(SQLERRM,1,60);
2077: return(SQLCODE);
2078: END bmvrtgrev_validate_rtg_rev;
2079:
2080: /*--------------------------- bmvrev_validate_rev ---------------------------*/

Line 2194: err_text := 'BOMPVALR(bmvrev(' || stmt_num || ') ' || substrb(SQLERRM,1,60);

2190: end loop;
2191: return(0);
2192: exception
2193: when others then
2194: err_text := 'BOMPVALR(bmvrev(' || stmt_num || ') ' || substrb(SQLERRM,1,60);
2195: return(SQLCODE);
2196: END bmvrev_validate_rev;
2197:
2198:

Line 2263: err_text := 'BOMPVALR(bmvcmrtg) ' || substrb(SQLERRM,1,60);

2259: exception
2260: when NO_DATA_FOUND then
2261: NULL;
2262: when others then
2263: err_text := 'BOMPVALR(bmvcmrtg) ' || substrb(SQLERRM,1,60);
2264: return(SQLCODE);
2265: end;
2266:
2267: select routing_sequence_id

Line 2288: err_text := 'BOMPVALR(bmvmrtg):Invalid common routing';

2284: <>
2285: return(0);
2286: EXCEPTION
2287: when NO_DATA_FOUND then
2288: err_text := 'BOMPVALR(bmvmrtg):Invalid common routing';
2289: return(9999);
2290: when others then
2291: err_text := 'BOMPVALR(bmcvmrtg) ' || substrb(SQLERRM,1,60);
2292: return(SQLCODE);

Line 2291: err_text := 'BOMPVALR(bmcvmrtg) ' || substrb(SQLERRM,1,60);

2287: when NO_DATA_FOUND then
2288: err_text := 'BOMPVALR(bmvmrtg):Invalid common routing';
2289: return(9999);
2290: when others then
2291: err_text := 'BOMPVALR(bmcvmrtg) ' || substrb(SQLERRM,1,60);
2292: return(SQLCODE);
2293: END bmvcmrtg_verify_common_routing;
2294:
2295: /*------------------------ bmvrtg_verify_rtg_type ---------------------------*/

Line 2343: err_text := 'BOMPVALR(bmvrtg):Invalid routing type or item attribute';

2339: return(0);
2340:
2341: EXCEPTION
2342: when NO_DATA_FOUND then
2343: err_text := 'BOMPVALR(bmvrtg):Invalid routing type or item attribute';
2344: return(9999);
2345: when others then
2346: err_text := 'BOMPVALR(bmvrtg) ' || substrb(SQLERRM,1,60);
2347: return(SQLCODE);

Line 2346: err_text := 'BOMPVALR(bmvrtg) ' || substrb(SQLERRM,1,60);

2342: when NO_DATA_FOUND then
2343: err_text := 'BOMPVALR(bmvrtg):Invalid routing type or item attribute';
2344: return(9999);
2345: when others then
2346: err_text := 'BOMPVALR(bmvrtg) ' || substrb(SQLERRM,1,60);
2347: return(SQLCODE);
2348:
2349: END bmvrtg_verify_rtg_type;
2350:

Line 2401: err_text := 'BOMPVALR(bmvurtg) ' || substrb(SQLERRM,1,60);

2397: NULL;
2398: when NOT_UNIQUE then
2399: raise NOT_UNIQUE;
2400: when others then
2401: err_text := 'BOMPVALR(bmvurtg) ' || substrb(SQLERRM,1,60);
2402: return(SQLCODE);
2403: end;
2404: /*
2405: ** check in interface table

Line 2431: err_text := substrb('BOMPVALR(bmvurtg): Routing does not exist ' || SQLERRM,1,70);

2427: end if;
2428:
2429: EXCEPTION
2430: when NO_DATA_FOUND then
2431: err_text := substrb('BOMPVALR(bmvurtg): Routing does not exist ' || SQLERRM,1,70);
2432: return(9999);
2433: when NOT_UNIQUE then
2434: err_text := 'BOMPVALR(bmvurtg) ' || 'Duplicate routing sequence id';
2435: return(9999);

Line 2434: err_text := 'BOMPVALR(bmvurtg) ' || 'Duplicate routing sequence id';

2430: when NO_DATA_FOUND then
2431: err_text := substrb('BOMPVALR(bmvurtg): Routing does not exist ' || SQLERRM,1,70);
2432: return(9999);
2433: when NOT_UNIQUE then
2434: err_text := 'BOMPVALR(bmvurtg) ' || 'Duplicate routing sequence id';
2435: return(9999);
2436: when others then
2437: err_text := 'BOMPVALR(bmvurtg) ' || substrb(SQLERRM,1,60);
2438: return(SQLCODE);

Line 2437: err_text := 'BOMPVALR(bmvurtg) ' || substrb(SQLERRM,1,60);

2433: when NOT_UNIQUE then
2434: err_text := 'BOMPVALR(bmvurtg) ' || 'Duplicate routing sequence id';
2435: return(9999);
2436: when others then
2437: err_text := 'BOMPVALR(bmvurtg) ' || substrb(SQLERRM,1,60);
2438: return(SQLCODE);
2439: END bmvurtg_verify_routing;
2440:
2441: /*--------------------- bmvduprt_verify_duplicate_rtg ----------------------*/

Line 2487: err_text := 'BOMPVALR(bmvduprt): Rtg already exists in production';

2483: nvl(alt_desg, 'NONE');
2484: raise ALREADY_EXISTS;
2485: exception
2486: when ALREADY_EXISTS then
2487: err_text := 'BOMPVALR(bmvduprt): Rtg already exists in production';
2488: return(cnt);
2489: when NO_DATA_FOUND then
2490: NULL;
2491: when others then

Line 2492: err_text := 'BOMPVALR(bmvduprt) ' || substrb(SQLERRM,1,60);

2488: return(cnt);
2489: when NO_DATA_FOUND then
2490: NULL;
2491: when others then
2492: err_text := 'BOMPVALR(bmvduprt) ' || substrb(SQLERRM,1,60);
2493: return(SQLCODE);
2494: end;
2495:
2496: begin

Line 2510: err_text := 'BOMPVALR(bmvduprt): Rtg already exists in interface';

2506:
2507: raise ALREADY_EXISTS;
2508: exception
2509: when ALREADY_EXISTS then
2510: err_text := 'BOMPVALR(bmvduprt): Rtg already exists in interface';
2511: return(cnt);
2512: when NO_DATA_FOUND then
2513: NULL;
2514: when others then

Line 2515: err_text := 'BOMPVALR(bmvduprt) ' || substrb(SQLERRM,1,60);

2511: return(cnt);
2512: when NO_DATA_FOUND then
2513: NULL;
2514: when others then
2515: err_text := 'BOMPVALR(bmvduprt) ' || substrb(SQLERRM,1,60);
2516: return(SQLCODE);
2517: end;
2518: /*
2519: ** for alternate routings, verify if primary exists (or will exist)

Line 2539: err_text := 'BOMPVALR(bmvduprt) ' || substrb(SQLERRM,1,60);

2535: exception
2536: when NO_DATA_FOUND then
2537: NULL;
2538: when others then
2539: err_text := 'BOMPVALR(bmvduprt) ' || substrb(SQLERRM,1,60);
2540: return(SQLCODE);
2541: end;
2542:
2543: begin

Line 2558: err_text := 'BOMPVALR(bmvduprt): Valid primary does not exist';

2554: and process_flag = 4
2555: and rownum = 1;
2556: exception
2557: when NO_DATA_FOUND then
2558: err_text := 'BOMPVALR(bmvduprt): Valid primary does not exist';
2559: return(9999);
2560: when others then
2561: err_text := 'BOMPVALR(bmvduprt) ' || substrb(SQLERRM,1,60);
2562: return(SQLCODE);

Line 2561: err_text := 'BOMPVALR(bmvduprt) ' || substrb(SQLERRM,1,60);

2557: when NO_DATA_FOUND then
2558: err_text := 'BOMPVALR(bmvduprt): Valid primary does not exist';
2559: return(9999);
2560: when others then
2561: err_text := 'BOMPVALR(bmvduprt) ' || substrb(SQLERRM,1,60);
2562: return(SQLCODE);
2563: end;
2564: end if;
2565:

Line 2570: err_text := 'BOMPVALR(bmvduprt) ' || substrb(SQLERRM,1,60);

2566: return(0);
2567:
2568: EXCEPTION
2569: when others then
2570: err_text := 'BOMPVALR(bmvduprt) ' || substrb(SQLERRM,1,60);
2571: return(SQLCODE);
2572: END bmvduprt_verify_duplicate_rtg;
2573:
2574: /*------------------------ bmvunop_verify_unique_op -------------------------*/

Line 2622: err_text := 'BOMPVALR(bmvunop) ' || substrb(SQLERRM,1,60);

2618: NULL;
2619: when NOT_UNIQUE then
2620: raise NOT_UNIQUE;
2621: when others then
2622: err_text := 'BOMPVALR(bmvunop) ' || substrb(SQLERRM,1,60);
2623: return(SQLCODE);
2624: end;
2625: /*
2626: ** check in interface table

Line 2652: err_text := substrb('BOMPVALR(bmvunop): Operation does not exist '|| SQLERRM,1,70);

2648: end if;
2649:
2650: EXCEPTION
2651: when NO_DATA_FOUND then
2652: err_text := substrb('BOMPVALR(bmvunop): Operation does not exist '|| SQLERRM,1,70);
2653: return(9999);
2654: when NOT_UNIQUE then
2655: err_text := 'BOMPVALR(bmvunop) ' ||'Duplicate op sequence ids';
2656: return(9999);

Line 2655: err_text := 'BOMPVALR(bmvunop) ' ||'Duplicate op sequence ids';

2651: when NO_DATA_FOUND then
2652: err_text := substrb('BOMPVALR(bmvunop): Operation does not exist '|| SQLERRM,1,70);
2653: return(9999);
2654: when NOT_UNIQUE then
2655: err_text := 'BOMPVALR(bmvunop) ' ||'Duplicate op sequence ids';
2656: return(9999);
2657: when others then
2658: err_text := 'BOMPVALR(bmvunop) ' || substrb(SQLERRM,1,60);
2659: return (SQLCODE);

Line 2658: err_text := 'BOMPVALR(bmvunop) ' || substrb(SQLERRM,1,60);

2654: when NOT_UNIQUE then
2655: err_text := 'BOMPVALR(bmvunop) ' ||'Duplicate op sequence ids';
2656: return(9999);
2657: when others then
2658: err_text := 'BOMPVALR(bmvunop) ' || substrb(SQLERRM,1,60);
2659: return (SQLCODE);
2660: END bmvunop_verify_unique_op;
2661:
2662: /*--------------------- bmvdupop_verify_duplicate_op ------------------------*/

Line 2704: err_text := 'BOMPVALR(bmvdupop): Operation already exists in production';

2700: and operation_seq_num = op_seq;
2701: raise ALREADY_EXISTS;
2702: exception
2703: when ALREADY_EXISTS then
2704: err_text := 'BOMPVALR(bmvdupop): Operation already exists in production';
2705: return(cnt);
2706: when NO_DATA_FOUND then
2707: NULL;
2708: when others then

Line 2709: err_text := 'BOMPVALR(bmvdupop) ' || substrb(SQLERRM,1,60);

2705: return(cnt);
2706: when NO_DATA_FOUND then
2707: NULL;
2708: when others then
2709: err_text := 'BOMPVALR(bmvdupop) ' || substrb(SQLERRM,1,60);
2710: return(SQLCODE);
2711: end;
2712:
2713: begin

Line 2727: err_text := 'BOMPVALR(bmvdupop): Operation already exists in interface';

2723:
2724: raise ALREADY_EXISTS;
2725: exception
2726: when ALREADY_EXISTS then
2727: err_text := 'BOMPVALR(bmvdupop): Operation already exists in interface';
2728: return(cnt);
2729: when NO_DATA_FOUND then
2730: NULL;
2731: when others then

Line 2732: err_text := 'BOMPVALR(bmvdupop) ' || substrb(SQLERRM,1,60);

2728: return(cnt);
2729: when NO_DATA_FOUND then
2730: NULL;
2731: when others then
2732: err_text := 'BOMPVALR(bmvdupop) ' || substrb(SQLERRM,1,60);
2733: return(SQLCODE);
2734: end;
2735: return(0);
2736:

Line 2739: err_text := 'BOMPVALR(bmvdupop) ' || substrb(SQLERRM,1,60);

2735: return(0);
2736:
2737: EXCEPTION
2738: when others then
2739: err_text := 'BOMPVALR(bmvdupop) ' || substrb(SQLERRM,1,60);
2740: return(SQLCODE);
2741: END bmvdupop_verify_duplicate_op;
2742:
2743: /*------------------------ bmvovlap_verify_overlaps -------------------------*/

Line 2823: err_text := 'BOMPVALR(bmvovlap)' || substrb(SQLERRM,1,60);

2819: when OVERLAP then
2820: err_text := 'Operation causes overlapping effectivity';
2821: return(9999);
2822: when others then
2823: err_text := 'BOMPVALR(bmvovlap)' || substrb(SQLERRM,1,60);
2824: return(SQLCODE);
2825: END bmvovlap_verify_overlaps;
2826:
2827: /*---------------------- bmvdept_validate_department -----------------------*/

Line 2864: err_text := 'BOMPVALR(bmvdept):Invalid department';

2860:
2861: return(0);
2862: EXCEPTION
2863: when NO_DATA_FOUND then
2864: err_text := 'BOMPVALR(bmvdept):Invalid department';
2865: return(SQLCODE);
2866: when others then
2867: err_text := 'BOMPVALR(bmvdept)' || substrb(SQLERRM,1,60);
2868: return(SQLCODE);

Line 2867: err_text := 'BOMPVALR(bmvdept)' || substrb(SQLERRM,1,60);

2863: when NO_DATA_FOUND then
2864: err_text := 'BOMPVALR(bmvdept):Invalid department';
2865: return(SQLCODE);
2866: when others then
2867: err_text := 'BOMPVALR(bmvdept)' || substrb(SQLERRM,1,60);
2868: return(SQLCODE);
2869: END bmvdept_validate_department;
2870:
2871: /*-------------------- bmvrsch_verify_resource_sched -----------------------*/

Line 2905: err_text := 'BOMPVALR(bmvrsch):More than one Next or Prior scheduled resource';

2901: and schedule_flag = sched_type
2902: and process_flag <> 3 and process_flag <> 7;
2903:
2904: if (res_cnt > 1) then
2905: err_text := 'BOMPVALR(bmvrsch):More than one Next or Prior scheduled resource';
2906: return (9999);
2907: end if;
2908: /*
2909: ** if only one resource was found then make sure none exist in the

Line 2920: err_text := 'BOMPVALR(bmvrsch):More than one Next or Prior scheduled resource';

2916: where operation_sequence_id = op_seq
2917: and schedule_flag = sched_type;
2918:
2919: if (res_cnt <> 0) then
2920: err_text := 'BOMPVALR(bmvrsch):More than one Next or Prior scheduled resource';
2921: return (9999);
2922: end if;
2923: end if;
2924:

Line 2930: err_text := 'BOMPVALR(bmvrsch)' || substrb(SQLERRM,1,60);

2926: EXCEPTION
2927: when NO_DATA_FOUND then
2928: return(0);
2929: when others then
2930: err_text := 'BOMPVALR(bmvrsch)' || substrb(SQLERRM,1,60);
2931: return(SQLCODE);
2932: END bmvrsch_verify_resource_sched;
2933:
2934: /*---------------------- bmvauto_verify_autocharge --------------------------*/

Line 2972: err_text := 'BOMPVALR(bmvauto):Invalid autocharge type, no loc';

2968: where bd.department_id = dept_id
2969: and bd.location_id is not null);
2970:
2971: if (cnt <> 0) then
2972: err_text := 'BOMPVALR(bmvauto):Invalid autocharge type, no loc';
2973: return(9999);
2974: end if;
2975:
2976: select count(*)

Line 2983: err_text := 'BOMPVALR(bmvauto):Invalid autocharge type, too many';

2979: where operation_sequence_id = op_seq
2980: and autocharge_type = 4
2981: and process_flag <> 3 and process_flag <> 7;
2982: if (cnt > 1) then
2983: err_text := 'BOMPVALR(bmvauto):Invalid autocharge type, too many';
2984: return(9999);
2985: end if;
2986:
2987: if (cnt = 1) then

Line 2994: err_text := 'BOMPVALR(bmvauto):Invalid autocharge type, too many';

2990: from bom_operation_resources
2991: where operation_sequence_id = op_seq
2992: and autocharge_type = 4;
2993: if (cnt > 0) then
2994: err_text := 'BOMPVALR(bmvauto):Invalid autocharge type, too many';
2995: return(9999);
2996: end if;
2997: end if;
2998:

Line 3003: err_text := 'BOMPVALR(bmvauto)' || substrb(SQLERRM,1,60);

2999: return (0);
3000:
3001: EXCEPTION
3002: when others then
3003: err_text := 'BOMPVALR(bmvauto)' || substrb(SQLERRM,1,60);
3004: return (SQLCODE);
3005: END bmvauto_verify_autocharge;
3006:
3007: END BOMPVALR;

Line 3007: END BOMPVALR;

3003: err_text := 'BOMPVALR(bmvauto)' || substrb(SQLERRM,1,60);
3004: return (SQLCODE);
3005: END bmvauto_verify_autocharge;
3006:
3007: END BOMPVALR;