490: l_item_id := Null;
491: End;
492:
493: if p_called_from = 'PART_STATUS' then
494: insert into csp_sup_dem_sub_temp(
495: inventory_item_id,
496: organization_id,
497: subinventory_code,
498: planning_parameters_id,
612: l_excess := nvl(l_total_onhand,0) - nvl(l_demand,0);
613:
614: if l_excess > 0 then
615: if p_called_from = 'PART_STATUS' then
616: insert into csp_sup_dem_sub_temp(
617: inventory_item_id,
618: organization_id,
619: subinventory_code,
620: planning_parameters_id,
724: l_excess := nvl(l_onhand,0) - nvl(l_demand,0);
725:
726: if nvl(l_excess,0) > 0 then
727: if p_called_from = 'PART_STATUS' then
728: insert into csp_sup_dem_sub_temp(
729: inventory_item_id,
730: organization_id,
731: subinventory_code,
732: planning_parameters_id,
1138: begin
1139:
1140: for d in defectives loop
1141: if p_called_from = 'PART_STATUS' then
1142: insert into csp_sup_dem_sub_temp(
1143: inventory_item_id,
1144: organization_id,
1145: subinventory_code,
1146: planning_parameters_id,