DBA Data[Home] [Help]

APPS.CSP_EXCESS_PARTS_PVT dependencies on CSP_EXCESS_LISTS

Line 512: csp_excess_lists_pkg.Insert_Row(

508: rec.hierarchy_node_id,
509: NVL(inv_rec.TOT_AVAIL_QTY,0) - NVL(inv_rec.SUPPLY_QTY,0) - NVL(inv_rec.MAX_QTY,0));
510: else
511: x_excess_line_id := null;
512: csp_excess_lists_pkg.Insert_Row(
513: px_EXCESS_LINE_ID => x_excess_line_id,
514: p_CREATED_BY => fnd_global.user_id,
515: p_CREATION_DATE => sysdate,
516: p_LAST_UPDATED_BY => fnd_global.user_id,

Line 605: csp_excess_lists_pkg.Insert_Row(

601: rec.hierarchy_node_id,
602: l_excess);
603: else
604: x_excess_line_id := null;
605: csp_excess_lists_pkg.Insert_Row(
606: px_EXCESS_LINE_ID => x_excess_line_id,
607: p_CREATED_BY => fnd_global.user_id,
608: p_CREATION_DATE => sysdate,
609: p_LAST_UPDATED_BY => fnd_global.user_id,

Line 690: csp_excess_lists_pkg.Insert_Row(

686: rec.hierarchy_node_id,
687: l_excess);
688: else
689: x_excess_line_id := null;
690: csp_excess_lists_pkg.Insert_Row(
691: px_EXCESS_LINE_ID => x_excess_line_id,
692: p_CREATED_BY => fnd_global.user_id,
693: p_CREATION_DATE => sysdate,
694: p_LAST_UPDATED_BY => fnd_global.user_id,

Line 739: update csp_excess_lists

735: p_organization_id => p_organization_id,
736: p_subinventory_code => p_subinventory_code,
737: p_excess_rule_id => l_excess_rule_id);
738: else
739: update csp_excess_lists
740: set excess_status = 'O'
741: where excess_status = 'P';
742: commit;
743: end if;

Line 776: csp_excess_lists cel

772: cursor excess_value is
773: select sum(cel.excess_quantity * NVL(ITEM_COST,0))
774: from CST_ITEM_COSTS cic,
775: CST_COST_TYPES cct,
776: csp_excess_lists cel
777: where cic.ORGANIZATION_ID = cel.organization_id
778: and cic.inventory_item_id = cel.inventory_item_id
779: and cic.COST_TYPE_ID = cct.COST_TYPE_ID
780: and cct.COST_TYPE_ID = cct.DEFAULT_COST_TYPE_ID

Line 812: from csp_excess_lists cel,

808: cursor org_line_quantity is
809: select cel.excess_line_id,
810: cel.excess_quantity,
811: msib.max_minmax_quantity
812: from csp_excess_lists cel,
813: mtl_system_items_b msib
814: where cel.organization_id = p_organization_id
815: and cel.organization_id = msib.organization_id
816: and cel.inventory_item_id = msib.inventory_item_id

Line 823: from csp_excess_lists cel,

819: cursor sub_line_quantity is
820: select cel.excess_line_id,
821: cel.excess_quantity,
822: misi.max_minmax_quantity
823: from csp_excess_lists cel,
824: mtl_item_sub_inventories misi
825: where cel.organization_id = p_organization_id
826: and cel.organization_id = misi.organization_id
827: and cel.subinventory_code = misi.secondary_inventory

Line 853: from csp_excess_lists cel

849:
850: cursor excess_lines is
851: select cel.excess_line_id,
852: cel.inventory_item_id
853: from csp_excess_lists cel
854: where cel.organization_id = p_organization_id
855: and cel.excess_status = 'P';
856:
857: cursor excess_line_value is

Line 862: csp_excess_lists cel

858: select cel.excess_line_id,
859: cel.excess_quantity * NVL(ITEM_COST,0) value
860: from CST_ITEM_COSTS cic,
861: CST_COST_TYPES cct,
862: csp_excess_lists cel
863: where cel.organization_id = p_organization_id
864: and cic.ORGANIZATION_ID = cel.organization_id
865: and cic.inventory_item_id = cel.inventory_item_id
866: and cic.COST_TYPE_ID = cct.COST_TYPE_ID

Line 889: delete from csp_excess_lists cel

885: fetch business_rule into br_rec;
886: close business_rule;
887:
888: if br_rec.category_set_id is not null then
889: delete from csp_excess_lists cel
890: where cel.excess_status = 'P'
891: and cel.inventory_item_id in
892: (select inventory_item_id
893: from mtl_item_categories

Line 920: delete from csp_excess_lists

916: if nvl(l_max_value,0) > 0 then
917: l_excess_percentage := nvl(l_excess_value,0) / l_max_value * 100;
918:
919: if l_excess_percentage < br_rec.total_max_excess then
920: delete from csp_excess_lists
921: where excess_status = 'P';
922: null; --exit;
923: end if;
924: end if;

Line 935: delete from csp_excess_lists

931: -- Avoid divisor equal to zero
932: if nvl(olq.max_minmax_quantity,0) <> 0 then
933: l_line_quantity := nvl(olq.excess_quantity,0) / nvl(olq.max_minmax_quantity,1) * 100;
934: if l_line_quantity < nvl(br_rec.line_max_excess,0) then
935: delete from csp_excess_lists
936: where excess_line_id = olq.excess_line_id;
937: end if;
938: end if;
939: end loop;

Line 946: delete from csp_excess_lists

942: -- Avoid divisor equal to zero
943: if nvl(slq.max_minmax_quantity,0) <> 0 then
944: l_line_quantity := nvl(slq.excess_quantity,0) / nvl(slq.max_minmax_quantity,1) * 100;
945: if l_line_quantity < nvl(br_rec.line_max_excess,0) then
946: delete from csp_excess_lists
947: where excess_line_id = slq.excess_line_id;
948: end if;
949: end if;
950: end loop;

Line 963: delete from csp_excess_lists

959: fetch org_recently_received into l_received_date;
960: close org_recently_received;
961: l_days_since_receipt := sysdate - nvl(l_received_date,sysdate - br_rec.days_since_receipt);
962: if l_days_since_receipt < br_rec.days_since_receipt then
963: delete from csp_excess_lists
964: where excess_line_id = el.excess_line_id;
965: end if;
966: else
967: open sub_recently_received(el.inventory_item_id);

Line 972: delete from csp_excess_lists

968: fetch sub_recently_received into l_received_date;
969: close sub_recently_received;
970: l_days_since_receipt := sysdate - nvl(l_received_date,sysdate - br_rec.days_since_receipt);
971: if l_days_since_receipt < br_rec.days_since_receipt then
972: delete from csp_excess_lists
973: where excess_line_id = el.excess_line_id;
974: end if;
975: end if;
976: end loop;

Line 990: delete from csp_excess_lists

986: l_excess_percentage := 0;
987: l_value := 0;
988: for elv in excess_line_value loop
989: if l_excess_percentage > br_rec.total_excess_value then
990: delete from csp_excess_lists
991: where excess_line_id = elv.excess_line_id;
992: end if;
993: l_value := l_value + nvl(elv.value,0);
994: l_excess_percentage := l_value / l_excess_value * 100;

Line 1005: update csp_excess_lists

1001: l_counter := 0;
1002: for elv in excess_line_value loop
1003: l_counter := l_counter + 1;
1004: if l_counter <= br_rec.top_excess_lines then
1005: update csp_excess_lists
1006: set excess_status = 'O'
1007: where excess_line_id = elv.excess_line_id;
1008: else
1009: exit;

Line 1012: delete from csp_excess_lists

1008: else
1009: exit;
1010: end if;
1011: end loop;
1012: delete from csp_excess_lists
1013: where excess_status = 'P';
1014: end if;
1015: -- Remaining excess lines will be comitted
1016: update csp_excess_lists

Line 1016: update csp_excess_lists

1012: delete from csp_excess_lists
1013: where excess_status = 'P';
1014: end if;
1015: -- Remaining excess lines will be comitted
1016: update csp_excess_lists
1017: set excess_status = 'O'
1018: where excess_status = 'P';
1019: commit;
1020: end apply_business_rules;

Line 1071: csp_excess_lists_pkg.Insert_Row(

1067: p_hierarchy_node_id,
1068: d.excess_quantity);
1069: else
1070: x_excess_line_id := null;
1071: csp_excess_lists_pkg.Insert_Row(
1072: px_EXCESS_LINE_ID => x_excess_line_id,
1073: p_CREATED_BY => fnd_global.user_id,
1074: p_CREATION_DATE => sysdate,
1075: p_LAST_UPDATED_BY => fnd_global.user_id,

Line 1117: delete from csp_excess_lists

1113: p_subinventory_code varchar2,
1114: p_condition_type varchar2) is
1115: begin
1116: if p_subinventory_code is null then
1117: delete from csp_excess_lists
1118: where organization_id = p_organization_id
1119: and condition_code = nvl(p_condition_type,condition_code)
1120: and excess_status = 'O';
1121: else

Line 1122: delete from csp_excess_lists

1118: where organization_id = p_organization_id
1119: and condition_code = nvl(p_condition_type,condition_code)
1120: and excess_status = 'O';
1121: else
1122: delete from csp_excess_lists
1123: where organization_id = p_organization_id
1124: and subinventory_code = nvl(p_subinventory_code,subinventory_code)
1125: and condition_code = nvl(p_condition_type,condition_code)
1126: and excess_status = 'O';