1100: AND SCE_USER_ID = FND_GLOBAL.user_id ;
1101: end if;
1102: EXCEPTION
1103: WHEN no_data_found THEN
1104: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
1105: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'get_user_prefs','No preference set found');
1106: end if;
1107: -- v_pref := null;
1108: -- set_default_prefs;
1101: end if;
1102: EXCEPTION
1103: WHEN no_data_found THEN
1104: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
1105: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'get_user_prefs','No preference set found');
1106: end if;
1107: -- v_pref := null;
1108: -- set_default_prefs;
1109: END;
1170:
1171:
1172: EXCEPTION
1173: when no_data_found then
1174: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
1175: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'get_user_prefs','No preference set found');
1176: end if;
1177: v_pref := null;
1178: set_default_prefs;
1171:
1172: EXCEPTION
1173: when no_data_found then
1174: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
1175: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'get_user_prefs','No preference set found');
1176: end if;
1177: v_pref := null;
1178: set_default_prefs;
1179:
1177: v_pref := null;
1178: set_default_prefs;
1179:
1180: when others then
1181: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
1182: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'get_user_prefs',' Other ' || SQLERRM);
1183: end if;
1184: v_pref := null;
1185: set_default_prefs;
1178: set_default_prefs;
1179:
1180: when others then
1181: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
1182: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'get_user_prefs',' Other ' || SQLERRM);
1183: end if;
1184: v_pref := null;
1185: set_default_prefs;
1186:
1523:
1524: Exception
1525: when NO_DATA_FOUND then
1526: arg_err_msg := arg_err_msg || ' Bkt gen' || SQLERRM;
1527: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
1528: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'get_bucket_dates',' Bkt gen ' || SQLERRM);
1529: end if;
1530:
1531: return ;
1524: Exception
1525: when NO_DATA_FOUND then
1526: arg_err_msg := arg_err_msg || ' Bkt gen' || SQLERRM;
1527: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
1528: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'get_bucket_dates',' Bkt gen ' || SQLERRM);
1529: end if;
1530:
1531: return ;
1532:
1635:
1636: EXCEPTION
1637: WHEN OTHERS THEN
1638: arg_err_msg := ' check_for_multiple_sites ' || SQLERRM || ' ' || l_statement;
1639: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
1640: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'check_for_multiple_sites', SQLERRM);
1641: end if;
1642: raise;
1643: END check_for_multiple_sites ;
1636: EXCEPTION
1637: WHEN OTHERS THEN
1638: arg_err_msg := ' check_for_multiple_sites ' || SQLERRM || ' ' || l_statement;
1639: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
1640: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'check_for_multiple_sites', SQLERRM);
1641: end if;
1642: raise;
1643: END check_for_multiple_sites ;
1644:
1744:
1745: EXCEPTION
1746: when others then
1747: arg_err_msg := arg_err_msg || ' initialize ' || SQLERRM;
1748: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
1749: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'initialize', SQLERRM);
1750: end if;
1751: raise ;
1752: END initialize ;
1745: EXCEPTION
1746: when others then
1747: arg_err_msg := arg_err_msg || ' initialize ' || SQLERRM;
1748: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
1749: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'initialize', SQLERRM);
1750: end if;
1751: raise ;
1752: END initialize ;
1753:
1774:
1775: EXCEPTION
1776: when others then
1777: arg_err_msg := arg_err_msg || ' set dates ' || SQLERRM;
1778: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
1779: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'set_date_variables', SQLERRM);
1780: end if;
1781: return ;
1782: END set_date_variables ;
1775: EXCEPTION
1776: when others then
1777: arg_err_msg := arg_err_msg || ' set dates ' || SQLERRM;
1778: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
1779: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'set_date_variables', SQLERRM);
1780: end if;
1781: return ;
1782: END set_date_variables ;
1783:
1801:
1802: EXCEPTION
1803: when others then
1804: arg_err_msg := arg_err_msg || 'print_query ' || SQLERRM ;
1805: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
1806: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'print_query', SQLERRM);
1807: end if;
1808: raise;
1809: END print_query ;
1802: EXCEPTION
1803: when others then
1804: arg_err_msg := arg_err_msg || 'print_query ' || SQLERRM ;
1805: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
1806: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'print_query', SQLERRM);
1807: end if;
1808: raise;
1809: END print_query ;
1810:
1920:
1921: return ret_str;
1922: EXCEPTION
1923: when no_data_found then
1924: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
1925: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'convert_to_string', 'No data found');
1926: end if;
1927: return null;
1928:
1921: return ret_str;
1922: EXCEPTION
1923: when no_data_found then
1924: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
1925: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'convert_to_string', 'No data found');
1926: end if;
1927: return null;
1928:
1929: when others then
1926: end if;
1927: return null;
1928:
1929: when others then
1930: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
1931: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'convert_to_string', SQLERRM);
1932: end if;
1933: return null;
1934: END;
1927: return null;
1928:
1929: when others then
1930: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
1931: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'convert_to_string', SQLERRM);
1932: end if;
1933: return null;
1934: END;
1935:
1964:
1965: return v_array;
1966: EXCEPTION
1967: when no_data_found then
1968: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
1969: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'add_to_array', 'No data found');
1970: end if;
1971: return v_array;
1972:
1965: return v_array;
1966: EXCEPTION
1967: when no_data_found then
1968: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
1969: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'add_to_array', 'No data found');
1970: end if;
1971: return v_array;
1972:
1973: when others then
1970: end if;
1971: return v_array;
1972:
1973: when others then
1974: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
1975: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'add_to_array', SQLERRM);
1976: end if;
1977: return v_array;
1978: END;
1971: return v_array;
1972:
1973: when others then
1974: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
1975: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'add_to_array', SQLERRM);
1976: end if;
1977: return v_array;
1978: END;
1979:
2070: end if;
2071:
2072: EXCEPTION
2073: WHEN OTHERS THEN
2074: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
2075: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'set_editable_row', SQLERRM);
2076: end if;
2077: null;
2078: END set_editable_row ;
2071:
2072: EXCEPTION
2073: WHEN OTHERS THEN
2074: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
2075: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'set_editable_row', SQLERRM);
2076: end if;
2077: null;
2078: END set_editable_row ;
2079:
2148:
2149: EXCEPTION
2150: when others then
2151: arg_err_msg := arg_err_msg || ' set data' || SQLERRM ;
2152: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
2153: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'set_non_qty_data', SQLERRM);
2154: end if;
2155: raise;
2156: END set_non_qty_data;
2149: EXCEPTION
2150: when others then
2151: arg_err_msg := arg_err_msg || ' set data' || SQLERRM ;
2152: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
2153: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'set_non_qty_data', SQLERRM);
2154: end if;
2155: raise;
2156: END set_non_qty_data;
2157:
2456:
2457: EXCEPTION
2458: WHEN OTHERS THEN
2459: arg_err_msg := ' calculate_past_due_quantity ' || SQLERRM;
2460: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
2461: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'calculate_past_due_quantity', SQLERRM);
2462: end if;
2463: raise;
2464: END calc_past_due_qty ;
2457: EXCEPTION
2458: WHEN OTHERS THEN
2459: arg_err_msg := ' calculate_past_due_quantity ' || SQLERRM;
2460: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
2461: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'calculate_past_due_quantity', SQLERRM);
2462: end if;
2463: raise;
2464: END calc_past_due_qty ;
2465:
2685: -- commit;
2686: EXCEPTION
2687: when others then
2688: arg_err_msg := arg_err_msg || ' calc bkt data' || SQLERRM;
2689: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
2690: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'calculate_bucket_data', SQLERRM);
2691: end if;
2692: raise;
2693: END calculate_bucket_data;
2686: EXCEPTION
2687: when others then
2688: arg_err_msg := arg_err_msg || ' calc bkt data' || SQLERRM;
2689: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
2690: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'calculate_bucket_data', SQLERRM);
2691: end if;
2692: raise;
2693: END calculate_bucket_data;
2694:
2931:
2932: EXCEPTION
2933: WHEN OTHERS THEN
2934: arg_err_msg := ' prepare_sql ' || SQLERRM || ' ' || l_statement;
2935: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
2936: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'prepare_sql', SQLERRM);
2937: end if;
2938: raise;
2939: END prepare_sql ;
2932: EXCEPTION
2933: WHEN OTHERS THEN
2934: arg_err_msg := ' prepare_sql ' || SQLERRM || ' ' || l_statement;
2935: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
2936: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'prepare_sql', SQLERRM);
2937: end if;
2938: raise;
2939: END prepare_sql ;
2940:
3070: end if;
3071: EXCEPTION
3072: when others then
3073: arg_err_msg := arg_err_msg || ' Add companion row ' || SQLERRM;
3074: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
3075: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'add_companion_row', SQLERRM);
3076: end if;
3077: null;
3078: END ;
3071: EXCEPTION
3072: when others then
3073: arg_err_msg := arg_err_msg || ' Add companion row ' || SQLERRM;
3074: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
3075: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'add_companion_row', SQLERRM);
3076: end if;
3077: null;
3078: END ;
3079:
3177: var_supplier_id(i),var_supplier_site_id(i),v_next_item,0) ;
3178: end if;
3179: EXCEPTION
3180: when others then
3181: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
3182: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'add_companion_row', SQLERRM);
3183: end if;
3184: null;
3185: END ;
3178: end if;
3179: EXCEPTION
3180: when others then
3181: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
3182: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'add_companion_row', SQLERRM);
3183: end if;
3184: null;
3185: END ;
3186:
3188:
3189:
3190: EXCEPTION
3191: when others then
3192: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
3193: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'add_companion_row', SQLERRM);
3194: end if;
3195:
3196: END add_companion_row ;
3189:
3190: EXCEPTION
3191: when others then
3192: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
3193: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'add_companion_row', SQLERRM);
3194: end if;
3195:
3196: END add_companion_row ;
3197:
3240: WHERE query_id = arg_query_id
3241: AND line_id = var_line_id(i);
3242: EXCEPTION
3243: when others then
3244: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
3245: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'correct_next_item', SQLERRM);
3246: end if;
3247: END correct_next_item;
3248:
3241: AND line_id = var_line_id(i);
3242: EXCEPTION
3243: when others then
3244: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
3245: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'correct_next_item', SQLERRM);
3246: end if;
3247: END correct_next_item;
3248:
3249: /**
3316: end if;
3317: EXCEPTION
3318: when others then
3319: arg_err_msg := arg_err_msg || ' insert total ' || SQLERRM;
3320: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
3321: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'insert_total', SQLERRM);
3322: end if;
3323: if c_Total%ISOPEN then
3324: CLOSE c_Total;
3317: EXCEPTION
3318: when others then
3319: arg_err_msg := arg_err_msg || ' insert total ' || SQLERRM;
3320: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
3321: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'insert_total', SQLERRM);
3322: end if;
3323: if c_Total%ISOPEN then
3324: CLOSE c_Total;
3325: end if;
3482: end if;
3483: EXCEPTION
3484: when others then
3485: arg_err_msg := arg_err_msg || ' insert running total ' || SQLERRM;
3486: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
3487: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'insert_running_total', SQLERRM);
3488: end if;
3489: if c_runTotal%ISOPEN then
3490: CLOSE c_runTotal;
3483: EXCEPTION
3484: when others then
3485: arg_err_msg := arg_err_msg || ' insert running total ' || SQLERRM;
3486: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
3487: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'insert_running_total', SQLERRM);
3488: end if;
3489: if c_runTotal%ISOPEN then
3490: CLOSE c_runTotal;
3491: end if;
3854: END IF;
3855: EXCEPTION
3856: when others then
3857: arg_err_msg := arg_err_msg || ' insert running total ' || SQLERRM;
3858: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
3859: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'insert_running_total', SQLERRM);
3860: end if;
3861: if c_runTotal%ISOPEN then
3862: CLOSE c_runTotal;
3855: EXCEPTION
3856: when others then
3857: arg_err_msg := arg_err_msg || ' insert running total ' || SQLERRM;
3858: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
3859: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'insert_running_total', SQLERRM);
3860: end if;
3861: if c_runTotal%ISOPEN then
3862: CLOSE c_runTotal;
3863: end if;
3938: end if;
3939: EXCEPTION
3940: when others then
3941: arg_err_msg := arg_err_msg || ' insert running total ' || SQLERRM;
3942: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
3943: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'insert_running_total', SQLERRM);
3944: end if;
3945: if c_runTotal%ISOPEN then
3946: CLOSE c_runTotal;
3939: EXCEPTION
3940: when others then
3941: arg_err_msg := arg_err_msg || ' insert running total ' || SQLERRM;
3942: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
3943: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'insert_running_total', SQLERRM);
3944: end if;
3945: if c_runTotal%ISOPEN then
3946: CLOSE c_runTotal;
3947: end if;
3968: BEGIN
3969: get_user_prefs(v_pref);
3970: EXCEPTION
3971: when others then
3972: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
3973: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'populate_bucketed_quantity', 'user prefs' || SQLERRM);
3974: end if;
3975: set_default_prefs;
3976: END;
3969: get_user_prefs(v_pref);
3970: EXCEPTION
3971: when others then
3972: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
3973: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'populate_bucketed_quantity', 'user prefs' || SQLERRM);
3974: end if;
3975: set_default_prefs;
3976: END;
3977:
4002: BEGIN
4003: get_user_prefs(v_pref);
4004: EXCEPTION
4005: when others then
4006: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4007: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'populate_bucketed_quantity', 'user prefs' || SQLERRM);
4008: end if;
4009: set_default_prefs;
4010: END;
4003: get_user_prefs(v_pref);
4004: EXCEPTION
4005: when others then
4006: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4007: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'populate_bucketed_quantity', 'user prefs' || SQLERRM);
4008: end if;
4009: set_default_prefs;
4010: END;
4011: get_bucket_dates(arg_from_date, v_calendar_code);
4276: WHERE query_id = arg_query_id ;
4277:
4278: EXCEPTION
4279: when no_data_found then
4280: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4281: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module||'populate_bucketed_quantity','Get rec cnt '||SQLERRM);
4282: end if;
4283: record_cnt := 0;
4284:
4277:
4278: EXCEPTION
4279: when no_data_found then
4280: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4281: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module||'populate_bucketed_quantity','Get rec cnt '||SQLERRM);
4282: end if;
4283: record_cnt := 0;
4284:
4285: when others then
4282: end if;
4283: record_cnt := 0;
4284:
4285: when others then
4286: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4287: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module||'populate_bucketed_quantity','Get rec cnt '||SQLERRM);
4288: end if;
4289: record_cnt :=0;
4290: END;
4283: record_cnt := 0;
4284:
4285: when others then
4286: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4287: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module||'populate_bucketed_quantity','Get rec cnt '||SQLERRM);
4288: end if;
4289: record_cnt :=0;
4290: END;
4291:
4321: end if;
4322: EXCEPTION
4323: when others then
4324: arg_err_msg := arg_err_msg || ' cleanup ' || SQLERRM;
4325: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4326: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module||'populate_bucketed_quantity','Cleanup '||SQLERRM);
4327: end if;
4328:
4329: END;
4322: EXCEPTION
4323: when others then
4324: arg_err_msg := arg_err_msg || ' cleanup ' || SQLERRM;
4325: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4326: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module||'populate_bucketed_quantity','Cleanup '||SQLERRM);
4327: end if;
4328:
4329: END;
4330:
4383: end if;
4384: EXCEPTION
4385: when others then
4386: arg_err_msg := arg_err_msg || ' insert records ' || SQLERRM ;
4387: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4388: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module||'populate_bucketed_quantity','Insert record '||SQLERRM);
4389: end if;
4390: raise;
4391:
4384: EXCEPTION
4385: when others then
4386: arg_err_msg := arg_err_msg || ' insert records ' || SQLERRM ;
4387: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4388: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module||'populate_bucketed_quantity','Insert record '||SQLERRM);
4389: end if;
4390: raise;
4391:
4392: END ;
4476:
4477: EXCEPTION
4478: when others then
4479: arg_err_msg := arg_err_msg || ' Upd owner item etc. ' || SQLERRM;
4480: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4481: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module||'populate_bucketed_quantity','Upd owner item '||SQLERRM);
4482: end if;
4483: END ;
4484: end if;
4477: EXCEPTION
4478: when others then
4479: arg_err_msg := arg_err_msg || ' Upd owner item etc. ' || SQLERRM;
4480: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4481: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module||'populate_bucketed_quantity','Upd owner item '||SQLERRM);
4482: end if;
4483: END ;
4484: end if;
4485:
4506: add_companion_row(arg_query_id);
4507: EXCEPTION
4508: when others then
4509: arg_err_msg := arg_err_msg || ' companion row ' || SQLERRM;
4510: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4511: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module||'populate_bucketed_quantity',' companion row '||SQLERRM);
4512: end if;
4513: END;
4514:
4507: EXCEPTION
4508: when others then
4509: arg_err_msg := arg_err_msg || ' companion row ' || SQLERRM;
4510: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4511: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module||'populate_bucketed_quantity',' companion row '||SQLERRM);
4512: end if;
4513: END;
4514:
4515:
4638:
4639: EXCEPTION
4640: when no_data_found then
4641: arg_err_msg := arg_err_msg || ' update ' || SQLERRM;
4642: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4643: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module||'populate_bucketed_quantity','Update '||SQLERRM);
4644: end if;
4645:
4646: when others then
4639: EXCEPTION
4640: when no_data_found then
4641: arg_err_msg := arg_err_msg || ' update ' || SQLERRM;
4642: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4643: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module||'populate_bucketed_quantity','Update '||SQLERRM);
4644: end if;
4645:
4646: when others then
4647: -- do nothing
4645:
4646: when others then
4647: -- do nothing
4648: arg_err_msg := arg_err_msg || ' update-2' || SQLERRM;
4649: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4650: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module||'populate_bucketed_quantity','Update '||SQLERRM);
4651: end if;
4652:
4653: END;
4646: when others then
4647: -- do nothing
4648: arg_err_msg := arg_err_msg || ' update-2' || SQLERRM;
4649: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4650: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module||'populate_bucketed_quantity','Update '||SQLERRM);
4651: end if;
4652:
4653: END;
4654:
4684:
4685: end if;
4686: EXCEPTION
4687: when others then
4688: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4689: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module||'populate_bucketed_quantity', 'Run tot '||SQLERRM);
4690: end if;
4691: null;
4692: END;
4685: end if;
4686: EXCEPTION
4687: when others then
4688: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4689: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module||'populate_bucketed_quantity', 'Run tot '||SQLERRM);
4690: end if;
4691: null;
4692: END;
4693:
4721: END IF;
4722:
4723: EXCEPTION
4724: WHEN others THEN
4725: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4726: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module||'net_forecast', 'Net Forecast '||SQLERRM);
4727: end if;
4728: END;
4729:
4722:
4723: EXCEPTION
4724: WHEN others THEN
4725: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4726: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module||'net_forecast', 'Net Forecast '||SQLERRM);
4727: end if;
4728: END;
4729:
4730:
4744: END IF;
4745:
4746: EXCEPTION
4747: WHEN others THEN
4748: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4749: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module||'total_supply', 'Total Supply '||SQLERRM);
4750: end if;
4751: END;
4752:
4745:
4746: EXCEPTION
4747: WHEN others THEN
4748: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4749: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module||'total_supply', 'Total Supply '||SQLERRM);
4750: end if;
4751: END;
4752:
4753:
4787: arg_query_id := -1;
4788: end if;
4789: EXCEPTION
4790: when no_data_found then
4791: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4792: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module||'populate_bucketed_quantity','Upd Bkt flag '||SQLERRM);
4793: end if;
4794:
4795: when others then
4788: end if;
4789: EXCEPTION
4790: when no_data_found then
4791: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4792: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module||'populate_bucketed_quantity','Upd Bkt flag '||SQLERRM);
4793: end if;
4794:
4795: when others then
4796: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4792: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module||'populate_bucketed_quantity','Upd Bkt flag '||SQLERRM);
4793: end if;
4794:
4795: when others then
4796: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4797: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module||'populate_bucketed_quantity','Upd Bkt flag '||SQLERRM);
4798: end if;
4799:
4800: END ;
4793: end if;
4794:
4795: when others then
4796: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4797: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module||'populate_bucketed_quantity','Upd Bkt flag '||SQLERRM);
4798: end if;
4799:
4800: END ;
4801:
4807: end if;
4808:
4809: EXCEPTION
4810: WHEN NO_DATA_FOUND THEN
4811: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4812: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'populate_bucketed_quantity', SQLERRM);
4813: end if;
4814: arg_query_id :=-1;
4815: arg_num_rowset := 0 ;
4808:
4809: EXCEPTION
4810: WHEN NO_DATA_FOUND THEN
4811: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4812: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'populate_bucketed_quantity', SQLERRM);
4813: end if;
4814: arg_query_id :=-1;
4815: arg_num_rowset := 0 ;
4816: arg_err_msg := arg_err_msg || fnd_message.get_string('MSC','MSC_X_HZ_NODATA');
4819: close osce_bucketed_plan;
4820: end if;
4821:
4822: WHEN OTHERS THEN
4823: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4824: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'populate_bucketed_quantity', SQLERRM);
4825: end if;
4826: arg_query_id :=-1;
4827: arg_err_msg := arg_err_msg || fnd_message.get_string('MSC','MSC_X_HZ_NODATA');
4820: end if;
4821:
4822: WHEN OTHERS THEN
4823: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4824: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'populate_bucketed_quantity', SQLERRM);
4825: end if;
4826: arg_query_id :=-1;
4827: arg_err_msg := arg_err_msg || fnd_message.get_string('MSC','MSC_X_HZ_NODATA');
4828: arg_num_rowset := 0 ;
4849:
4850: return v_name;
4851: EXCEPTION
4852: when no_data_found then
4853: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4854: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'get_lookup', SQLERRM);
4855: end if;
4856: return null;
4857:
4850: return v_name;
4851: EXCEPTION
4852: when no_data_found then
4853: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4854: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'get_lookup', SQLERRM);
4855: end if;
4856: return null;
4857:
4858: when others then
4855: end if;
4856: return null;
4857:
4858: when others then
4859: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4860: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'get_lookup', SQLERRM);
4861: end if;
4862: return null;
4863: END;
4856: return null;
4857:
4858: when others then
4859: if( FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4860: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,module || 'get_lookup', SQLERRM);
4861: end if;
4862: return null;
4863: END;
4864: