DBA Data[Home] [Help]

APPS.CSP_EXCESS_PARTS_PVT dependencies on CSP_EXCESS_LISTS

Line 113: v_excess_part CSP_EXCESS_LISTS_PKG.EXCESS_RECORD_TYPE := CSP_EXCESS_LISTS_PKG.G_MISS_EXCESS_REC;

109: l_excess_rule_id number;
110: L_LOC_ASSIGNMENT_ID number;
111:
112: -- bug # 8518127
113: v_excess_part CSP_EXCESS_LISTS_PKG.EXCESS_RECORD_TYPE := CSP_EXCESS_LISTS_PKG.G_MISS_EXCESS_REC;
114: CURSOR employee_id_cur IS
115: SELECT employee_id
116: FROM fnd_user
117: WHERE user_id = l_user_id;

Line 515: csp_excess_lists_pkg.Insert_Row(

511: NVL(inv_rec.TOT_AVAIL_QTY,0) - NVL(inv_rec.SUPPLY_QTY,0) - NVL(inv_rec.MAX_QTY,0));
512: else
513: x_excess_line_id := null;
514: /*
515: csp_excess_lists_pkg.Insert_Row(
516: px_EXCESS_LINE_ID => x_excess_line_id,
517: p_CREATED_BY => fnd_global.user_id,
518: p_CREATION_DATE => sysdate,
519: p_LAST_UPDATED_BY => fnd_global.user_id,

Line 550: v_excess_part := CSP_EXCESS_LISTS_PKG.G_MISS_EXCESS_REC;

546: p_ATTRIBUTE15 => null);
547: */
548:
549:
550: v_excess_part := CSP_EXCESS_LISTS_PKG.G_MISS_EXCESS_REC;
551: v_excess_part.CREATED_BY := fnd_global.user_id;
552: v_excess_part.CREATION_DATE := sysdate;
553: v_excess_part.LAST_UPDATED_BY := fnd_global.user_id;
554: v_excess_part.LAST_UPDATE_DATE := sysdate;

Line 637: csp_excess_lists_pkg.Insert_Row(

633: l_excess);
634: else
635: x_excess_line_id := null;
636: /*
637: csp_excess_lists_pkg.Insert_Row(
638: px_EXCESS_LINE_ID => x_excess_line_id,
639: p_CREATED_BY => fnd_global.user_id,
640: p_CREATION_DATE => sysdate,
641: p_LAST_UPDATED_BY => fnd_global.user_id,

Line 671: v_excess_part := CSP_EXCESS_LISTS_PKG.G_MISS_EXCESS_REC;

667: p_ATTRIBUTE14 => null,
668: p_ATTRIBUTE15 => null);
669: */
670:
671: v_excess_part := CSP_EXCESS_LISTS_PKG.G_MISS_EXCESS_REC;
672: v_excess_part.CREATED_BY := fnd_global.user_id;
673: v_excess_part.CREATION_DATE := sysdate;
674: v_excess_part.LAST_UPDATED_BY := fnd_global.user_id;
675: v_excess_part.LAST_UPDATE_DATE := sysdate;

Line 749: csp_excess_lists_pkg.Insert_Row(

745: l_excess);
746: else
747: x_excess_line_id := null;
748: /*
749: csp_excess_lists_pkg.Insert_Row(
750: px_EXCESS_LINE_ID => x_excess_line_id,
751: p_CREATED_BY => fnd_global.user_id,
752: p_CREATION_DATE => sysdate,
753: p_LAST_UPDATED_BY => fnd_global.user_id,

Line 783: v_excess_part := CSP_EXCESS_LISTS_PKG.G_MISS_EXCESS_REC;

779: p_ATTRIBUTE14 => null,
780: p_ATTRIBUTE15 => null);
781: */
782:
783: v_excess_part := CSP_EXCESS_LISTS_PKG.G_MISS_EXCESS_REC;
784: v_excess_part.CREATED_BY := fnd_global.user_id;
785: v_excess_part.CREATION_DATE := sysdate;
786: v_excess_part.LAST_UPDATED_BY := fnd_global.user_id;
787: v_excess_part.LAST_UPDATE_DATE := sysdate;

Line 825: update csp_excess_lists

821: p_organization_id => p_organization_id,
822: p_subinventory_code => p_subinventory_code,
823: p_excess_rule_id => l_excess_rule_id);
824: else
825: update csp_excess_lists
826: set excess_status = 'O'
827: where excess_status = 'P';
828: commit;
829: end if;

Line 866: csp_excess_lists cel

862: cursor excess_value is
863: select sum(cel.excess_quantity * NVL(ITEM_COST,0))
864: from CST_ITEM_COSTS cic,
865: CST_COST_TYPES cct,
866: csp_excess_lists cel
867: where cic.ORGANIZATION_ID = cel.organization_id
868: and cic.inventory_item_id = cel.inventory_item_id
869: and cic.COST_TYPE_ID = cct.COST_TYPE_ID
870: and cct.COST_TYPE_ID = cct.DEFAULT_COST_TYPE_ID

Line 902: from csp_excess_lists cel,

898: cursor org_line_quantity is
899: select cel.excess_line_id,
900: cel.excess_quantity,
901: msib.max_minmax_quantity
902: from csp_excess_lists cel,
903: mtl_system_items_b msib
904: where cel.organization_id = p_organization_id
905: and cel.organization_id = msib.organization_id
906: and cel.inventory_item_id = msib.inventory_item_id

Line 913: from csp_excess_lists cel,

909: cursor sub_line_quantity is
910: select cel.excess_line_id,
911: cel.excess_quantity,
912: misi.max_minmax_quantity
913: from csp_excess_lists cel,
914: mtl_item_sub_inventories misi
915: where cel.organization_id = p_organization_id
916: and cel.organization_id = misi.organization_id
917: and cel.subinventory_code = misi.secondary_inventory

Line 943: from csp_excess_lists cel

939:
940: cursor excess_lines is
941: select cel.excess_line_id,
942: cel.inventory_item_id
943: from csp_excess_lists cel
944: where cel.organization_id = p_organization_id
945: and cel.excess_status = 'P';
946:
947: cursor excess_line_value is

Line 952: csp_excess_lists cel

948: select cel.excess_line_id,
949: cel.excess_quantity * NVL(ITEM_COST,0) value
950: from CST_ITEM_COSTS cic,
951: CST_COST_TYPES cct,
952: csp_excess_lists cel
953: where cel.organization_id = p_organization_id
954: and cic.ORGANIZATION_ID = cel.organization_id
955: and cic.inventory_item_id = cel.inventory_item_id
956: and cic.COST_TYPE_ID = cct.COST_TYPE_ID

Line 979: delete from csp_excess_lists cel

975: fetch business_rule into br_rec;
976: close business_rule;
977:
978: if br_rec.category_set_id is not null then
979: delete from csp_excess_lists cel
980: where cel.excess_status = 'P'
981: and cel.inventory_item_id in
982: (select inventory_item_id
983: from mtl_item_categories

Line 1010: delete from csp_excess_lists

1006: if nvl(l_max_value,0) > 0 then
1007: l_excess_percentage := nvl(l_excess_value,0) / l_max_value * 100;
1008:
1009: if l_excess_percentage < br_rec.total_max_excess then
1010: delete from csp_excess_lists
1011: where excess_status = 'P';
1012: null; --exit;
1013: end if;
1014: end if;

Line 1025: delete from csp_excess_lists

1021: -- Avoid divisor equal to zero
1022: if nvl(olq.max_minmax_quantity,0) <> 0 then
1023: l_line_quantity := nvl(olq.excess_quantity,0) / nvl(olq.max_minmax_quantity,1) * 100;
1024: if l_line_quantity < nvl(br_rec.line_max_excess,0) then
1025: delete from csp_excess_lists
1026: where excess_line_id = olq.excess_line_id;
1027: end if;
1028: end if;
1029: end loop;

Line 1036: delete from csp_excess_lists

1032: -- Avoid divisor equal to zero
1033: if nvl(slq.max_minmax_quantity,0) <> 0 then
1034: l_line_quantity := nvl(slq.excess_quantity,0) / nvl(slq.max_minmax_quantity,1) * 100;
1035: if l_line_quantity < nvl(br_rec.line_max_excess,0) then
1036: delete from csp_excess_lists
1037: where excess_line_id = slq.excess_line_id;
1038: end if;
1039: end if;
1040: end loop;

Line 1053: delete from csp_excess_lists

1049: open org_recently_received(el.inventory_item_id);
1050: fetch org_recently_received into l_received_date;
1051: close org_recently_received;
1052: if l_received_date is not null then
1053: delete from csp_excess_lists
1054: where excess_line_id = el.excess_line_id;
1055: end if;
1056: else
1057: l_received_date := null;

Line 1062: delete from csp_excess_lists

1058: open sub_recently_received(el.inventory_item_id);
1059: fetch sub_recently_received into l_received_date;
1060: close sub_recently_received;
1061: if l_received_date is not null then
1062: delete from csp_excess_lists
1063: where excess_line_id = el.excess_line_id;
1064: end if;
1065: end if;
1066: end loop;

Line 1080: delete from csp_excess_lists

1076: l_excess_percentage := 0;
1077: l_value := 0;
1078: for elv in excess_line_value loop
1079: if l_excess_percentage > br_rec.total_excess_value then
1080: delete from csp_excess_lists
1081: where excess_line_id = elv.excess_line_id;
1082: end if;
1083: l_value := l_value + nvl(elv.value,0);
1084: l_excess_percentage := l_value / l_excess_value * 100;

Line 1095: update csp_excess_lists

1091: l_counter := 0;
1092: for elv in excess_line_value loop
1093: l_counter := l_counter + 1;
1094: if l_counter <= br_rec.top_excess_lines then
1095: update csp_excess_lists
1096: set excess_status = 'O'
1097: where excess_line_id = elv.excess_line_id;
1098: else
1099: exit;

Line 1102: delete from csp_excess_lists

1098: else
1099: exit;
1100: end if;
1101: end loop;
1102: delete from csp_excess_lists
1103: where excess_status = 'P';
1104: end if;
1105: -- Remaining excess lines will be comitted
1106: update csp_excess_lists

Line 1106: update csp_excess_lists

1102: delete from csp_excess_lists
1103: where excess_status = 'P';
1104: end if;
1105: -- Remaining excess lines will be comitted
1106: update csp_excess_lists
1107: set excess_status = 'O'
1108: where excess_status = 'P';
1109: commit;
1110: end apply_business_rules;

Line 1137: v_excess_part CSP_EXCESS_LISTS_PKG.EXCESS_RECORD_TYPE := CSP_EXCESS_LISTS_PKG.G_MISS_EXCESS_REC;

1133: and total_qoh > 0;
1134:
1135: x_excess_line_id number;
1136:
1137: v_excess_part CSP_EXCESS_LISTS_PKG.EXCESS_RECORD_TYPE := CSP_EXCESS_LISTS_PKG.G_MISS_EXCESS_REC;
1138: begin
1139:
1140: for d in defectives loop
1141: if p_called_from = 'PART_STATUS' then

Line 1163: csp_excess_lists_pkg.Insert_Row(

1159: d.excess_quantity);
1160: else
1161: x_excess_line_id := null;
1162: /*
1163: csp_excess_lists_pkg.Insert_Row(
1164: px_EXCESS_LINE_ID => x_excess_line_id,
1165: p_CREATED_BY => fnd_global.user_id,
1166: p_CREATION_DATE => sysdate,
1167: p_LAST_UPDATED_BY => fnd_global.user_id,

Line 1197: v_excess_part := CSP_EXCESS_LISTS_PKG.G_MISS_EXCESS_REC;

1193: p_ATTRIBUTE14 => null,
1194: p_ATTRIBUTE15 => null);
1195: */
1196:
1197: v_excess_part := CSP_EXCESS_LISTS_PKG.G_MISS_EXCESS_REC;
1198: v_excess_part.CREATED_BY := fnd_global.user_id;
1199: v_excess_part.CREATION_DATE := sysdate;
1200: v_excess_part.LAST_UPDATED_BY := fnd_global.user_id;
1201: v_excess_part.LAST_UPDATE_DATE := sysdate;

Line 1237: delete from csp_excess_lists

1233: p_subinventory_code varchar2,
1234: p_condition_type varchar2) is
1235: begin
1236: if p_subinventory_code is null then
1237: delete from csp_excess_lists
1238: where organization_id = p_organization_id
1239: and condition_code = nvl(p_condition_type,condition_code)
1240: and excess_status = 'O';
1241: else

Line 1242: delete from csp_excess_lists

1238: where organization_id = p_organization_id
1239: and condition_code = nvl(p_condition_type,condition_code)
1240: and excess_status = 'O';
1241: else
1242: delete from csp_excess_lists
1243: where organization_id = p_organization_id
1244: and subinventory_code = nvl(p_subinventory_code,subinventory_code)
1245: and condition_code = nvl(p_condition_type,condition_code)
1246: and excess_status = 'O';

Line 1987: p_excess_part IN OUT nocopy CSP_EXCESS_LISTS_PKG.EXCESS_RECORD_TYPE,

1983: END get_shipped_qty;
1984:
1985: -- added by htank for Reverse Logistic project
1986: PROCEDURE populate_excess_list (
1987: p_excess_part IN OUT nocopy CSP_EXCESS_LISTS_PKG.EXCESS_RECORD_TYPE,
1988: p_is_insert_record IN VARCHAR2 default 'Y'
1989: ) IS
1990:
1991: CURSOR c_get_return_info (cv_ORGANIZATION_ID NUMBER,

Line 2004: v_excess_records CSP_EXCESS_LISTS_PKG.EXCESS_TBL_TYPE;

2000: and CSI.ORGANIZATION_ID = cv_ORGANIZATION_ID;
2001:
2002: v_ret_org_id NUMBER;
2003: v_ret_sub_inv VARCHAR2(10);
2004: v_excess_records CSP_EXCESS_LISTS_PKG.EXCESS_TBL_TYPE;
2005: v_excess_part CSP_EXCESS_LISTS_PKG.EXCESS_RECORD_TYPE;
2006: x_excess_line_id NUMBER;
2007:
2008: -- routing rule change

Line 2005: v_excess_part CSP_EXCESS_LISTS_PKG.EXCESS_RECORD_TYPE;

2001:
2002: v_ret_org_id NUMBER;
2003: v_ret_sub_inv VARCHAR2(10);
2004: v_excess_records CSP_EXCESS_LISTS_PKG.EXCESS_TBL_TYPE;
2005: v_excess_part CSP_EXCESS_LISTS_PKG.EXCESS_RECORD_TYPE;
2006: x_excess_line_id NUMBER;
2007:
2008: -- routing rule change
2009: v_return_rule_id number;

Line 2155: 'Calling csp_excess_lists_pkg.Insert_Row for i = ' || i);

2151:
2152: if(FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then
2153: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
2154: 'csp.plsql.CSP_EXCESS_PARTS_PVT.populate_excess_list',
2155: 'Calling csp_excess_lists_pkg.Insert_Row for i = ' || i);
2156: end if;
2157:
2158: csp_excess_lists_pkg.Insert_Row(
2159: px_EXCESS_LINE_ID => x_excess_line_id,

Line 2158: csp_excess_lists_pkg.Insert_Row(

2154: 'csp.plsql.CSP_EXCESS_PARTS_PVT.populate_excess_list',
2155: 'Calling csp_excess_lists_pkg.Insert_Row for i = ' || i);
2156: end if;
2157:
2158: csp_excess_lists_pkg.Insert_Row(
2159: px_EXCESS_LINE_ID => x_excess_line_id,
2160: p_CREATED_BY => v_excess_part.CREATED_BY,
2161: p_CREATION_DATE => v_excess_part.CREATION_DATE,
2162: p_LAST_UPDATED_BY => v_excess_part.LAST_UPDATED_BY,